Class: Gtk::Grid
- Inherits:
-
Object
- Object
- Gtk::Grid
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#attach(child, left, top, width, height) ⇒ nil
Adds a widget to the grid.
-
#attach_next_to(child, sibling, side, width, height) ⇒ nil
Adds a widget to the grid.
-
#baseline_row ⇒ Integer
Baseline-row.
- #baseline_row=(baseline_row) ⇒ Integer
-
#column_homogeneous ⇒ TrueClass
Returns whether all columns of grid have the same width.
- #column_homogeneous=(column_homogeneous) ⇒ TrueClass
-
#column_homogeneous? ⇒ TrueClass
Column-homogeneous.
-
#column_spacing ⇒ Integer
Column-spacing.
- #column_spacing=(column_spacing) ⇒ Integer
-
#get_child_at(left, top) ⇒ Gtk::Widget
Gets the child of grid whose area covers the grid cell whose upper left corner is at left, top.
-
#get_row_baseline_position(row) ⇒ Gtk::BaselinePosition
Returns the baseline position of row as set by gtk_grid_set_row_baseline_position() or the default value %GTK_BASELINE_POSITION_CENTER.
-
#insert_column(position) ⇒ nil
Inserts a column at the specified position.
-
#insert_next_to(sibling, side) ⇒ nil
Inserts a row or column at the specified position.
-
#insert_row(position) ⇒ nil
Inserts a row at the specified position.
-
#new ⇒ Gtk::Widget
Creates a new grid widget.
-
#remove_column(position) ⇒ nil
Removes a column from the grid.
-
#remove_row(position) ⇒ nil
Removes a row from the grid.
-
#row_homogeneous ⇒ TrueClass
Returns whether all rows of grid have the same height.
- #row_homogeneous=(row_homogeneous) ⇒ TrueClass
-
#row_homogeneous? ⇒ TrueClass
Row-homogeneous.
-
#row_spacing ⇒ Integer
Row-spacing.
- #row_spacing=(row_spacing) ⇒ Integer
-
#set_row_baseline_position(row, pos) ⇒ nil
Sets how the baseline should be positioned on row of the grid, in case that row is assigned more space than is requested.
Instance Method Details
#attach(child, left, top, width, height) ⇒ nil
Adds a widget to the grid.
The position of child is determined by left and top. The number of “cells” that child will occupy is determined by width and height.
#attach_next_to(child, sibling, side, width, height) ⇒ nil
Adds a widget to the grid.
The widget is placed next to sibling, on the side determined by side. When sibling is nil, 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 == nil and side == %GTK_POS_LEFT yields a layout of [3][1].
#baseline_row ⇒ Integer
Returns baseline-row.
#baseline_row=(baseline_row) ⇒ Integer
#column_homogeneous ⇒ TrueClass
Returns whether all columns of grid have the same width.
#column_homogeneous=(column_homogeneous) ⇒ TrueClass
#column_homogeneous? ⇒ TrueClass
Returns column-homogeneous.
#column_spacing ⇒ Integer
Returns column-spacing.
#column_spacing=(column_spacing) ⇒ Integer
#get_child_at(left, top) ⇒ Gtk::Widget
Gets the child of grid whose area covers the grid cell whose upper left corner is at left, top.
#get_row_baseline_position(row) ⇒ Gtk::BaselinePosition
Returns the baseline position of row as set by gtk_grid_set_row_baseline_position() or the default value %GTK_BASELINE_POSITION_CENTER.
#insert_column(position) ⇒ nil
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.
#insert_next_to(sibling, side) ⇒ nil
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.
#insert_row(position) ⇒ nil
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.
#new ⇒ Gtk::Widget
Creates a new grid widget.
#remove_column(position) ⇒ nil
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.
#remove_row(position) ⇒ nil
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.
#row_homogeneous ⇒ TrueClass
Returns whether all rows of grid have the same height.
#row_homogeneous=(row_homogeneous) ⇒ TrueClass
#row_homogeneous? ⇒ TrueClass
Returns row-homogeneous.
#row_spacing ⇒ Integer
Returns row-spacing.
#row_spacing=(row_spacing) ⇒ Integer
#set_row_baseline_position(row, pos) ⇒ nil
Sets how the baseline should be positioned on row of the grid, in case that row is assigned more space than is requested.