pub struct SetterViewModel { /* private fields */ }Expand description
A setter of a value frame: the property, the value, and whether the setter is the one that
is in effect (IsActive) and whether the filter of the setters shows it (IsVisible).
Implementations§
Source§impl SetterViewModel
impl SetterViewModel
pub fn new( property: &'static FerroProperty, value: Option<BoxedValue>, clipboard: Option<Rc<dyn IClipboard>>, ) -> Rc<Self>
Sourcepub fn construct(
property: &'static FerroProperty,
value: Option<BoxedValue>,
clipboard: Option<Rc<dyn IClipboard>>,
) -> Self
pub fn construct( property: &'static FerroProperty, value: Option<BoxedValue>, clipboard: Option<Rc<dyn IClipboard>>, ) -> Self
The state of the class, for the classes that derive from it (the constructor body runs on it before it is shared).
pub fn property(&self) -> &'static FerroProperty
pub fn name(&self) -> String
pub fn value(&self) -> Option<BoxedValue>
pub fn is_active(&self) -> bool
pub fn set_is_active(&self, value: bool)
pub fn is_visible(&self) -> bool
pub fn set_is_visible(&self, value: bool)
Sourcepub fn copy_value(&self)
pub fn copy_value(&self)
CopyValue of this class (the virtual member dispatches through SetterViewModelRef):
copies the text of the value.
pub fn copy_property_name(&self)
Sourcepub fn copy_to_clipboard(&self, value: &str)
pub fn copy_to_clipboard(&self, value: &str)
CopyToClipboard: starts setting the text of the clipboard, without waiting for it (the
managed original discards the task).
Trait Implementations§
Source§impl INotifyPropertyChanged for SetterViewModel
impl INotifyPropertyChanged for SetterViewModel
Source§fn property_changed(&self) -> &Event<str>
fn property_changed(&self) -> &Event<str>
The event raised when a property value changes.
Source§fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
fn as_notify_property_changing(&self) -> Option<&dyn INotifyPropertyChanging>
The object as
INotifyPropertyChanging, when it also raises the event of a property
that is about to change; None by default. Read moreSource§impl MarkupTyped for SetterViewModel
impl MarkupTyped for SetterViewModel
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
The markup metadata of the type.
Auto Trait Implementations§
impl !Freeze for SetterViewModel
impl !RefUnwindSafe for SetterViewModel
impl !Send for SetterViewModel
impl !Sync for SetterViewModel
impl !UnwindSafe for SetterViewModel
impl Unpin for SetterViewModel
impl UnsafeUnpin for SetterViewModel
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