Index

Package: Layouts

Description

private package Widgets.Layouts is

Classes

Layout_Center

type Layout_Center is new Layout with private;

Ancestors:

Widgets.Layout

Primitive operations:

Apply (overriding Widgets.Apply)
Construct
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)
Centers the widget with the given size within the parent.

Layout_CenterH

type Layout_CenterH is new Layout with private;

Ancestors:

Widgets.Layout

Primitive operations:

Apply (overriding Widgets.Apply)
Construct
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)
Centers the widget with the given width horizontally within the parent. Top and bottom are distances relative to the top and bottom edges of the parent. width +---------------+ +-----------------------+ + + | | | top | -bottom | | | | | +---------------+ | + | + | | | | | | | +---------------+ | + + | | | | | -top | | | bottom | | | | | +-----------------------+ + +

Layout_CenterHY

type Layout_CenterHY is new Layout with private;

Ancestors:

Widgets.Layout

Primitive operations:

Apply (overriding Widgets.Apply)
Construct
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)
Centers the widget with the given width horizontally within the parent, using absolute vertical positioning. width +---------------+ +-----------------------+ + + | | | y1 | | +---------------+ | + | y2 | | | | | | +---------------+ | + | | | | +-----------------------+

Layout_LTRB

type Layout_LTRB is new Layout with private;

Ancestors:

Widgets.Layout

Primitive operations:

Apply (overriding Widgets.Apply)
Construct
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)
Positions the widget using offsets from the parent's edges; left, top, right, and bottom. -left +----------------+ -right +--------------+ left right +------+ +--------+ +-----------------------+ + + | | | top | -bottom | +-------+ | + | + | | | | | | | +-------+ | + + | | | | bottom | -top | | | | +-----------------------+ + +

Layout_LTWH

type Layout_LTWH is new Layout with private;

Ancestors:

Widgets.Layout

Primitive operations:

Apply (overriding Widgets.Apply)
Construct
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)
Positions the widget using offsets from the parent's top left and sized using the given width and height. width left +-------+ -left +------+ +--------+ +-----------------------+ + | | | top | +-------+ | + + | | | | | height | +-------+ | + + | | | | | | -top +-----------------------+ +

Layout_XYWH

type Layout_XYWH is new Layout with private;

Ancestors:

Widgets.Layout

Primitive operations:

Apply (overriding Widgets.Apply)
Construct
Objects.Adjust (Inherited)
Objects.Construct (Inherited)
Objects.Delete (Inherited)
Objects.Object_Read (Inherited)
Objects.Object_Write (Inherited)
Objects.To_String (Inherited)
Positions the widget's top left corner using offsets from the container's top left, and sized using the given width and height. This layout is identical to Layout_LTWH for non-negative offsets. width x +-------+ +------+ +-----------------------+ + | | | y | +-------+ | + + | | | | | height | +-------+ | + | | | | +-----------------------+

Subprograms & Entries

Create_Layout_Center

function Create_Layout_Center
( width, height: Natural ) return A_Layout;
Creates a Layout_Center. If 'width' or 'height' is 0 then the widget's minimum width or height, respectively, will be used. width +----------+ +----------------------+ | | | +----------+ | + | | | | | height | +----------+ | + | | +----------------------+

Create_Layout_CenterH

function Create_Layout_CenterH
( width: Natural;
top, bottom: Integer ) return A_Layout;
Creates a Layout_CenterH. If 'top' < 0 then the widget's top will be offset from the bottom of its container instead of the top. If 'bottom' < 0 then the widget's bottom will be offset from the top of its container, instead of the the bottom.

Create_Layout_CenterHY

function Create_Layout_CenterHY
( width: Natural;
y1, y2: Integer ) return A_Layout;
Creates a Layout_CenterHY. If 'width' is 0 the widget's minimum width will be used. 'y1' is an absolute value within the parent's content region for the top of the widget and 'y2' is the absolute location of the bottom of the widget. If 'y1' or 'y2' is negative, then part of the widget will lie outside of its container's content region.

Create_Layout_LTRB

function Create_Layout_LTRB
( left, top, right, bottom: Integer ) return A_Layout;
Creates a Layout_LTRB. 'left', 'top', 'right', and 'bottom' are distances from the container's corresponding edge. If the value is negative, the distance will be relative to the opposite side. For example, if 'top' is negative then the widget's top will be offset from the container's bottom edge.

Create_Layout_LTWH

function Create_Layout_LTWH
( left, top: Integer;
width, height: Natural ) return A_Layout;
Creates a Layout_LTWH. 'left' and 'top' are offsets from the container's corresponding edge. Negative values for 'top' and 'left' are retreated as relative to the bottom and right, respectively. If 'width' or 'height' is 0 then the widget's minimum width or height, respectively, will be used. For example, a negative value for 'top' indicates the offset of the bottom of the widget from its container's bottom.

Create_Layout_XYWH

function Create_Layout_XYWH
( x, y: Integer;
width, height: Natural ) return A_Layout;
Creates a Layout_XYWH. 'x' and 'y' are the absolute position of the top left corner of the widget, relative to the top left corner of the container. For negative values of 'x' or 'y', the widget will partially lie outside the content region of its container. If 'width' or 'height' is 0 then the widget's minimum width or height, respectively, will be used.

Delete

procedure Delete
( this: in out A_Layout );
Deletes the Layout.