FlatTreeDataGridSource
struct · ferroui-treedatagrid-core · v0.5.0
struct FlatTreeDataGridSource<M: TreeModel>
A source of a flat grid: one row per model.
Members
newcolumnswith_columntyped_rowsitemsset_itemsfilterset_filterrefresh_filterrow_selectionis_sorteddisposesort_by_column
new
fn new(items: Models<M>) -> Rc<Self>
A source of items.
columns
fn columns(self: &Self) -> &ColumnList<M>
The columns.
with_column
fn with_column(self: &Rc<Self>, column: ColumnRef<M>) -> Rc<Self>
Adds a column (the reference's collection initializer Columns = { ... }).
typed_rows
fn typed_rows(self: &Self) -> Rc<AnonymousSortableRows<M>>
The rows, created on first access.
items
fn items(self: &Self) -> Models<M>
The items.
set_items
fn set_items(self: &Self, value: Models<M>)
Shows other items (the selection follows them).
filter
fn filter(self: &Self) -> Option<Rc<dyn Fn(&Rc<M>) -> bool>>
The filter of the rows (the classic source of the reference): only the models it accepts are
shown. A filtered source shows a snapshot of the matching models; call
refresh_filter after the models change.
set_filter
fn set_filter(self: &Self, value: Option<Rc<dyn Fn(&Rc<M>) -> bool>>)
refresh_filter
fn refresh_filter(self: &Self)
Applies the filter again (RefreshFilter).
row_selection
fn row_selection(self: &Self) -> Option<Rc<TreeDataGridRowSelectionModel<M>>>
The selection of rows, if the selection is one (RowSelection).
is_sorted
fn is_sorted(self: &Self) -> bool
dispose
fn dispose(self: &Self)
Releases the rows (Dispose).
sort_by_column
fn sort_by_column(self: &Self, column: &ColumnRef<M>, direction: ListSortDirection) -> bool
Sorts by column (one of the columns).
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEitherINotifyPropertyChangedITreeDataGridSourceITreeDataGridSourceOf<M>
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.