pub struct FerroDialogsInternalViewModelBase { /* private fields */ }Expand description
The base of the view models of the dialogs: the property change notification and the helpers that raise it.
A view model embeds it (the base class of the managed original) and
forwards INotifyPropertyChanged to it. The name of the property is
passed explicitly where the managed original takes the name of the
calling member.
Implementations§
Source§impl FerroDialogsInternalViewModelBase
impl FerroDialogsInternalViewModelBase
pub fn new() -> Self
Sourcepub fn raise_and_set_if_changed<T: PartialEq>(
&self,
field: &RefCell<T>,
value: T,
property_name: &str,
) -> bool
pub fn raise_and_set_if_changed<T: PartialEq>( &self, field: &RefCell<T>, value: T, property_name: &str, ) -> bool
RaiseAndSetIfChanged(ref field, value) for a field of a type that
is not Copy: stores value and raises the notification of
property_name when it differs from the stored value. Returns
whether it did.
Sourcepub fn raise_and_set_if_changed_cell<T: PartialEq + Copy>(
&self,
field: &Cell<T>,
value: T,
property_name: &str,
) -> bool
pub fn raise_and_set_if_changed_cell<T: PartialEq + Copy>( &self, field: &Cell<T>, value: T, property_name: &str, ) -> bool
RaiseAndSetIfChanged(ref field, value) for a Copy field.
Sourcepub fn raise_property_changed(&self, property_name: &str)
pub fn raise_property_changed(&self, property_name: &str)
RaisePropertyChanged(propertyName).
Trait Implementations§
Source§impl INotifyPropertyChanged for FerroDialogsInternalViewModelBase
impl INotifyPropertyChanged for FerroDialogsInternalViewModelBase
Source§fn property_changed(&self) -> &Event<str>
fn property_changed(&self) -> &Event<str>
The event raised when a property value changes.
Auto Trait Implementations§
impl !Freeze for FerroDialogsInternalViewModelBase
impl !RefUnwindSafe for FerroDialogsInternalViewModelBase
impl !Send for FerroDialogsInternalViewModelBase
impl !Sync for FerroDialogsInternalViewModelBase
impl !UnwindSafe for FerroDialogsInternalViewModelBase
impl Unpin for FerroDialogsInternalViewModelBase
impl UnsafeUnpin for FerroDialogsInternalViewModelBase
Blanket Implementations§
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