FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    HierarchicalTreeDataGridSource

    struct · ferroui-treedatagrid-core · v0.5.0

    struct HierarchicalTreeDataGridSource<M: TreeModel>
    

    A source of a tree with columns: the rows of the root models, each expandable to the rows of its children through the expander column.

    View source

    Members

    new

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

    A source of items.

    Source

    from_item

    fn from_item(item: Rc<M>) -> Rc<Self>
    

    A source of one root model.

    Source

    columns

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

    Source

    with_column

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

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

    Source

    items

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

    Source

    set_items

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

    Source

    typed_rows

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

    The rows, created on first access.

    Panics

    When the source has no columns or no expander column (InvalidOperationException).

    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

    add_row_expanding

    fn add_row_expanding(self: &Self, handler: Rc<RowEventHandler<M>>) -> u64
    

    Source

    remove_row_expanding

    fn remove_row_expanding(self: &Self, token: u64)
    

    Source

    add_row_expanded

    fn add_row_expanded(self: &Self, handler: Rc<RowEventHandler<M>>) -> u64
    

    Source

    remove_row_expanded

    fn remove_row_expanded(self: &Self, token: u64)
    

    Source

    add_row_collapsing

    fn add_row_collapsing(self: &Self, handler: Rc<RowEventHandler<M>>) -> u64
    

    Source

    remove_row_collapsing

    fn remove_row_collapsing(self: &Self, token: u64)
    

    Source

    add_row_collapsed

    fn add_row_collapsed(self: &Self, handler: Rc<RowEventHandler<M>>) -> u64
    

    Source

    remove_row_collapsed

    fn remove_row_collapsed(self: &Self, token: u64)
    

    Source

    dispose

    fn dispose(self: &Self)
    

    Releases the rows (Dispose).

    Source

    collapse

    fn collapse(self: &Self, index: &IndexPath)
    

    Source

    collapse_all

    fn collapse_all(self: &Self)
    

    Source

    expand

    fn expand(self: &Self, index: &IndexPath)
    

    Source

    expand_all

    fn expand_all(self: &Self)
    

    Source

    expand_collapse_recursive

    fn expand_collapse_recursive(self: &Self, predicate: &dyn Fn(&Rc<M>) -> bool)
    

    Expands the models for which predicate holds and collapses the others.

    Source

    expand_collapse_recursive_from

    fn expand_collapse_recursive_from(self: &Self, row: &Rc<HierarchicalRow<M>>, predicate: &dyn Fn(&Rc<M>) -> bool)
    

    expand_collapse_recursive below row.

    Source

    try_get_model_at

    fn try_get_model_at(self: &Self, index: &IndexPath) -> Option<Rc<M>>
    

    The model at index.

    Panics

    When the source has no expander column (InvalidOperationException).

    Source

    sort

    fn sort(self: &Self, comparison: Option<Comparison<M>>)
    

    Sorts the rows by comparison.

    Source

    sort_by_column

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

    Sorts by column (one of the columns).

    Source

    get_model_children

    fn get_model_children(self: &Self, model: &Rc<M>) -> Option<Models<M>>
    

    The child models of model.

    Panics

    When the source has no expander column (InvalidOperationException).

    Source

    get_row_index

    fn get_row_index(self: &Self, index: &IndexPath, from_row_index: usize) -> i32
    

    The row index of the model at index, searched from from_row_index (-1: no row).

    Source

    Trait implementations

    Availability

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