[][src]Struct unsegen::widget::builtin::table::Table

pub struct Table<R: TableRow> { /* fields omitted */ }

A table of widgets with static number of Columns.

In order to create a table, you have to define a type for a row in the table and implement TableRow for it. Then add instances of that type using rows_mut.

At any time, a single cell of the table is active. Send user input to the cell by adding the result of current_cell_behavior() to an InputChain. A table is also Navigatable by which the user can change which cell is the currently active one.

Implementations

impl<R: TableRow + 'static> Table<R>[src]

pub fn new(
    row_sep_style: SeparatingStyle,
    col_sep_style: SeparatingStyle,
    focused_style: StyleModifier
) -> Self
[src]

Create an empty table and specify how rows/columns and the currently active cell will be distinguished.

pub fn rows_mut<'a>(&'a mut self) -> RowsMut<'a, R>[src]

Access the content of the table mutably.

pub fn rows(&mut self) -> &Vec<R>[src]

Access the content of the table immutably.

pub fn current_row(&self) -> Option<&R>[src]

Get access to the currently active row.

pub fn current_row_mut(&mut self) -> Option<&mut R>[src]

Get mutable access to the currently active row.

pub fn current_col(&self) -> &'static Column<R>[src]

Get the currently active column.

pub fn current_cell_behavior<'a>(&'a mut self) -> CurrentCellBehavior<'a, R>[src]

Create a Behavior which can be used to send input directly to the currently active cell by adding it to an InputChain.

Trait Implementations

impl<R: TableRow + 'static> Navigatable for Table<R>[src]

impl<R: TableRow + 'static> Scrollable for Table<R>[src]

impl<R: TableRow + 'static> Widget for Table<R>[src]

Auto Trait Implementations

impl<R> RefUnwindSafe for Table<R> where
    R: RefUnwindSafe

impl<R> Send for Table<R> where
    R: Send

impl<R> Sync for Table<R> where
    R: Sync

impl<R> Unpin for Table<R> where
    R: Unpin

impl<R> UnwindSafe for Table<R> where
    R: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.