Description
Arrange
function Arrange
(Items : Surface_Array;
Constraints : Constraint_Array;
Width : Natural;
Height : Natural;
Flow : Direction;
Gap : Natural := 0;
Alignment : Cross_Axis_Alignment := Stretch) return Layout_Result
Parameters
- Items
- Constraints
- Width
- Height
- Flow
- Gap
- Alignment
Return value
Constraint
type Constraint (Kind : Constraint_Kind := Content) is record
case Kind is
when Content =>
null;
when Fixed =>
Cells : Natural := 0;
when Fill =>
Weight : Positive := 1;
end case;
end record;
Record fields
- Kind
- Cells
- Weight
Constraint_Array
type Constraint_Array is array (Positive range <>) of Constraint;
Constraint_Kind
type Constraint_Kind is (Content, Fixed, Fill);
Enumeration literals
- Content
- Fixed
- Fill
Content_Size
Content_Size : constant Constraint := (Kind => Content);
Cross_Axis_Alignment
type Cross_Axis_Alignment is (Start, Center, End_Aligned, Stretch);
End_Aligned names cross-axis end alignment because End is an Ada reserved word. Non-stretch slots use the child's intrinsic cross size.
Enumeration literals
- Start
- Center
- End_Aligned
- Stretch
Direction
type Direction is (Horizontal, Vertical);
Enumeration literals
- Horizontal
- Vertical
Fill_Size
function Fill_Size (Weight : Positive := 1) return Constraint
Parameters
- Weight
Return value
Fixed_Size
function Fixed_Size (Cells : Natural) return Constraint
Parameters
- Cells
Return value
Frame
function Frame
(Item : Layout_Result) return Flyology_TUI.Surfaces.Surface
Parameters
- Item
Return value
Horizontally
function Horizontally
(Items : Surface_Array;
Constraints : Constraint_Array;
Width : Natural;
Height : Natural;
Gap : Natural := 0;
Alignment : Cross_Axis_Alignment := Stretch) return Layout_Result
Parameters
- Items
- Constraints
- Width
- Height
- Gap
- Alignment
Return value
Layout_Result
type Layout_Result (Item_Count : Natural) is tagged private;
Record fields
- Item_Count
Region
function Region
(Item : Layout_Result;
Index : Positive) return Flyology_TUI.Geometry.Rectangle
Parameters
- Item
- Index
Return value
Surface_Array
type Surface_Array is
array (Positive range <>) of Flyology_TUI.Surfaces.Surface;
Vertically
function Vertically
(Items : Surface_Array;
Constraints : Constraint_Array;
Width : Natural;
Height : Natural;
Gap : Natural := 0;
Alignment : Cross_Axis_Alignment := Stretch) return Layout_Result
Parameters
- Items
- Constraints
- Width
- Height
- Gap
- Alignment