Package ch.bailu.gtk.gtk
Class BoxLayout
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.gtk.LayoutManager
ch.bailu.gtk.gtk.BoxLayout
- All Implemented Interfaces:
PointerInterface
`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.
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Field Summary
Fields inherited from class ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Constructor Summary
ConstructorDescriptionBoxLayout
(int orientation) Creates a new `GtkBoxLayout`.BoxLayout
(PointerContainer pointer) -
Method Summary
Modifier and TypeMethodDescriptionImplements interfaceOrientable
.int
Gets the value set by gtk_box_layout_set_baseline_position().static ClassHandler
boolean
Returns whether the layout is set to be homogeneous.static int
static long
static TypeSystem.TypeSize
int
Returns the space that @box_layout puts between children.static long
static TypeSystem.TypeSize
void
setBaselinePosition
(int position) Sets the baseline position of a box layout.void
setHomogeneous
(boolean homogeneous) Sets whether the box layout will allocate the same
size to all children.void
setSpacing
(int spacing) Sets how much spacing to put between children.Methods inherited from class ch.bailu.gtk.gtk.LayoutManager
allocate, getLayoutChild, getRequestMode, getWidget, layoutChanged, measure
Methods inherited from class ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Methods inherited from class ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Methods inherited from class ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Constructor Details
-
BoxLayout
-
BoxLayout
public BoxLayout(int orientation) Creates a new `GtkBoxLayout`.- Parameters:
orientation
- the orientation for the new layout
-
-
Method Details
-
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
Implements interfaceOrientable
. Call this to get access to interface functions.- Returns:
Orientable
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-