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]
impl<R: TableRow + 'static> Table<R>
[src]pub fn new() -> Self
[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 current_row(&self) -> Option<&R>
[src]
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]
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]
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]
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]
pub fn as_widget<'a>(&'a self) -> TableWidget<'a, R>
[src]Prepare for drawing as a Widget
.
Trait Implementations
impl<R: TableRow + 'static> Navigatable for Table<R>
[src]
impl<R: TableRow + 'static> Navigatable for Table<R>
[src]fn move_up(&mut self) -> OperationResult
[src]
fn move_down(&mut self) -> OperationResult
[src]
fn move_left(&mut self) -> OperationResult
[src]
fn move_right(&mut self) -> OperationResult
[src]
impl<R: TableRow + 'static> Scrollable for Table<R>
[src]
impl<R: TableRow + 'static> Scrollable for Table<R>
[src]fn scroll_backwards(&mut self) -> OperationResult
[src]
fn scroll_forwards(&mut self) -> OperationResult
[src]
fn scroll_to_beginning(&mut self) -> OperationResult
[src]
fn scroll_to_end(&mut self) -> OperationResult
[src]
Auto Trait Implementations
impl<R> !RefUnwindSafe for Table<R>
impl<R> Send for Table<R> where
R: Send,
R: Send,
impl<R> !Sync for Table<R>
impl<R> Unpin for Table<R> where
R: Unpin,
R: Unpin,
impl<R> UnwindSafe for Table<R> where
R: UnwindSafe,
R: UnwindSafe,