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

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

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() -> 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>

Notable traits for Vec<u8, A>

impl<A> Write for Vec<u8, A> where
    A: Allocator
[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, 'b>(
    &'a mut self,
    p: &'b mut R::BehaviorContext
) -> CurrentCellBehavior<'a, 'b, R>
[src]

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

pub fn as_widget<'a>(&'a self) -> TableWidget<'a, R>[src]

Prepare for drawing as a Widget.

Trait Implementations

Auto Trait Implementations

impl<R> !RefUnwindSafe for Table<R>

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

impl<R> !Sync for Table<R>

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]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.