Arranges children in a single row or column.
Whether it is a row or column depends on the value of its [propertyGtk.Orientable:orientation] property. Within the other dimension all children all allocated the same size. The GtkBoxLayout will respect the [propertyGtk.Widget:halign] and [propertyGtk.Widget:valign] properties of each child widget.
If you want all children to be assigned the same size, you can use the [propertyGtk.BoxLayout:homogeneous] property.
If you want to specify the amount of space placed between each child, you can use the [propertyGtk.BoxLayout:spacing] property.
<group>Layout containers</group>
function "+"
(Widget : access Gtk_Box_Layout_Record'Class)
return Gtk.Orientable.Gtk_Orientable
function "-"
(Interf : Gtk.Orientable.Gtk_Orientable)
return Gtk_Box_Layout
Baseline_Child_Property : constant Glib.Properties.Property_Int;
The child that determines the baseline of the box in vertical layout.
If the child does baseline positioning, then its baseline is lined up with the baseline of the box. If it doesn't, then the bottom edge of the child is used.
Baseline_Position_Property : constant Gtk.Enums.Property_Gtk_Baseline_Position;
The position of the allocated baseline within the extra space allocated to each child.
This property is only relevant for horizontal layouts containing at least one child with a baseline alignment.
function Get_Baseline_Child
(Box_Layout : not null access Gtk_Box_Layout_Record) return Glib.Gint
Gets the value set by Gtk.Box_Layout.Set_Baseline_Child. Since: gtk+ 4.12
the index of the child that determines the baseline in vertical layout, or -1
function Get_Baseline_Position
(Box_Layout : not null access Gtk_Box_Layout_Record)
return Gtk.Enums.Gtk_Baseline_Position
Gets the value set by Gtk.Box_Layout.Set_Baseline_Position.
the baseline position
function Get_Homogeneous
(Box_Layout : not null access Gtk_Box_Layout_Record) return Boolean
Returns whether the layout is set to be homogeneous.
True if the layout is homogeneous
function Get_Orientation
(Self : not null access Gtk_Box_Layout_Record)
return Gtk.Enums.Gtk_Orientation
function Get_Spacing
(Box_Layout : not null access Gtk_Box_Layout_Record) return Guint
Returns the space that Box_Layout puts between children.
the spacing of the layout
function Get_Type return Glib.GType
type Gtk_Box_Layout is access all Gtk_Box_Layout_Record'Class;
function Gtk_Box_Layout_New
(Orientation : Gtk.Enums.Gtk_Orientation) return Gtk_Box_Layout
Creates a new GtkBoxLayout.
the orientation for the new layout
type Gtk_Box_Layout_Record is new Gtk_Layout_Manager_Record with null record;
procedure Gtk_New
(Box_Layout : out Gtk_Box_Layout;
Orientation : Gtk.Enums.Gtk_Orientation)
Creates a new GtkBoxLayout. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
the orientation for the new layout
Homogeneous_Property : constant Glib.Properties.Property_Boolean;
Whether the box layout should distribute the available space equally among the children.
package Implements_Gtk_Orientable is new Glib.Types.Implements
(Gtk.Orientable.Gtk_Orientable, Gtk_Box_Layout_Record, Gtk_Box_Layout);
procedure Initialize
(Box_Layout : not null access Gtk_Box_Layout_Record'Class;
Orientation : Gtk.Enums.Gtk_Orientation)
Creates a new GtkBoxLayout. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
the orientation for the new layout
procedure Set_Baseline_Child
(Box_Layout : not null access Gtk_Box_Layout_Record;
Child : Glib.Gint)
Sets the index of the child that determines the baseline in vertical layout. Since: gtk+ 4.12
the child position, or -1
procedure Set_Baseline_Position
(Box_Layout : not null access Gtk_Box_Layout_Record;
Position : Gtk.Enums.Gtk_Baseline_Position)
Sets the baseline position of a box layout. The baseline position affects only horizontal boxes with at least one baseline aligned child. If there is more vertical space available than requested, and the baseline is not allocated by the parent then the given Position is used to allocate the baseline within the extra space available.
a GtkBaselinePosition
procedure Set_Homogeneous
(Box_Layout : not null access Gtk_Box_Layout_Record;
Homogeneous : Boolean)
Sets whether the box layout will allocate the same size to all children.
True to set the box layout as homogeneous
procedure Set_Orientation
(Self : not null access Gtk_Box_Layout_Record;
Orientation : Gtk.Enums.Gtk_Orientation)
procedure Set_Spacing
(Box_Layout : not null access Gtk_Box_Layout_Record;
Spacing : Guint)
Sets how much spacing to put between children.
the spacing to apply between children
Spacing_Property : constant Glib.Properties.Property_Int;
The space to put between the children.