package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Grid/index.html
Module Wrappers.Grid
type t = [ `grid | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new Grid
val set_row_spacing : t -> int -> unitSets the amount of space between rows of @grid.
val set_row_homogeneous : t -> bool -> unitSets whether all rows of @grid will have the same height.
val set_row_baseline_position : t -> int -> Gtk_enums.baselineposition -> unitSets how the baseline should be positioned on @row of the grid, in case that row is assigned more space than is requested.
The default baseline position is %GTK_BASELINE_POSITION_CENTER.
val set_column_spacing : t -> int -> unitSets the amount of space between columns of @grid.
val set_column_homogeneous : t -> bool -> unitSets whether all columns of @grid will have the same width.
val set_baseline_row : t -> int -> unitSets 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.
val remove_row : t -> int -> unitRemoves a row from the grid.
Children that are placed in this row are removed, spanning children that overlap this row have their height reduced by one, and children below the row are moved up.
val remove_column : t -> int -> unitRemoves a column from the grid.
Children that are placed in this column are removed, spanning children that overlap this column have their width reduced by one, and children after the column are moved to the left.
val remove :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
unitRemoves a child from @grid.
The child must have been added with method@Gtk.Grid.attach or method@Gtk.Grid.attach_next_to.
val query_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
int * int * int * intQueries the attach points and spans of @child inside the given `GtkGrid`.
val insert_row : t -> int -> unitInserts a row at the specified position.
Children which are attached at or below this position are moved one row down. Children which span across this position are grown to span the new row.
val insert_next_to :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
Gtk_enums.positiontype ->
unitInserts a row or column at the specified position.
The new row or column is placed next to @sibling, on the side determined by @side. If @side is %GTK_POS_TOP or %GTK_POS_BOTTOM, a row is inserted. If @side is %GTK_POS_LEFT of %GTK_POS_RIGHT, a column is inserted.
val insert_column : t -> int -> unitInserts a column at the specified position.
Children which are attached at or to the right of this position are moved one column to the right. Children which span across this position are grown to span the new column.
val get_row_spacing : t -> intReturns the amount of space between the rows of @grid.
val get_row_homogeneous : t -> boolReturns whether all rows of @grid have the same height.
val get_row_baseline_position : t -> int -> Gtk_enums.baselinepositionReturns the baseline position of @row.
See method@Gtk.Grid.set_row_baseline_position.
val get_column_spacing : t -> intReturns the amount of space between the columns of @grid.
val get_column_homogeneous : t -> boolReturns whether all columns of @grid have the same width.
val get_child_at :
t ->
int ->
int ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionGets the child of @grid whose area covers the grid cell at @column, @row.
val get_baseline_row : t -> intReturns which row defines the global baseline of @grid.
val attach_next_to :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
Gtk_enums.positiontype ->
int ->
int ->
unitAdds a widget to the grid.
The widget is placed next to @sibling, on the side determined by @side. When @sibling is %NULL, the widget is placed in row (for left or right placement) or column 0 (for top or bottom placement), at the end indicated by @side.
Attaching widgets labeled `1`, `2`, `3` with `@sibling == %NULL` and `@side == %GTK_POS_LEFT` yields a layout of `321`.
val attach :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj ->
int ->
int ->
int ->
int ->
unitAdds a widget to the grid.
The position of @child is determined by @column and @row. The number of “cells” that @child will occupy is determined by @width and @height.