Trait libpanel::prelude::GridExt

source ·
pub trait GridExt: 'static {
    // Required methods
    fn add(&self, widget: &impl IsA<Widget>);
    fn agree_to_close_async<P: FnOnce(Result<(), Error>) + 'static>(
        &self,
        cancellable: Option<&impl IsA<Cancellable>>,
        callback: P
    );
    fn agree_to_close_future(
        &self
    ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>;
    fn foreach_frame<P: FnMut(&Frame)>(&self, callback: P);
    fn column(&self, column: u32) -> GridColumn;
    fn most_recent_column(&self) -> GridColumn;
    fn most_recent_frame(&self) -> Frame;
    fn n_columns(&self) -> u32;
    fn insert_column(&self, position: u32);
    fn connect_create_frame<F: Fn(&Self) -> Frame + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
}
Expand description

Trait containing all Grid methods.

Implementors

Grid

Required Methods§

source

fn add(&self, widget: &impl IsA<Widget>)

Add a Widget to the grid.

widget

a Widget the widget to add.

source

fn agree_to_close_async<P: FnOnce(Result<(), Error>) + 'static>( &self, cancellable: Option<&impl IsA<Cancellable>>, callback: P )

Request to close, asynchronously. This will display the save dialog.

callback

callback called when ready

source

fn agree_to_close_future( &self ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>

source

fn foreach_frame<P: FnMut(&Frame)>(&self, callback: P)

Calls callback for each Frame within grid.

callback

a PanelFrameCallback

source

fn column(&self, column: u32) -> GridColumn

Gets the GridColumn for a column index.

column

a column index

Returns

a GridColumn

source

fn most_recent_column(&self) -> GridColumn

Gets the most recently acive column on a grid.

Returns

a GridColumn

source

fn most_recent_frame(&self) -> Frame

Gets the most recently acive frame on a grid.

Returns

a PanelGridFrame

source

fn n_columns(&self) -> u32

Gets the number of columns in the grid.

Returns

The number of columns.

source

fn insert_column(&self, position: u32)

Inserts a column at position.

position

The position to insert the column at.

source

fn connect_create_frame<F: Fn(&Self) -> Frame + 'static>( &self, f: F ) -> SignalHandlerId

The “create-frame” signal is used to create a new frame within the grid.

Consumers of this signal are required to return an unrooted Frame from this signal. The first signal handler wins.

Returns

an unrooted Frame

Implementors§

source§

impl<O: IsA<Grid>> GridExt for O