pub struct PropertiesView { /* private fields */ }Expand description
The properties of an object for the property grid: the counterpart of the
DataGridCollectionView of the managed original, with its group description (by
Group), its sort description (PropertyComparer) and its filter, presented as a
hierarchical TreeDataGrid source whose root rows are the groups.
Deviation (DEVIATIONS.md, Developer tools): the property grid is a TreeDataGrid, not a DataGrid.
Implementations§
Source§impl PropertiesView
impl PropertiesView
pub fn new( properties: Vec<PropertyViewModelRef>, filter: Rc<dyn Fn(&PropertyViewModelRef) -> bool>, ) -> Rc<Self>
Sourcepub fn set_property_type_columns(&self, show_property_type: bool)
pub fn set_property_type_columns(&self, show_property_type: bool)
Shows the type of a property and of its value in one column, or (with show_property_type)
in two.
Sourcepub fn source(&self) -> Rc<HierarchicalTreeDataGridSource<PropertiesViewItem>>
pub fn source(&self) -> Rc<HierarchicalTreeDataGridSource<PropertiesViewItem>>
The source of the grid.
Sourcepub fn source_ref(&self) -> TreeDataGridSourceRef
pub fn source_ref(&self) -> TreeDataGridSourceRef
The source of the grid, as the grid takes it.
Sourcepub fn items(&self) -> Vec<PropertyViewModelRef>
pub fn items(&self) -> Vec<PropertyViewModelRef>
The properties the view shows, in the order it shows them (foreach (object o in PropertiesView)).
Sourcepub fn set_selection_changed(
&self,
handler: Rc<dyn Fn(Option<PropertyViewModelRef>)>,
)
pub fn set_selection_changed( &self, handler: Rc<dyn Fn(Option<PropertyViewModelRef>)>, )
Sets the handler of a change of the selected row (the selected property, None for a
group or no row).
Sourcepub fn refresh(&self)
pub fn refresh(&self)
Groups, sorts and filters the properties again (Refresh()), keeping the selected
property selected while it is shown.
Sourcepub fn index_path_of(
&self,
property: &PropertyViewModelRef,
) -> Option<IndexPath>
pub fn index_path_of( &self, property: &PropertyViewModelRef, ) -> Option<IndexPath>
The index path of the row of a property.
Sourcepub fn row_index_of(&self, property: &PropertyViewModelRef) -> i32
pub fn row_index_of(&self, property: &PropertyViewModelRef) -> i32
The index of the row of a property among the rows the grid shows; -1 when it shows
none.
Sourcepub fn selected(&self) -> Option<PropertyViewModelRef>
pub fn selected(&self) -> Option<PropertyViewModelRef>
The selected property; None when no row or a group is selected.
Sourcepub fn select(&self, property: Option<&PropertyViewModelRef>)
pub fn select(&self, property: Option<&PropertyViewModelRef>)
Selects the row of a property, or clears the selection.
Trait Implementations§
Source§impl MarkupTyped for PropertiesView
impl MarkupTyped for PropertiesView
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Auto Trait Implementations§
impl !Freeze for PropertiesView
impl !RefUnwindSafe for PropertiesView
impl !Send for PropertiesView
impl !Sync for PropertiesView
impl !UnwindSafe for PropertiesView
impl Unpin for PropertiesView
impl UnsafeUnpin for PropertiesView
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more