FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    FlatTreeDataGridSource

    struct · ferroui-treedatagrid-core · v0.5.0

    struct FlatTreeDataGridSource<M: TreeModel>
    

    A source of a flat grid: one row per model.

    View source

    Members

    new

    fn new(items: Models<M>) -> Rc<Self>
    

    A source of items.

    Source

    columns

    fn columns(self: &Self) -> &ColumnList<M>
    

    The columns.

    Source

    with_column

    fn with_column(self: &Rc<Self>, column: ColumnRef<M>) -> Rc<Self>
    

    Adds a column (the reference's collection initializer Columns = { ... }).

    Source

    typed_rows

    fn typed_rows(self: &Self) -> Rc<AnonymousSortableRows<M>>
    

    The rows, created on first access.

    Source

    items

    fn items(self: &Self) -> Models<M>
    

    The items.

    Source

    set_items

    fn set_items(self: &Self, value: Models<M>)
    

    Shows other items (the selection follows them).

    Source

    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.

    Source

    set_filter

    fn set_filter(self: &Self, value: Option<Rc<dyn Fn(&Rc<M>) -> bool>>)
    

    Source

    refresh_filter

    fn refresh_filter(self: &Self)
    

    Applies the filter again (RefreshFilter).

    Source

    row_selection

    fn row_selection(self: &Self) -> Option<Rc<TreeDataGridRowSelectionModel<M>>>
    

    The selection of rows, if the selection is one (RowSelection).

    Source

    is_sorted

    fn is_sorted(self: &Self) -> bool
    

    Source

    dispose

    fn dispose(self: &Self)
    

    Releases the rows (Dispose).

    Source

    sort_by_column

    fn sort_by_column(self: &Self, column: &ColumnRef<M>, direction: ListSortDirection) -> bool
    

    Sorts by column (one of the columns).

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.