BoxLayout

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.

Constructors

this
this(GtkBoxLayout* gtkBoxLayout, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this(GtkOrientation orientation)

Creates a new GtkBoxLayout.

Members

Functions

getBaselinePosition
GtkBaselinePosition getBaselinePosition()

Gets the value set by gtk_box_layout_set_baseline_position().

getBoxLayoutStruct
GtkBoxLayout* getBoxLayoutStruct(bool transferOwnership)

Get the main Gtk struct

getHomogeneous
bool getHomogeneous()

Returns whether the layout is set to be homogeneous.

getSpacing
uint getSpacing()

Returns the space that @box_layout puts between children.

getStruct
void* getStruct()

the main Gtk struct as a void*

setBaselinePosition
void setBaselinePosition(GtkBaselinePosition position)

Sets the baseline position of a box layout.

setHomogeneous
void setHomogeneous(bool homogeneous)

Sets whether the box layout will allocate the same size to all children.

setSpacing
void setSpacing(uint spacing)

Sets how much spacing to put between children.

Mixins

__anonymous
mixin OrientableT!(GtkBoxLayout)
Undocumented in source.

Static functions

getType
GType getType()

Variables

gtkBoxLayout
GtkBoxLayout* gtkBoxLayout;

the main Gtk struct

Inherited Members

From LayoutManager

gtkLayoutManager
GtkLayoutManager* gtkLayoutManager;

the main Gtk struct

getLayoutManagerStruct
GtkLayoutManager* getLayoutManagerStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
allocate
void allocate(Widget widget, int width, int height, int baseline)

Assigns the given @width, @height, and @baseline to a @widget, and computes the position and sizes of the children of the @widget using the layout management policy of @manager.

getLayoutChild
LayoutChild getLayoutChild(Widget child)

Retrieves a GtkLayoutChild instance for the GtkLayoutManager, creating one if necessary.

getRequestMode
GtkSizeRequestMode getRequestMode()

Retrieves the request mode of @manager.

getWidget
Widget getWidget()

Retrieves the GtkWidget using the given GtkLayoutManager.

layoutChanged
void layoutChanged()

Queues a resize on the GtkWidget using @manager, if any.

measure
void measure(Widget widget, GtkOrientation orientation, int forSize, int minimum, int natural, int minimumBaseline, int naturalBaseline)

Measures the size of the @widget using @manager, for the given @orientation and size.

From OrientableIF

getOrientableStruct
GtkOrientable* getOrientableStruct(bool transferOwnership)

Get the main Gtk struct

getStruct
void* getStruct()

the main Gtk struct as a void*

getType
GType getType()
getOrientation
GtkOrientation getOrientation()

Retrieves the orientation of the @orientable.

setOrientation
void setOrientation(GtkOrientation orientation)

Sets the orientation of the @orientable.

Meta