gtk.grid
Module for [Grid] class
Types 3
GtkGrid is a container which arranges its child widgets in rows and columns, with arbitrary positions and horizontal/vertical spans.
Children are added using gtk.grid.Grid.attach. They can span multiple rows or columns. It is also possible to add a child next to an existing child, using gtk.grid.Grid.attachNextTo. The behaviour of GtkGrid when several children occupy the same grid cell is undefined.
GtkGrid can be used like a #GtkBox by just using gtk.container.Container.add, which will place children next to each other in the direction determined by the #GtkOrientable:orientation property. However, if all you want is a single row or column, then #GtkBox is the preferred widget.
CSS nodes
GtkGrid uses a single CSS node with name grid.
void attach(gtk.widget.Widget child, int left, int top, int width, int height) nothrowAdds a widget to the grid.void attachNextTo(gtk.widget.Widget child, gtk.widget.Widget sibling, gtk.types.PositionType side, int width, int height) nothrowAdds a widget to the grid.int getBaselineRow() nothrowReturns which row defines the global baseline of grid. Returns: the row index defining the global baselinegtk.widget.Widget getChildAt(int left, int top) nothrowGets the child of grid whose area covers the grid cell whose upper left corner is at left, top.bool getColumnHomogeneous() nothrowReturns whether all columns of grid have the same width. Returns: whether all columns of grid have the same width.uint getColumnSpacing() nothrowReturns the amount of space between the columns of grid. Returns: the column spacing of gridgtk.types.BaselinePosition getRowBaselinePosition(int row) nothrowReturns the baseline position of row as set by [gtk.grid.Grid.setRowBaselinePosition] or the default value [gtk.types.BaselinePosition.Center].bool getRowHomogeneous() nothrowReturns whether all rows of grid have the same height. Returns: whether all rows of grid have the same height.uint getRowSpacing() nothrowReturns the amount of space between the rows of grid. Returns: the row spacing of gridvoid insertNextTo(gtk.widget.Widget sibling, gtk.types.PositionType side) nothrowInserts a row or column at the specified position.void setBaselineRow(int row) nothrowSets 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 ...void setColumnHomogeneous(bool homogeneous) nothrowSets whether all columns of grid will have the same width.void setRowBaselinePosition(int row, gtk.types.BaselinePosition pos) nothrowSets how the baseline should be positioned on row of the grid, in case that row is assigned more space than is requested.void setRowHomogeneous(bool homogeneous) nothrowSets whether all rows of grid will have the same height.Fluent builder implementation template for gtk.grid.Grid
T baselineRow(int propval) nothrowT columnHomogeneous(bool propval) nothrowT columnSpacing(int propval) nothrowT rowHomogeneous(bool propval) nothrowT rowSpacing(int propval) nothrowFluent builder for gtk.grid.Grid