Package ch.bailu.gtk.gtk
Class GridLayout
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.GridLayout
- All Implemented Interfaces:
PointerInterface
`GtkGridLayout` is a layout manager which arranges child widgets in
rows and columns.
Children have an "attach point" defined by the horizontal and vertical
index of the cell they occupy; children can span multiple rows or columns.
The layout properties for setting the attach points and spans are set
using the [class@Gtk.GridLayoutChild] associated to each child widget.
The behaviour of `GtkGridLayout` when several children occupy the same
grid cell is undefined.
`GtkGridLayout` can be used like a `GtkBoxLayout` if all children are
attached to the same row or column; however, if you only ever need a
single row or column, you should consider using `GtkBoxLayout`.
rows and columns.
Children have an "attach point" defined by the horizontal and vertical
index of the cell they occupy; children can span multiple rows or columns.
The layout properties for setting the attach points and spans are set
using the [class@Gtk.GridLayoutChild] associated to each child widget.
The behaviour of `GtkGridLayout` when several children occupy the same
grid cell is undefined.
`GtkGridLayout` can be used like a `GtkBoxLayout` if all children are
attached to the same row or column; however, if you only ever need a
single row or column, you should consider using `GtkBoxLayout`.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionint
Retrieves the row set with gtk_grid_layout_set_baseline_row().static ClassHandler
boolean
Checks whether all columns of @grid should have the same width.int
Retrieves the spacing set with gtk_grid_layout_set_column_spacing().static int
static long
static TypeSystem.TypeSize
int
getRowBaselinePosition
(int row) Returns the baseline position of @row.boolean
Checks whether all rows of @grid should have the same height.int
Retrieves the spacing set with gtk_grid_layout_set_row_spacing().static long
static TypeSystem.TypeSize
void
setBaselineRow
(int row) Sets which row defines the global baseline for the entire grid.void
setColumnHomogeneous
(boolean homogeneous) Sets whether all columns of @grid should have the same width.void
setColumnSpacing
(int spacing) Sets the amount of space to insert between consecutive columns.void
setRowBaselinePosition
(int row, int pos) Sets how the baseline should be positioned on @row of the
grid, in case that row is assigned more space than is requested.void
setRowHomogeneous
(boolean homogeneous) Sets whether all rows of @grid should have the same height.void
setRowSpacing
(int spacing) Sets the amount of space to insert between consecutive rows.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
-
GridLayout
-
GridLayout
public GridLayout()Creates a new `GtkGridLayout`.
-
-
Method Details
-
getClassHandler
-
getBaselineRow
public int getBaselineRow()Retrieves the row set with gtk_grid_layout_set_baseline_row().- Returns:
- the global baseline row
-
getColumnHomogeneous
public boolean getColumnHomogeneous()Checks whether all columns of @grid should have the same width.- Returns:
- %TRUE if the columns are homogeneous, and %FALSE otherwise
-
getColumnSpacing
public int getColumnSpacing()Retrieves the spacing set with gtk_grid_layout_set_column_spacing().- Returns:
- the spacing between consecutive columns
-
getRowBaselinePosition
public int getRowBaselinePosition(int row) Returns the baseline position of @row.
If no value has been set with
[method@Gtk.GridLayout.set_row_baseline_position],
the default value of %GTK_BASELINE_POSITION_CENTER
is returned.- Parameters:
row
- a row index- Returns:
- the baseline position of @row
-
getRowHomogeneous
public boolean getRowHomogeneous()Checks whether all rows of @grid should have the same height.- Returns:
- %TRUE if the rows are homogeneous, and %FALSE otherwise
-
getRowSpacing
public int getRowSpacing()Retrieves the spacing set with gtk_grid_layout_set_row_spacing().- Returns:
- the spacing between consecutive rows
-
setBaselineRow
public void setBaselineRow(int row) Sets which row defines the global baseline for the entire grid.
Each row in the grid can have its own local baseline, but only
one of those is global, meaning it will be the baseline in the
parent of the @grid.- Parameters:
row
- the row index
-
setColumnHomogeneous
public void setColumnHomogeneous(boolean homogeneous) Sets whether all columns of @grid should have the same width.- Parameters:
homogeneous
- %TRUE to make columns homogeneous
-
setColumnSpacing
public void setColumnSpacing(int spacing) Sets the amount of space to insert between consecutive columns.- Parameters:
spacing
- the amount of space between columns, in pixels
-
setRowBaselinePosition
public void setRowBaselinePosition(int row, int pos) Sets how the baseline should be positioned on @row of the
grid, in case that row is assigned more space than is requested.- Parameters:
row
- a row indexpos
- a `GtkBaselinePosition`
-
setRowHomogeneous
public void setRowHomogeneous(boolean homogeneous) Sets whether all rows of @grid should have the same height.- Parameters:
homogeneous
- %TRUE to make rows homogeneous
-
setRowSpacing
public void setRowSpacing(int spacing) Sets the amount of space to insert between consecutive rows.- Parameters:
spacing
- the amount of space between rows, in pixels
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-