pub struct Table {
pub columns: Vec<Column>,
pub rows: Vec<TableRow>,
pub empty: String,
pub rows_editable: bool,
pub columns_editable: bool,
pub selectable: bool,
}Expand description
A table edited in place: columns with headers and kinds, rows of cells,
rows added, taken out and moved, cells typed into one at a time or
pasted as a block. Everything done to it is sent back as one
super::Value::Table edit (see super::TableEdit); the operation
holds the data, and says what each edit does.
Fields§
§columns: Vec<Column>§rows: Vec<TableRow>§empty: StringShown when there are no rows.
rows_editable: boolWhether rows are added, after the last (super::TableEdit::AddRow),
and moved (super::TableEdit::MoveRow).
columns_editable: boolWhether columns are added (super::TableEdit::AddColumn); the
ones that are the user’s say so themselves (Column::editable).
selectable: boolWhether one row is chosen (super::TableEdit::SelectRow,
TableRow::selected).
Implementations§
Source§impl Table
impl Table
Sourcepub fn new(
columns: Vec<Column>,
rows: Vec<TableRow>,
empty: impl Into<String>,
) -> Self
pub fn new( columns: Vec<Column>, rows: Vec<TableRow>, empty: impl Into<String>, ) -> Self
A table of columns and rows, saying empty without rows, whose
rows are the user’s to add and move.
Sourcepub fn columns_editable(self) -> Self
pub fn columns_editable(self) -> Self
With columns the user adds (see Table::columns_editable).
Sourcepub fn selectable(self) -> Self
pub fn selectable(self) -> Self
With one row chosen (see Table::selectable).