← All compilation units

Flyology_TUI.Components.Panel_Groups

Description

Appearance

type Appearance is record
   Pane             : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
   Divider          : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
   Focused_Divider  : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
   Hovered_Divider  : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
   Pressed_Divider  : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
   Disabled_Divider : Flyology_TUI.Styles.Style :=
     Flyology_TUI.Styles.Default;
end record;
Record fields
Pane
Divider
Focused_Divider
Hovered_Divider
Pressed_Divider
Disabled_Divider

Blur

procedure Blur (Item : in out Model)
Parameters
Item

Bounds

function Bounds
  (Item : Layout_Snapshot) return Flyology_TUI.Geometry.Rectangle
Parameters
Item
Return value

Bounds

function Bounds (Item : Model) return Flyology_TUI.Geometry.Rectangle
Parameters
Item
Return value

Configure

procedure Configure
  (Item  : in out Model;
   Panes : Pane_Constraint_Array)
Parameters
Item
Panes

Configure

procedure Configure
  (Item          : in out Model;
   Width, Height : Natural;
   Panes         : Pane_Constraint_Array)
Parameters
Item
Width
Height
Panes

Create

function Create
  (Flow          : Orientation;
   Width, Height : Natural;
   Panes         : Pane_Constraint_Array) return Model

Horizontal groups arrange panes left to right; Vertical groups arrange them top to bottom. Minimums are assigned in pane order when they do not fit. Otherwise preferred Initial_Span values are filled in pane order, and remaining cells are divided by Weight. Each visible divider owns one cell. In a geometry too small for every divider, earlier dividers are visible first and every pane span is zero.

Parameters
Flow
Width
Height
Panes
Return value

Divider_Count

function Divider_Count (Item : Layout_Snapshot) return Natural
Parameters
Item
Return value

Divider_Count

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

Divider_Region

function Divider_Region
  (Item : Layout_Snapshot;
   Index : Integer) return Flyology_TUI.Geometry.Rectangle
Parameters
Item
Index
Return value

Divider_Region

function Divider_Region
  (Item : Model; Index : Integer) return Flyology_TUI.Geometry.Rectangle
Parameters
Item
Index
Return value

Flow

function Flow (Item : Layout_Snapshot) return Orientation
Parameters
Item
Return value

Flow

function Flow (Item : Model) return Orientation
Parameters
Item
Return value

Focus

procedure Focus (Item : in out Model)
Parameters
Item

Focus_Divider

procedure Focus_Divider (Item : in out Model; Index : Integer)
Parameters
Item
Index

Focused

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

Focused_Divider

function Focused_Divider (Item : Model) return Integer
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;
   Geometry : Layout_Snapshot;
   Event    : Flyology_TUI.Mouse.Local_Event)
   return Flyology_TUI.Components.Interactions.Update_Result

Use Geometry when the parent routed the event from a previously captured layout snapshot. Width and height may differ from the current model after Resize. Orientation and pane count must still match; a new interaction against an incompatible snapshot reports Rejected. An active drag uses its captured divider position, and a matching release always relinquishes capture even after Configure changes pane count.

Parameters
Item
Geometry
Event
Return value

Handle

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

Keyboard input is accepted only while focused and enabled. Tab selects the next divider, Shift-Tab the previous, Home the first, and End the last. Left/Right move a Horizontal divider; Up/Down move a Vertical divider. Movement is one cell, or five with Shift, and never violates either neighboring minimum when all configured minimums fit.

Parameters
Item
Event
Return value

Handle

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

Coordinates are local to the fixed group origin. Only divider hits are consumed or request focus; pane body clicks remain available to the caller-owned children. Captured drag and release coordinates remain signed outside the old or current Bounds.

Parameters
Item
Event
Return value

Has_Divider

function Has_Divider
  (Item : Layout_Snapshot; Index : Integer) return Boolean
Parameters
Item
Index
Return value

Has_Divider

function Has_Divider (Item : Model; Index : Integer) return Boolean
Parameters
Item
Index
Return value

Has_Focused_Divider

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

Has_Pane

function Has_Pane
  (Item : Layout_Snapshot; Index : Integer) return Boolean
Parameters
Item
Index
Return value

Has_Pane

function Has_Pane (Item : Model; Index : Integer) return Boolean
Parameters
Item
Index
Return value

Height

function Height (Item : Layout_Snapshot) return Natural
Parameters
Item
Return value

Height

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

Is_Enabled

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

Layout

function Layout (Item : Model) return Layout_Snapshot

Capture the complete geometry after Configure or Resize. A snapshot is independent of later model changes and can be shared by the parent's mouse router and the matching Render call.

Parameters
Item
Return value

Layout_Snapshot

type Layout_Snapshot is private;

Model

type Model is tagged private;

Orientation

subtype Orientation is Flyology_TUI.Layouts.Boxes.Direction;

Pane_Constraint

type Pane_Constraint is record
   Minimum_Span : Natural := 0;
   Initial_Span : Natural := 0;
   Weight       : Positive := 1;
end record;
Record fields
Minimum_Span
Initial_Span
Weight

Pane_Constraint_Array

type Pane_Constraint_Array is
  array (Integer range <>) of Pane_Constraint;

Array bounds are retained by Model. Pane and divider query indices use the same bounds supplied by the caller; divider I is between panes I and I + 1.

Pane_Count

function Pane_Count (Item : Layout_Snapshot) return Natural
Parameters
Item
Return value

Pane_Count

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

Pane_Region

function Pane_Region
  (Item : Layout_Snapshot;
   Index : Integer) return Flyology_TUI.Geometry.Rectangle
Parameters
Item
Index
Return value

Pane_Region

function Pane_Region
  (Item : Model; Index : Integer) return Flyology_TUI.Geometry.Rectangle
Parameters
Item
Index
Return value

Pane_Span

function Pane_Span
  (Item : Layout_Snapshot; Index : Integer) return Natural
Parameters
Item
Index
Return value

Pane_Span

function Pane_Span (Item : Model; Index : Integer) return Natural
Parameters
Item
Index
Return value

Render

function Render
  (Item       : Model;
   Geometry   : Layout_Snapshot;
   Children   : Surface_Array;
   Appearance : Panel_Groups.Appearance)
   return Flyology_TUI.Surfaces.Surface
Parameters
Item
Geometry
Children
Appearance
Return value

Render

function Render
  (Item     : Model;
   Geometry : Layout_Snapshot;
   Children : Surface_Array;
   Theme    : Flyology_TUI.Themes.Theme)
   return Flyology_TUI.Surfaces.Surface
Parameters
Item
Geometry
Children
Theme
Return value

Render

function Render
  (Item       : Model;
   Children   : Surface_Array;
   Appearance : Panel_Groups.Appearance)
   return Flyology_TUI.Surfaces.Surface

Children and themes are borrowed for this call. Children must have the same bounds used to configure Model. Each child is clipped and padded inside its pane, so a wide glyph cannot cross or overwrite a divider.

Parameters
Item
Children
Appearance
Return value

Render

function Render
  (Item     : Model;
   Children : Surface_Array;
   Theme    : Flyology_TUI.Themes.Theme)
   return Flyology_TUI.Surfaces.Surface
Parameters
Item
Children
Theme
Return value

Resize

procedure Resize
  (Item          : in out Model;
   Width, Height : Natural)

Resize preserves current spans in pane order before distributing growth by Weight. Configure replaces the pane range and returns to the initial span policy. Both operations validate the complete result before changing Model, cancel an active drag, and preserve capture ownership until the matching left-button release.

Parameters
Item
Width
Height

Set_Enabled

procedure Set_Enabled (Item : in out Model; Enabled : Boolean)

Disabling cancels the semantic drag and hover state. If capture was already acquired, the next matching left release still reports Release_Capture.

Parameters
Item
Enabled

Surface_Array

type Surface_Array is
  array (Integer range <>) of Flyology_TUI.Surfaces.Surface;

Update

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

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)
Parameters
Item
Event

Width

function Width (Item : Layout_Snapshot) return Natural
Parameters
Item
Return value

Width

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