Class BoxLayout

All Implemented Interfaces:
PointerInterface

public class BoxLayout extends LayoutManager
`GtkBoxLayout` is a layout manager that arranges children in a single
row or column.

Whether it is a row or column depends on the value of its
[property@Gtk.Orientable:orientation] property. Within the other dimension
all children all allocated the same size. The `GtkBoxLayout` will respect
the [property@Gtk.Widget:halign] and [property@Gtk.Widget:valign]
properties of each child widget.

If you want all children to be assigned the same size, you can use
the [property@Gtk.BoxLayout:homogeneous] property.

If you want to specify the amount of space placed between each child,
you can use the [property@Gtk.BoxLayout:spacing] property.

https://docs.gtk.org/gtk4/class.BoxLayout.html

  • Constructor Details

    • BoxLayout

      public BoxLayout(PointerContainer pointer)
    • BoxLayout

      public BoxLayout(int orientation)
      Creates a new `GtkBoxLayout`.
      Parameters:
      orientation - the orientation for the new layout
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getBaselinePosition

      public int getBaselinePosition()
      Gets the value set by gtk_box_layout_set_baseline_position().
      Returns:
      the baseline position
    • getHomogeneous

      public boolean getHomogeneous()
      Returns whether the layout is set to be homogeneous.
      Returns:
      %TRUE if the layout is homogeneous
    • getSpacing

      public int getSpacing()
      Returns the space that @box_layout puts between children.
      Returns:
      the spacing of the layout
    • setBaselinePosition

      public void setBaselinePosition(int 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.
      Parameters:
      position - a `GtkBaselinePosition`
    • setHomogeneous

      public void setHomogeneous(boolean homogeneous)
      Sets whether the box layout will allocate the same
      size to all children.
      Parameters:
      homogeneous - %TRUE to set the box layout as homogeneous
    • setSpacing

      public void setSpacing(int spacing)
      Sets how much spacing to put between children.
      Parameters:
      spacing - the spacing to apply between children
    • asOrientable

      public Orientable asOrientable()
      Implements interface Orientable. Call this to get access to interface functions.
      Returns:
      Orientable
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()