pub struct ViewLocator { /* private fields */ }Expand description
Builds the view of a view model: the class whose full name is the full name of the class of
the view model with ViewModel replaced by View.
Implementations§
Source§impl ViewLocator
impl ViewLocator
pub fn new() -> Rc<ViewLocator>
Sourcepub fn as_data_template(&self) -> Rc<dyn IDataTemplate>
pub fn as_data_template(&self) -> Rc<dyn IDataTemplate>
The locator as the data template contract.
Trait Implementations§
Source§impl IDataTemplate for ViewLocator
impl IDataTemplate for ViewLocator
Source§fn match_(&self, data: Option<&BoxedValue>) -> bool
fn match_(&self, data: Option<&BoxedValue>) -> bool
Checks to see if this data template matches the specified data.
Source§fn as_any(&self) -> Option<&dyn Any>
fn as_any(&self) -> Option<&dyn Any>
The implementing value, for casting to its concrete type
(
as_any()?.downcast_ref::<T>()): the equivalent of is/as on the
contract. None for an implementation that does not expose itself.Source§fn as_recycling_data_template(&self) -> Option<&dyn IRecyclingDataTemplate>
fn as_recycling_data_template(&self) -> Option<&dyn IRecyclingDataTemplate>
The template viewed as a recycling data template, if it is one.
Source§fn as_typed_data_template(&self) -> Option<&dyn ITypedDataTemplate>
fn as_typed_data_template(&self) -> Option<&dyn ITypedDataTemplate>
The template viewed as a typed data template, if it is one.
Source§fn as_tree_data_template(&self) -> Option<&dyn ITreeDataTemplate>
fn as_tree_data_template(&self) -> Option<&dyn ITreeDataTemplate>
The template viewed as a tree data template, if it is one.
Source§impl IRecyclingDataTemplate for ViewLocator
Deviation (DEVIATIONS.md, Developer tools): the locator is a recycling data template. The view
it built last for a content is reused for the next view model of the same view, which gets it as
its data context, where upstream builds a new view for every view model: the details of a
control are a new view model at every selection of a node, and building their view again (the
property grid with its columns, rows and editors, the layout, the value frames) made the
properties appear a moment after the selection. The views follow their data context.
impl IRecyclingDataTemplate for ViewLocator
Deviation (DEVIATIONS.md, Developer tools): the locator is a recycling data template. The view it built last for a content is reused for the next view model of the same view, which gets it as its data context, where upstream builds a new view for every view model: the details of a control are a new view model at every selection of a node, and building their view again (the property grid with its columns, rows and editors, the layout, the value frames) made the properties appear a moment after the selection. The views follow their data context.
Source§impl ITemplateWithParam<Option<Rc<dyn AnyValue>>, Option<Ref<Control>>> for ViewLocator
impl ITemplateWithParam<Option<Rc<dyn AnyValue>>, Option<Ref<Control>>> for ViewLocator
Source§impl MarkupTyped for ViewLocator
impl MarkupTyped for ViewLocator
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
Auto Trait Implementations§
impl !RefUnwindSafe for ViewLocator
impl !Send for ViewLocator
impl !Sync for ViewLocator
impl !UnwindSafe for ViewLocator
impl Freeze for ViewLocator
impl Unpin for ViewLocator
impl UnsafeUnpin for ViewLocator
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more