package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Grid

type t = [ `grid | `widget | `initially_unowned | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new Grid

val set_row_spacing : t -> int -> unit

Sets the amount of space between rows of @grid.

val set_row_homogeneous : t -> bool -> unit

Sets whether all rows of @grid will have the same height.

val set_row_baseline_position : t -> int -> Gtk_enums.baselineposition -> unit

Sets 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 -> unit

Sets the amount of space between columns of @grid.

val set_column_homogeneous : t -> bool -> unit

Sets whether all columns of @grid will have the same width.

val set_baseline_row : t -> int -> unit

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.

val remove_row : t -> int -> unit

Removes 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 -> unit

Removes 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 -> unit

Removes 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 * int

Queries the attach points and spans of @child inside the given `GtkGrid`.

val insert_row : t -> int -> unit

Inserts 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 -> unit

Inserts 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 -> unit

Inserts 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 -> int

Returns the amount of space between the rows of @grid.

val get_row_homogeneous : t -> bool

Returns whether all rows of @grid have the same height.

val get_row_baseline_position : t -> int -> Gtk_enums.baselineposition

Returns the baseline position of @row.

See method@Gtk.Grid.set_row_baseline_position.

val get_column_spacing : t -> int

Returns the amount of space between the columns of @grid.

val get_column_homogeneous : t -> bool

Returns whether all columns of @grid have the same width.

val get_child_at : t -> int -> int -> [ `widget | `initially_unowned | `object_ ] Gobject.obj option

Gets the child of @grid whose area covers the grid cell at @column, @row.

val get_baseline_row : t -> int

Returns 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 -> unit

Adds 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 -> unit

Adds 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.