FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ColumnListBase

    struct · ferroui-controls-treedatagrid · v0.5.0

    struct ColumnListBase
    

    ColumnListBase<TColumn>: an implementation of IColumns that stores its columns in a list.

    View source

    Members

    from_core_columns

    fn from_core_columns(columns: impl IntoIterator<Item = Rc<dyn core_models::IColumn>>, present: impl FnMut(&Rc<dyn core_models::IColumn>) -> Option<ColumnRef>) -> Rc<Self>
    

    A list of the view columns of columns (the columns of a core source), in order; a column that is not a view column (a neutral column of the core, which the presentation presents through its options) is given to present, which returns its view column or None to leave it out.

    Source

    add_core_column

    fn add_core_column(self: &Self, column: &dyn core_models::IColumn) -> bool
    

    Adds the view of a core column; false when the core column is not a view column of this crate.

    Source

    new

    fn new() -> Rc<Self>
    

    An empty list.

    Source

    from_columns

    fn from_columns(columns: impl IntoIterator<Item = ColumnRef>) -> Rc<Self>
    

    A list of columns.

    Source

    this

    fn this(self: &Self) -> Rc<Self>
    

    The shared list.

    Source

    notifying

    fn notifying(self: &Self) -> &NotifyingBase
    

    The PropertyChanged of the list (Count, Item[]).

    Source

    count

    fn count(self: &Self) -> usize
    

    Source

    is_empty

    fn is_empty(self: &Self) -> bool
    

    Source

    get

    fn get(self: &Self, index: usize) -> ColumnRef
    

    The column at index.

    Panics

    When index is out of range.

    Source

    try_get

    fn try_get(self: &Self, index: usize) -> Option<ColumnRef>
    

    Source

    to_vec

    fn to_vec(self: &Self) -> Vec<ColumnRef>
    

    The columns, in order.

    Source

    index_of

    fn index_of(self: &Self, column: &ColumnRef) -> Option<usize>
    

    The index of column, compared by identity.

    Source

    contains

    fn contains(self: &Self, column: &ColumnRef) -> bool
    

    Source

    add_collection_changed

    fn add_collection_changed(self: &Self, handler: Rc<ColumnsChangedHandler>) -> u64
    

    CollectionChanged.

    Source

    remove_collection_changed

    fn remove_collection_changed(self: &Self, token: u64) -> bool
    

    Source

    add_layout_invalidated

    fn add_layout_invalidated(self: &Self, handler: Rc<dyn Fn() -> ()>) -> u64
    

    LayoutInvalidated: the widths of the columns changed and the layout must run again.

    Source

    remove_layout_invalidated

    fn remove_layout_invalidated(self: &Self, token: u64) -> bool
    

    Source

    add

    fn add(self: &Self, column: ColumnRef)
    

    Source

    add_range

    fn add_range(self: &Self, columns: impl IntoIterator<Item = ColumnRef>)
    

    Adds the columns one by one (AddRange).

    Source

    insert

    fn insert(self: &Self, index: usize, column: ColumnRef)
    

    Inserts a column.

    Panics

    When index is greater than the count, or during a batch of another kind.

    Source

    remove_at

    fn remove_at(self: &Self, index: usize)
    

    Removes the column at index.

    Panics

    When index is out of range, or during a batch of another kind.

    Source

    remove

    fn remove(self: &Self, column: &ColumnRef) -> bool
    

    Removes column; false when it is not in the list.

    Source

    set

    fn set(self: &Self, index: usize, column: ColumnRef)
    

    Replaces the column at index.

    Panics

    When index is out of range, or during a batch other than a reset.

    Source

    move_item

    fn move_item(self: &Self, old_index: usize, new_index: usize)
    

    Moves the column at old_index to new_index (MoveItem).

    Panics

    When an index is out of range (ArgumentOutOfRangeException), or during a batch other than a reset.

    Source

    clear

    fn clear(self: &Self)
    

    Removes every column.

    Panics

    During a batch other than a reset.

    Source

    insert_range

    fn insert_range(self: &Self, index: usize, action: impl FnOnce(&mut dyn FnMut(ColumnRef) -> ()) -> ())
    

    Inserts the columns action hands over, from index, with one notification (InsertRange).

    Source

    remove_range

    fn remove_range(self: &Self, index: usize, count: usize)
    

    Removes count columns from index with one notification (RemoveRange).

    Source

    reset

    fn reset(self: &Self, action: impl FnOnce(&Self) -> ())
    

    Changes the list in action and raises one reset notification (Reset).

    Source

    check_reentrancy

    fn check_reentrancy(self: &Self)
    

    Changes are allowed while a notification is raised only when one handler listens: a re-entrant change would make the arguments of later handlers invalid.

    Panics

    On a re-entrant change with more than one listener (InvalidOperationException).

    Source

    cell_measured

    fn cell_measured(self: &Self, column_index: i32, row_index: i32, size: Size) -> Size
    

    The size a cell gets after it was measured at size (CellMeasured).

    Source

    get_column_at

    fn get_column_at(self: &Self, x: f64) -> (i32, f64)
    

    The index and left edge of the column at x, or (-1, -1) (GetColumnAt).

    Source

    get_estimated_width

    fn get_estimated_width(self: &Self, constraint: f64) -> f64
    

    The estimated total width of the columns in the viewport width constraint (GetEstimatedWidth).

    Source

    commit_actual_widths

    fn commit_actual_widths(self: &Self)
    

    Commits the widths of the columns, unless a batch defers them (CommitActualWidths).

    Source

    set_column_width

    fn set_column_width(self: &Self, column_index: i32, width: GridLength)
    

    Sets the width of the column at column_index (SetColumnWidth).

    Source

    viewport_changed

    fn viewport_changed(self: &Self, viewport: Rect)
    

    The viewport changed: star columns share its new width (ViewportChanged).

    Source

    Trait implementations

    Availability

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