Trait gtk::prelude::GridExt[][src]

pub trait GridExt: 'static {
Show methods fn attach<P: IsA<Widget>>(
        &self,
        child: &P,
        left: i32,
        top: i32,
        width: i32,
        height: i32
    );
fn attach_next_to<P: IsA<Widget>, Q: IsA<Widget>>(
        &self,
        child: &P,
        sibling: Option<&Q>,
        side: PositionType,
        width: i32,
        height: i32
    );
fn baseline_row(&self) -> i32;
fn child_at(&self, left: i32, top: i32) -> Option<Widget>;
fn is_column_homogeneous(&self) -> bool;
fn column_spacing(&self) -> u32;
fn row_baseline_position(&self, row: i32) -> BaselinePosition;
fn is_row_homogeneous(&self) -> bool;
fn row_spacing(&self) -> u32;
fn insert_column(&self, position: i32);
fn insert_next_to<P: IsA<Widget>>(&self, sibling: &P, side: PositionType);
fn insert_row(&self, position: i32);
fn remove_column(&self, position: i32);
fn remove_row(&self, position: i32);
fn set_baseline_row(&self, row: i32);
fn set_column_homogeneous(&self, homogeneous: bool);
fn set_column_spacing(&self, spacing: u32);
fn set_row_baseline_position(&self, row: i32, pos: BaselinePosition);
fn set_row_homogeneous(&self, homogeneous: bool);
fn set_row_spacing(&self, spacing: u32);
fn cell_height<T: IsA<Widget>>(&self, item: &T) -> i32;
fn set_cell_height<T: IsA<Widget>>(&self, item: &T, height: i32);
fn cell_width<T: IsA<Widget>>(&self, item: &T) -> i32;
fn set_cell_width<T: IsA<Widget>>(&self, item: &T, width: i32);
fn cell_left_attach<T: IsA<Widget>>(&self, item: &T) -> i32;
fn set_cell_left_attach<T: IsA<Widget>>(&self, item: &T, left_attach: i32);
fn cell_top_attach<T: IsA<Widget>>(&self, item: &T) -> i32;
fn set_cell_top_attach<T: IsA<Widget>>(&self, item: &T, top_attach: i32);
fn connect_baseline_row_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_column_homogeneous_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_column_spacing_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_row_homogeneous_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_row_spacing_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all Grid methods.

Implementors

Grid

Required methods

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.

child

the widget to add

left

the column number to attach the left side of child to

top

the row number to attach the top side of child to

width

the number of columns that child will span

height

the number of rows that child will span

Adds a widget to the grid.

The widget is placed next to sibling, on the side determined by side. When sibling is None, 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 == None and side == PositionType::Left yields a layout of [3][2][1].

child

the widget to add

sibling

the child of self that child will be placed next to, or None to place child at the beginning or end

side

the side of sibling that child is positioned next to

width

the number of columns that child will span

height

the number of rows that child will span

Returns which row defines the global baseline of self.

Returns

the row index defining the global baseline

Gets the child of self whose area covers the grid cell whose upper left corner is at left, top.

left

the left edge of the cell

top

the top edge of the cell

Returns

the child at the given position, or None

Returns whether all columns of self have the same width.

Returns

whether all columns of self have the same width.

Returns the amount of space between the columns of self.

Returns

the column spacing of self

Returns the baseline position of row as set by set_row_baseline_position() or the default value BaselinePosition::Center.

row

a row index

Returns

the baseline position of row

Returns whether all rows of self have the same height.

Returns

whether all rows of self have the same height.

Returns the amount of space between the rows of self.

Returns

the row spacing of self

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.

position

the position to insert the column at

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 PositionType::Top or PositionType::Bottom, a row is inserted. If side is PositionType::Left of PositionType::Right, a column is inserted.

sibling

the child of self that the new row or column will be placed next to

side

the side of sibling that child is positioned next to

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.

position

the position to insert the row at

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.

position

the position of the column to remove

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.

position

the position of the row to remove

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

row

the row index

Sets whether all columns of self will have the same width.

homogeneous

true to make columns homogeneous

Sets the amount of space between columns of self.

spacing

the amount of space to insert between columns

Sets how the baseline should be positioned on row of the grid, in case that row is assigned more space than is requested.

row

a row index

pos

a BaselinePosition

Sets whether all rows of self will have the same height.

homogeneous

true to make rows homogeneous

Sets the amount of space between rows of self.

spacing

the amount of space to insert between rows

Implementors