← All compilation units

Flyology_TUI.Components.Accordions

Description

"="

function "=" (Left, Right : Id_Type) return Boolean
Parameters
Left
Right
Return value

Appearance

type Appearance is record
   Header          : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
   Expanded_Header : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
   Focused_Header  : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
   Disabled_Header : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
   Content          : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
end record;
Record fields
Header
Expanded_Header
Focused_Header
Disabled_Header
Content

Body_Array

type Body_Array is array (Positive range <>) of Body_Entry;

Body_Entry

type Body_Entry is record
   Id      : Id_Type;
   Content : Flyology_TUI.Surfaces.Surface;
end record;
Record fields
Id
Content

Body_Region

function Body_Region
  (Item : Presentation;
   Id   : Id_Type) return Flyology_TUI.Geometry.Rectangle
Parameters
Item
Id
Return value

Capacity

Capacity : Positive;

Collapse_All

procedure Collapse_All (Item : in out Model)
Parameters
Item

Contains

function Contains (Item : Model; Id : Id_Type) return Boolean
Parameters
Item
Id
Return value

Create

function Create
  (Sections : Section_Array;
   Mode     : Expansion_Mode := Single_Expansion) return Model
Parameters
Sections
Mode
Return value

Expand_All

procedure Expand_All (Item : in out Model)
Parameters
Item

Expansion_Mode

type Expansion_Mode is (Single_Expansion, Multiple_Expansion);
Enumeration literals
Single_Expansion
Multiple_Expansion

Focused_Id

function Focused_Id (Item : Model) return Id_Type
Parameters
Item
Return value

Frame

function Frame
  (Item : Presentation) return Flyology_TUI.Surfaces.Surface
Parameters
Item
Return value

From_Theme

function From_Theme
  (Theme : Flyology_TUI.Themes.Theme) return Appearance
Parameters
Theme
Return value

Handle

function Handle
  (Item  : in out Model;
   Event : Flyology_TUI.Events.Terminal_Event)
   return Flyology_TUI.Components.Interactions.Update_Result
Parameters
Item
Event
Return value

Handle

function Handle
  (Item   : in out Model;
   Event  : Flyology_TUI.Mouse.Local_Event;
   Layout : Presentation)
   return Flyology_TUI.Components.Interactions.Update_Result

Event coordinates are relative to Frame (Layout). Only header regions are consumed; body events remain available for caller-owned children.

Parameters
Item
Event
Layout
Return value

Has_Body_Region

function Has_Body_Region
  (Item : Presentation;
   Id   : Id_Type) return Boolean
Parameters
Item
Id
Return value

Has_Focused_Section

function Has_Focused_Section (Item : Model) return Boolean
Parameters
Item
Return value

Has_Section

function Has_Section
  (Item : Presentation;
   Id   : Id_Type) return Boolean
Parameters
Item
Id
Return value

Header_Region

function Header_Region
  (Item : Presentation;
   Id   : Id_Type) return Flyology_TUI.Geometry.Rectangle
Parameters
Item
Id
Return value

Id_Of

function Id_Of (Section : Section_Type) return Id_Type
Parameters
Section
Return value

Id_Type

type Id_Type is private;

Is_Empty

function Is_Empty (Item : Model) return Boolean
Parameters
Item
Return value

Is_Expanded

function Is_Expanded (Item : Model; Id : Id_Type) return Boolean
Parameters
Item
Id
Return value

Is_Section_Enabled

function Is_Section_Enabled (Item : Model; Id : Id_Type) return Boolean
Parameters
Item
Id
Return value

Label

function Label (Section : Section_Type) return Wide_Wide_String
Parameters
Section
Return value

Length

function Length (Item : Model) return Natural
Parameters
Item
Return value

Mode

function Mode (Item : Model) return Expansion_Mode
Parameters
Item
Return value

Model

type Model is tagged private;

Present

function Present
  (Item      : Model;
   Bodies    : Body_Array;
   Width     : Natural;
   Look      : Appearance;
   Has_Focus : Boolean := False) return Presentation
Parameters
Item
Bodies
Width
Look
Has_Focus
Return value

Present

function Present
  (Item      : Model;
   Bodies    : Body_Array;
   Width     : Natural;
   Theme     : Flyology_TUI.Themes.Theme;
   Has_Focus : Boolean := False) return Presentation
Parameters
Item
Bodies
Width
Theme
Has_Focus
Return value

Presentation

type Presentation is private;

Presentation owns only the composed frame, stable ids, and geometry. Bodies and themes are borrowed for this call and are never retained by Model. Bodies must contain exactly one entry for each expanded id.

Render

function Render
  (Item      : Model;
   Bodies    : Body_Array;
   Width     : Natural;
   Look      : Appearance;
   Has_Focus : Boolean := False)
   return Flyology_TUI.Surfaces.Surface
Parameters
Item
Bodies
Width
Look
Has_Focus
Return value

Render

function Render
  (Item      : Model;
   Bodies    : Body_Array;
   Width     : Natural;
   Theme     : Flyology_TUI.Themes.Theme;
   Has_Focus : Boolean := False)
   return Flyology_TUI.Surfaces.Surface
Parameters
Item
Bodies
Width
Theme
Has_Focus
Return value

Section_Array

type Section_Array is array (Positive range <>) of Section_Type;

Section_Type

type Section_Type is private;

Set_Expanded

procedure Set_Expanded
  (Item     : in out Model;
   Id       : Id_Type;
   Expanded : Boolean := True)
Parameters
Item
Id
Expanded

Set_Section_Enabled

procedure Set_Section_Enabled
  (Item    : in out Model;
   Id      : Id_Type;
   Enabled : Boolean := True)
Parameters
Item
Id
Enabled

Set_Sections

procedure Set_Sections
  (Item     : in out Model;
   Sections : Section_Array)

Existing expansion, enabled, and focused state follows stable section ids. New sections are enabled and collapsed. A successful replacement cancels pending activation without relinquishing application-owned mouse capture before the matching release arrives.

Parameters
Item
Sections

Toggle

procedure Toggle (Item : in out Model; Id : Id_Type)
Parameters
Item
Id

Update

procedure Update
  (Item  : in out Model;
   Event : Flyology_TUI.Events.Terminal_Event)
Parameters
Item
Event

Update

procedure Update
  (Item   : in out Model;
   Event  : Flyology_TUI.Mouse.Local_Event;
   Layout : Presentation)
Parameters
Item
Event
Layout