pub struct Setter { /* private fields */ }Expand description
A setter for a Style.
A setter describes what will take place when the requirements for a style are met: it sets a property to a value, binds it to a source of values or sets it to the result of a template.
Implementations§
Source§impl Setter
impl Setter
Sourcepub fn new<T: PropertyValue>(
property: &'static StyledProperty<T>,
value: T,
) -> Rc<Self>
pub fn new<T: PropertyValue>( property: &'static StyledProperty<T>, value: T, ) -> Rc<Self>
Creates a setter that sets a styled property to a value.
Sourcepub fn new_untyped(
property: &'static FerroProperty,
value: BoxedValue,
) -> Rc<Self>
pub fn new_untyped( property: &'static FerroProperty, value: BoxedValue, ) -> Rc<Self>
Creates a setter that sets a property to an untyped value, which must hold exactly the property’s value type.
Sourcepub fn new_binding(
property: &'static FerroProperty,
source: Rc<dyn IObservable<BoxedValue>>,
) -> Rc<Self>
pub fn new_binding( property: &'static FerroProperty, source: Rc<dyn IObservable<BoxedValue>>, ) -> Rc<Self>
Creates a setter that binds a property to a source of values.
Sourcepub fn new_binding_base(
property: &'static FerroProperty,
binding: Rc<dyn BindingBase>,
) -> Rc<Self>
pub fn new_binding_base( property: &'static FerroProperty, binding: Rc<dyn BindingBase>, ) -> Rc<Self>
Creates a setter that binds a property with a binding (a compiled, string-path, template or multi binding).
Sourcepub fn new_template(
property: &'static FerroProperty,
template: Rc<dyn ITemplate>,
) -> Rc<Self>
pub fn new_template( property: &'static FerroProperty, template: Rc<dyn ITemplate>, ) -> Rc<Self>
Creates a setter that sets a property to the object built by a template.
Sourcepub fn with_value(
property: &'static FerroProperty,
value: SetterValue,
) -> Rc<Self>
pub fn with_value( property: &'static FerroProperty, value: SetterValue, ) -> Rc<Self>
Creates a setter for a property with the given kind of value.
Sourcepub fn property(&self) -> Option<&'static FerroProperty>
pub fn property(&self) -> Option<&'static FerroProperty>
The property to set.
pub fn set_property(&self, value: Option<&'static FerroProperty>)
Sourcepub fn value(&self) -> Option<SetterValue>
pub fn value(&self) -> Option<SetterValue>
The property value.
pub fn set_value(&self, value: Option<SetterValue>)
Sourcepub fn set_setter_value(&self, value: &dyn ISetterValue, boxed: BoxedValue)
pub fn set_setter_value(&self, value: &dyn ISetterValue, boxed: BoxedValue)
Sets a plain value that wants to be notified that it has become a
setter value. boxed is the value as it will be set on the property.
Trait Implementations§
Source§impl IAnimationSetter for Setter
impl IAnimationSetter for Setter
Source§fn property(&self) -> Option<&'static FerroProperty>
fn property(&self) -> Option<&'static FerroProperty>
fn set_property(&self, value: Option<&'static FerroProperty>)
Source§fn value(&self) -> Option<SetterValue>
fn value(&self) -> Option<SetterValue>
fn set_value(&self, value: Option<SetterValue>)
impl ISetterInstance for Setter
Source§impl MarkupTyped for Setter
impl MarkupTyped for Setter
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Auto Trait Implementations§
impl !Freeze for Setter
impl !RefUnwindSafe for Setter
impl !Send for Setter
impl !Sync for Setter
impl !UnwindSafe for Setter
impl Unpin for Setter
impl UnsafeUnpin for Setter
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