FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TreeDataGrid

    struct · ferroui-controls-treedatagrid · v0.5.0

    struct TreeDataGrid
    

    Displays hierarchical and tabular data together in a single view (TreeDataGrid).

    View source

    Members

    model

    fn model(self: &Self) -> Option<TreeDataGridSourceRef>
    

    The framework-neutral source (Model). The control owns view state, never this model.

    Source

    set_model

    fn set_model(self: &Self, value: Option<TreeDataGridSourceRef>)
    

    Sets model.

    Source

    presentation_options

    fn presentation_options(self: &Self) -> Option<Rc<dyn crate::presentation::ITreeDataGridPresentationOptions>>
    

    The options of the presentation of the model (PresentationOptions).

    Source

    set_presentation_options

    fn set_presentation_options(self: &Self, value: Option<Rc<dyn crate::presentation::ITreeDataGridPresentationOptions>>)
    

    Sets presentation_options.

    Source

    presentation

    fn presentation(self: &Self) -> Option<PresentationRef>
    

    The presentation of the source shown (Presentation).

    Source

    items_source

    fn items_source(self: &Self) -> Option<ItemsSource>
    

    The items whose rows the declarative columns show (ItemsSource).

    Source

    set_items_source

    fn set_items_source(self: &Self, value: Option<ItemsSource>)
    

    Sets items_source.

    Source

    selection_mode

    fn selection_mode(self: &Self) -> TreeDataGridSelectionMode
    

    How rows or cells are selected (SelectionMode).

    Source

    set_selection_mode

    fn set_selection_mode(self: &Self, value: TreeDataGridSelectionMode)
    

    Sets selection_mode.

    Source

    column_definitions

    fn column_definitions(self: &Self) -> &crate::TreeDataGridColumns
    

    The declarative columns ([Content] ColumnDefinitions).

    Source

    selection_changed

    fn selection_changed(self: &Self, handler: impl Fn(&TreeDataGridSelectionChangedEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    SelectionChanged: the rows or cells selected changed. Disposing the returned handle unsubscribes.

    Source

    generated_source

    fn generated_source(self: &Self) -> Option<TreeDataGridSourceRef>
    

    The source generated from the items and the declarative columns.

    Source

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<TreeDataGrid>
    

    Returns a strong reference to this object.

    Source

    create_default_element_factory

    fn create_default_element_factory(self: &Self) -> Rc<TreeDataGridElementFactory>
    

    Creates the element factory of the grid when none is set (CreateDefaultElementFactory).

    Source

    auto_drag_drop_rows_property

    fn auto_drag_drop_rows_property() -> &'static StyledProperty<bool>
    

    Defines the AutoDragDropRows property.

    Source

    can_user_resize_columns_property

    fn can_user_resize_columns_property() -> &'static StyledProperty<bool>
    

    Defines the CanUserResizeColumns property.

    Source

    can_user_sort_columns_property

    fn can_user_sort_columns_property() -> &'static StyledProperty<bool>
    

    Defines the CanUserSortColumns property.

    Source

    columns_property

    fn columns_property() -> &'static DirectProperty<TreeDataGrid, Option<Rc<dyn IColumns>>>
    

    Defines the Columns property.

    Source

    element_factory_property

    fn element_factory_property() -> &'static DirectProperty<TreeDataGrid, Option<Rc<TreeDataGridElementFactory>>>
    

    Defines the ElementFactory property.

    Source

    rows_property

    fn rows_property() -> &'static DirectProperty<TreeDataGrid, Option<Rc<dyn ITreeDataGridRows>>>
    

    Defines the Rows property.

    Source

    scroll_property

    fn scroll_property() -> &'static DirectProperty<TreeDataGrid, Option<Ref<ScrollViewer>>>
    

    Defines the Scroll property.

    Source

    show_column_headers_property

    fn show_column_headers_property() -> &'static StyledProperty<bool>
    

    Defines the ShowColumnHeaders property.

    Source

    source_property

    fn source_property() -> &'static DirectProperty<TreeDataGrid, Option<TreeDataGridSourceRef>>
    

    Defines the Source property.

    Source

    model_property

    fn model_property() -> &'static StyledProperty<Option<TreeDataGridSourceRef>>
    

    Defines the Model property: the primary, framework-neutral source. The control owns view state, never this model.

    Source

    presentation_options_property

    fn presentation_options_property() -> &'static StyledProperty<Option<Rc<dyn ITreeDataGridPresentationOptions>>>
    

    Defines the PresentationOptions property.

    Source

    presentation_property

    fn presentation_property() -> &'static DirectProperty<TreeDataGrid, Option<PresentationRef>>
    

    Defines the Presentation property.

    Source

    items_source_property

    fn items_source_property() -> &'static StyledProperty<Option<ItemsSource>>
    

    Defines the ItemsSource property.

    Source

    selection_mode_property

    fn selection_mode_property() -> &'static StyledProperty<TreeDataGridSelectionMode>
    

    Defines the SelectionMode property.

    Source

    row_drag_started_event

    fn row_drag_started_event() -> &'static RoutedEvent<TreeDataGridRowDragStartedEventArgs>
    

    Defines the RowDragStarted event.

    Source

    row_drag_over_event

    fn row_drag_over_event() -> &'static RoutedEvent<TreeDataGridRowDragEventArgs>
    

    Defines the RowDragOver event.

    Source

    row_drop_event

    fn row_drop_event() -> &'static RoutedEvent<TreeDataGridRowDragEventArgs>
    

    Defines the RowDrop event.

    Source

    TEMPLATE_PARTS

    const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
    

    The named parts expected in the control template.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    auto_drag_drop_rows

    fn auto_drag_drop_rows(self: &Self) -> bool
    

    Whether rows can be dragged and dropped to move them (AutoDragDropRows).

    Source

    set_auto_drag_drop_rows

    fn set_auto_drag_drop_rows(self: &Self, value: bool)
    

    Sets auto_drag_drop_rows.

    Source

    can_user_resize_columns

    fn can_user_resize_columns(self: &Self) -> bool
    

    Whether the user can resize the columns (CanUserResizeColumns).

    Source

    set_can_user_resize_columns

    fn set_can_user_resize_columns(self: &Self, value: bool)
    

    Sets can_user_resize_columns.

    Source

    can_user_sort_columns

    fn can_user_sort_columns(self: &Self) -> bool
    

    Whether the user can sort by clicking a column header (CanUserSortColumns).

    Source

    set_can_user_sort_columns

    fn set_can_user_sort_columns(self: &Self, value: bool)
    

    Sets can_user_sort_columns.

    Source

    columns

    fn columns(self: &Self) -> Option<Rc<dyn IColumns>>
    

    The columns presented (Columns).

    Source

    element_factory

    fn element_factory(self: &Self) -> Rc<TreeDataGridElementFactory>
    

    The factory of the rows, cells and column headers (ElementFactory); created by create_default_element_factory when none is set.

    Source

    set_element_factory

    fn set_element_factory(self: &Self, value: Rc<TreeDataGridElementFactory>)
    

    Sets element_factory.

    Source

    rows

    fn rows(self: &Self) -> Option<Rc<dyn ITreeDataGridRows>>
    

    The rows presented (Rows).

    Source

    column_headers_presenter

    fn column_headers_presenter(self: &Self) -> Option<Ref<TreeDataGridColumnHeadersPresenter>>
    

    The presenter of the column headers of the template (PART_ColumnHeadersPresenter).

    Source

    rows_presenter

    fn rows_presenter(self: &Self) -> Option<Ref<TreeDataGridRowsPresenter>>
    

    The presenter of the rows of the template (PART_RowsPresenter).

    Source

    scroll

    fn scroll(self: &Self) -> Option<Ref<ScrollViewer>>
    

    The scroll viewer of the rows (Scroll).

    Source

    show_column_headers

    fn show_column_headers(self: &Self) -> bool
    

    Whether the column headers are shown (ShowColumnHeaders).

    Source

    set_show_column_headers

    fn set_show_column_headers(self: &Self, value: bool)
    

    Sets show_column_headers.

    Source

    column_selection

    fn column_selection(self: &Self) -> Option<Rc<dyn crate::selection::IUntypedCellSelection>>
    

    The cell selection of the source, if it is one (ColumnSelection).

    Source

    row_selection

    fn row_selection(self: &Self) -> Option<Rc<dyn ferroui_treedatagrid_core::selection::ITreeSelectionModel>>
    

    The row selection of the source, if it is one (RowSelection).

    Source

    source

    fn source(self: &Self) -> Option<TreeDataGridSourceRef>
    

    The source shown (Source): the explicit source, or the source generated from the items and declarative columns; None while a model is shown.

    Source

    set_source

    fn set_source(self: &Self, value: Option<TreeDataGridSourceRef>)
    

    Sets the explicit source (Source): it replaces the model.

    Source

    selection_interaction

    fn selection_interaction(self: &Self) -> Option<Rc<dyn ITreeDataGridSelectionInteraction>>
    

    The interaction of the selection with the control (SelectionInteraction).

    Source

    cell_clearing

    fn cell_clearing(self: &Self, handler: impl Fn(&TreeDataGridCellEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    CellClearing: a cell is about to be cleared. Disposing the returned handle unsubscribes.

    Source

    cell_prepared

    fn cell_prepared(self: &Self, handler: impl Fn(&TreeDataGridCellEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    CellPrepared: a cell was prepared for display.

    Source

    cell_value_changed

    fn cell_value_changed(self: &Self, handler: impl Fn(&TreeDataGridCellEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    CellValueChanged: the value of a cell changed.

    Source

    row_clearing

    fn row_clearing(self: &Self, handler: impl Fn(&TreeDataGridRowEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    RowClearing: a row is about to be cleared.

    Source

    row_prepared

    fn row_prepared(self: &Self, handler: impl Fn(&TreeDataGridRowEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    RowPrepared: a row was prepared for display.

    Source

    selection_changing

    fn selection_changing(self: &Self, handler: impl Fn(&CancelEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
    

    SelectionChanging: the selection is about to change; a handler cancels it with CancelEventArgs::set_cancel.

    Source

    row_drag_started

    fn row_drag_started(self: &Self, handler: impl Fn(&ferroui_base::interactivity::Interactive, &TreeDataGridRowDragStartedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    RowDragStarted: a drag of rows started.

    Source

    row_drag_over

    fn row_drag_over(self: &Self, handler: impl Fn(&ferroui_base::interactivity::Interactive, &TreeDataGridRowDragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    RowDragOver: rows are dragged over a row.

    Source

    row_drop

    fn row_drop(self: &Self, handler: impl Fn(&ferroui_base::interactivity::Interactive, &TreeDataGridRowDragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    RowDrop: rows are dropped on a row.

    Source

    try_get_cell

    fn try_get_cell(self: &Self, column_index: i32, row_index: i32) -> Option<Ref<Control>>
    

    The cell at column_index of the row at row_index, if it is realized (TryGetCell).

    Source

    try_get_row

    fn try_get_row(self: &Self, row_index: i32) -> Option<Ref<TreeDataGridRow>>
    

    The row at row_index, if it is realized (TryGetRow).

    Source

    try_get_cell_of

    fn try_get_cell_of(self: &Self, element: Option<&Control>) -> Option<Ref<TreeDataGridCell>>
    

    The cell that is element or contains it (TryGetCell(Control, out TreeDataGridCell)).

    Source

    try_get_row_of

    fn try_get_row_of(self: &Self, element: Option<&Control>) -> Option<Ref<TreeDataGridRow>>
    

    The row that is element or contains it (TryGetRow(Control, out TreeDataGridRow)).

    Source

    try_get_row_model

    fn try_get_row_model<M: 'static>(self: &Self, element: &Control) -> Option<Rc<M>>
    

    The model of the row that is element or contains it, if it is a model of type M (TryGetRowModel<TModel>).

    Source

    query_cancel_selection

    fn query_cancel_selection(self: &Self) -> bool
    

    Asks the SelectionChanging handlers whether the selection may change; true when one cancels it (QueryCancelSelection).

    Source

    raise_cell_clearing

    fn raise_cell_clearing(self: &Self, cell: &TreeDataGridCell, column_index: i32, row_index: i32)
    

    Raises CellClearing (RaiseCellClearing).

    Source

    raise_cell_prepared

    fn raise_cell_prepared(self: &Self, cell: &TreeDataGridCell, column_index: i32, row_index: i32)
    

    Raises CellPrepared (RaiseCellPrepared).

    Source

    raise_cell_value_changed

    fn raise_cell_value_changed(self: &Self, cell: &TreeDataGridCell, column_index: i32, row_index: i32)
    

    Raises CellValueChanged (RaiseCellValueChanged).

    Source

    raise_row_clearing

    fn raise_row_clearing(self: &Self, row: &TreeDataGridRow, row_index: i32)
    

    Raises RowClearing (RaiseRowClearing).

    Source

    raise_row_prepared

    fn raise_row_prepared(self: &Self, row: &TreeDataGridRow, row_index: i32)
    

    Raises RowPrepared (RaiseRowPrepared).

    Source

    raise_row_drag_started

    fn raise_row_drag_started(self: &Self, trigger: &PointerPressedEventArgs)
    

    Starts a drag of the selected rows after the press trigger (RaiseRowDragStarted): raises RowDragStarted, then starts the drag and drop operation with the effects allowed.

    Source

    Trait implementations

    Availability

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