TreeDataGrid
struct · ferroui-controls-treedatagrid · v0.5.0
struct TreeDataGrid
Displays hierarchical and tabular data together in a single view (TreeDataGrid).
Members
modelset_modelpresentation_optionsset_presentation_optionspresentationitems_sourceset_items_sourceselection_modeset_selection_modecolumn_definitionsselection_changedgenerated_sourceTYPEto_refcreate_default_element_factoryauto_drag_drop_rows_propertycan_user_resize_columns_propertycan_user_sort_columns_propertycolumns_propertyelement_factory_propertyrows_propertyscroll_propertyshow_column_headers_propertysource_propertymodel_propertypresentation_options_propertypresentation_propertyitems_source_propertyselection_mode_propertyrow_drag_started_eventrow_drag_over_eventrow_drop_eventTEMPLATE_PARTSconstructnewauto_drag_drop_rowsset_auto_drag_drop_rowscan_user_resize_columnsset_can_user_resize_columnscan_user_sort_columnsset_can_user_sort_columnscolumnselement_factoryset_element_factoryrowscolumn_headers_presenterrows_presenterscrollshow_column_headersset_show_column_headerscolumn_selectionrow_selectionsourceset_sourceselection_interactioncell_clearingcell_preparedcell_value_changedrow_clearingrow_preparedselection_changingrow_drag_startedrow_drag_overrow_droptry_get_celltry_get_rowtry_get_cell_oftry_get_row_oftry_get_row_modelquery_cancel_selectionraise_cell_clearingraise_cell_preparedraise_cell_value_changedraise_row_clearingraise_row_preparedraise_row_drag_started
model
fn model(self: &Self) -> Option<TreeDataGridSourceRef>
The framework-neutral source (Model). The control owns view state, never this model.
set_model
fn set_model(self: &Self, value: Option<TreeDataGridSourceRef>)
Sets model.
presentation_options
fn presentation_options(self: &Self) -> Option<Rc<dyn crate::presentation::ITreeDataGridPresentationOptions>>
The options of the presentation of the model (PresentationOptions).
set_presentation_options
fn set_presentation_options(self: &Self, value: Option<Rc<dyn crate::presentation::ITreeDataGridPresentationOptions>>)
Sets presentation_options.
presentation
fn presentation(self: &Self) -> Option<PresentationRef>
The presentation of the source shown (Presentation).
items_source
fn items_source(self: &Self) -> Option<ItemsSource>
The items whose rows the declarative columns show (ItemsSource).
set_items_source
fn set_items_source(self: &Self, value: Option<ItemsSource>)
Sets items_source.
selection_mode
fn selection_mode(self: &Self) -> TreeDataGridSelectionMode
How rows or cells are selected (SelectionMode).
set_selection_mode
fn set_selection_mode(self: &Self, value: TreeDataGridSelectionMode)
Sets selection_mode.
column_definitions
fn column_definitions(self: &Self) -> &crate::TreeDataGridColumns
The declarative columns ([Content] ColumnDefinitions).
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.
generated_source
fn generated_source(self: &Self) -> Option<TreeDataGridSourceRef>
The source generated from the items and the declarative columns.
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<TreeDataGrid>
Returns a strong reference to this object.
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).
auto_drag_drop_rows_property
fn auto_drag_drop_rows_property() -> &'static StyledProperty<bool>
Defines the AutoDragDropRows property.
can_user_resize_columns_property
fn can_user_resize_columns_property() -> &'static StyledProperty<bool>
Defines the CanUserResizeColumns property.
can_user_sort_columns_property
fn can_user_sort_columns_property() -> &'static StyledProperty<bool>
Defines the CanUserSortColumns property.
columns_property
fn columns_property() -> &'static DirectProperty<TreeDataGrid, Option<Rc<dyn IColumns>>>
Defines the Columns property.
element_factory_property
fn element_factory_property() -> &'static DirectProperty<TreeDataGrid, Option<Rc<TreeDataGridElementFactory>>>
Defines the ElementFactory property.
rows_property
fn rows_property() -> &'static DirectProperty<TreeDataGrid, Option<Rc<dyn ITreeDataGridRows>>>
Defines the Rows property.
scroll_property
fn scroll_property() -> &'static DirectProperty<TreeDataGrid, Option<Ref<ScrollViewer>>>
Defines the Scroll property.
show_column_headers_property
fn show_column_headers_property() -> &'static StyledProperty<bool>
Defines the ShowColumnHeaders property.
source_property
fn source_property() -> &'static DirectProperty<TreeDataGrid, Option<TreeDataGridSourceRef>>
Defines the Source property.
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.
presentation_options_property
fn presentation_options_property() -> &'static StyledProperty<Option<Rc<dyn ITreeDataGridPresentationOptions>>>
Defines the PresentationOptions property.
presentation_property
fn presentation_property() -> &'static DirectProperty<TreeDataGrid, Option<PresentationRef>>
Defines the Presentation property.
items_source_property
fn items_source_property() -> &'static StyledProperty<Option<ItemsSource>>
Defines the ItemsSource property.
selection_mode_property
fn selection_mode_property() -> &'static StyledProperty<TreeDataGridSelectionMode>
Defines the SelectionMode property.
row_drag_started_event
fn row_drag_started_event() -> &'static RoutedEvent<TreeDataGridRowDragStartedEventArgs>
Defines the RowDragStarted event.
row_drag_over_event
fn row_drag_over_event() -> &'static RoutedEvent<TreeDataGridRowDragEventArgs>
Defines the RowDragOver event.
row_drop_event
fn row_drop_event() -> &'static RoutedEvent<TreeDataGridRowDragEventArgs>
Defines the RowDrop event.
TEMPLATE_PARTS
const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
The named parts expected in the control template.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
auto_drag_drop_rows
fn auto_drag_drop_rows(self: &Self) -> bool
Whether rows can be dragged and dropped to move them (AutoDragDropRows).
set_auto_drag_drop_rows
fn set_auto_drag_drop_rows(self: &Self, value: bool)
Sets auto_drag_drop_rows.
can_user_resize_columns
fn can_user_resize_columns(self: &Self) -> bool
Whether the user can resize the columns (CanUserResizeColumns).
set_can_user_resize_columns
fn set_can_user_resize_columns(self: &Self, value: bool)
Sets can_user_resize_columns.
can_user_sort_columns
fn can_user_sort_columns(self: &Self) -> bool
Whether the user can sort by clicking a column header (CanUserSortColumns).
set_can_user_sort_columns
fn set_can_user_sort_columns(self: &Self, value: bool)
Sets can_user_sort_columns.
columns
fn columns(self: &Self) -> Option<Rc<dyn IColumns>>
The columns presented (Columns).
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.
set_element_factory
fn set_element_factory(self: &Self, value: Rc<TreeDataGridElementFactory>)
Sets element_factory.
rows
fn rows(self: &Self) -> Option<Rc<dyn ITreeDataGridRows>>
The rows presented (Rows).
column_headers_presenter
fn column_headers_presenter(self: &Self) -> Option<Ref<TreeDataGridColumnHeadersPresenter>>
The presenter of the column headers of the template (PART_ColumnHeadersPresenter).
rows_presenter
fn rows_presenter(self: &Self) -> Option<Ref<TreeDataGridRowsPresenter>>
The presenter of the rows of the template (PART_RowsPresenter).
scroll
fn scroll(self: &Self) -> Option<Ref<ScrollViewer>>
The scroll viewer of the rows (Scroll).
show_column_headers
fn show_column_headers(self: &Self) -> bool
Whether the column headers are shown (ShowColumnHeaders).
set_show_column_headers
fn set_show_column_headers(self: &Self, value: bool)
Sets show_column_headers.
column_selection
fn column_selection(self: &Self) -> Option<Rc<dyn crate::selection::IUntypedCellSelection>>
The cell selection of the source, if it is one (ColumnSelection).
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
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.
set_source
fn set_source(self: &Self, value: Option<TreeDataGridSourceRef>)
Sets the explicit source (Source): it replaces the model.
selection_interaction
fn selection_interaction(self: &Self) -> Option<Rc<dyn ITreeDataGridSelectionInteraction>>
The interaction of the selection with the control (SelectionInteraction).
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.
cell_prepared
fn cell_prepared(self: &Self, handler: impl Fn(&TreeDataGridCellEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
CellPrepared: a cell was prepared for display.
cell_value_changed
fn cell_value_changed(self: &Self, handler: impl Fn(&TreeDataGridCellEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
CellValueChanged: the value of a cell changed.
row_clearing
fn row_clearing(self: &Self, handler: impl Fn(&TreeDataGridRowEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
RowClearing: a row is about to be cleared.
row_prepared
fn row_prepared(self: &Self, handler: impl Fn(&TreeDataGridRowEventArgs) -> () + 'static) -> Rc<dyn IDisposable>
RowPrepared: a row was prepared for display.
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.
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.
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.
row_drop
fn row_drop(self: &Self, handler: impl Fn(&ferroui_base::interactivity::Interactive, &TreeDataGridRowDragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
RowDrop: rows are dropped on a row.
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).
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).
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)).
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)).
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>).
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).
raise_cell_clearing
fn raise_cell_clearing(self: &Self, cell: &TreeDataGridCell, column_index: i32, row_index: i32)
Raises CellClearing (RaiseCellClearing).
raise_cell_prepared
fn raise_cell_prepared(self: &Self, cell: &TreeDataGridCell, column_index: i32, row_index: i32)
Raises CellPrepared (RaiseCellPrepared).
raise_cell_value_changed
fn raise_cell_value_changed(self: &Self, cell: &TreeDataGridCell, column_index: i32, row_index: i32)
Raises CellValueChanged (RaiseCellValueChanged).
raise_row_clearing
fn raise_row_clearing(self: &Self, row: &TreeDataGridRow, row_index: i32)
Raises RowClearing (RaiseRowClearing).
raise_row_prepared
fn raise_row_prepared(self: &Self, row: &TreeDataGridRow, row_index: i32)
Raises RowPrepared (RaiseRowPrepared).
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTreeDataGridImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherTemplatedControlImplExtControlImplExtDerefUpcast<T>Upcast<TreeDataGrid>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplLayoutableImplInteractiveImplTreeDataGridImplFerroObjectImplVisualImplTemplatedControlImplInputElementImplControlImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.