← All compilation units

Flyology_TUI.Layouts

Description

Block

type Block is record
   Width      : Natural := 0;
   Height     : Natural := 0;
   Padding    : Edges;
   Border     : Border_Kind := No_Border;
   Appearance : Flyology_TUI.Styles.Style := Flyology_TUI.Styles.Default;
   Horizontal : Horizontal_Alignment := Align_Left;
   Vertical   : Vertical_Alignment := Align_Top;
end record;
Record fields
Width
Height
Padding
Border
Appearance
Horizontal
Vertical

Border_Kind

type Border_Kind is (No_Border, Rounded, Square, Double_Line);
Enumeration literals
No_Border
Rounded
Square
Double_Line

Content_Region

function Content_Region
  (Item   : Block;
   Chrome : Flyology_TUI.Skins.Frame_Chrome)
   return Flyology_TUI.Geometry.Rectangle

Return the local rectangle available to content after the block's border, padding, and frame shadow. Item.Width and Item.Height are exact outer extents for this query, including zero; intrinsic dimensions have no content slot until the caller supplies an explicit block extent.

Parameters
Item

Block whose explicit outer extent defines the local frame.

Chrome

Frame structure used by the matching Render overload.

Return value

Exact local rectangle available to caller-owned content.

Edges

type Edges is record
   Top    : Natural := 0;
   Right  : Natural := 0;
   Bottom : Natural := 0;
   Left   : Natural := 0;
end record;
Record fields
Top
Right
Bottom
Left

Horizontal_Alignment

type Horizontal_Alignment is (Align_Left, Align_Center, Align_Right);
Enumeration literals
Align_Left
Align_Center
Align_Right

Join_Horizontally

function Join_Horizontally
  (Left, Right : Flyology_TUI.Surfaces.Surface;
   Gap         : Natural := 0;
   Alignment   : Vertical_Alignment := Align_Top)
   return Flyology_TUI.Surfaces.Surface
Parameters
Left
Right
Gap
Alignment
Return value

Join_Vertically

function Join_Vertically
  (Top, Bottom : Flyology_TUI.Surfaces.Surface;
   Gap         : Natural := 0;
   Alignment   : Horizontal_Alignment := Align_Left)
   return Flyology_TUI.Surfaces.Surface
Parameters
Top
Bottom
Gap
Alignment
Return value

Panel_Content_Region

function Panel_Content_Region
  (Item   : Block;
   Chrome : Flyology_TUI.Skins.Panel_Chrome)
   return Flyology_TUI.Geometry.Rectangle

Return a panel's local content rectangle. Leading titles reserve their rendered heading and gap; centered titles occupy the border and reserve no content row. The result excludes the frame shadow.

Parameters
Item

Block whose explicit outer extent defines the local panel.

Chrome

Panel structure used by the matching panel renderer.

Return value

Exact local rectangle available to caller-owned panel content.

Render

function Render
  (Item    : Block;
   Content : Flyology_TUI.Surfaces.Surface)
   return Flyology_TUI.Surfaces.Surface
Parameters
Item
Content
Return value

Render

function Render
  (Item    : Block;
   Content : Flyology_TUI.Surfaces.Surface;
   Chrome  : Flyology_TUI.Skins.Frame_Chrome)
   return Flyology_TUI.Surfaces.Surface

Render with caller-selected structural chrome. The old overload keeps Border_Kind's exact glyphs and has no shadow.

Parameters
Item
Content
Chrome
Return value

Vertical_Alignment

type Vertical_Alignment is (Align_Top, Align_Middle, Align_Bottom);
Enumeration literals
Align_Top
Align_Middle
Align_Bottom