pub struct ResourceSelectorConverter { /* private fields */ }Expand description
A resource dictionary that converts a resource key to the resource it holds under that key.
Implementations§
Source§impl ResourceSelectorConverter
impl ResourceSelectorConverter
pub fn construct() -> Self
pub fn new() -> Ref<Self>
Sourcepub fn as_value_converter(this: Ref<Self>) -> Rc<dyn IValueConverter>
pub fn as_value_converter(this: Ref<Self>) -> Rc<dyn IValueConverter>
The converter as its contract (the class implements it in the original).
Sourcepub fn convert(
&self,
key: Option<&BoxedValue>,
_culture: &CultureInfo,
) -> Result<Option<BoxedValue>, BindingError>
pub fn convert( &self, key: Option<&BoxedValue>, _culture: &CultureInfo, ) -> Result<Option<BoxedValue>, BindingError>
Convert: the resource of the dictionary whose key is the text
key. Fails when key is not text.
Sourcepub fn convert_back(
&self,
_value: Option<&BoxedValue>,
_culture: &CultureInfo,
) -> Result<Option<BoxedValue>, BindingError>
pub fn convert_back( &self, _value: Option<&BoxedValue>, _culture: &CultureInfo, ) -> Result<Option<BoxedValue>, BindingError>
ConvertBack: fails, the conversion has no inverse.
Methods from Deref<Target = ResourceDictionary>§
Sourcepub fn to_ref(&self) -> Ref<ResourceDictionary>
pub fn to_ref(&self) -> Ref<ResourceDictionary>
Returns a strong reference to this object.
Sourcepub fn get(&self, key: &ResourceKey) -> Option<Rc<dyn AnyValue>>
pub fn get(&self, key: &ResourceKey) -> Option<Rc<dyn AnyValue>>
Gets a resource of the dictionary itself; None (a null value) if the
key is not present.
Sourcepub fn set(&self, key: impl Into<ResourceKey>, value: Option<Rc<dyn AnyValue>>)
pub fn set(&self, key: impl Into<ResourceKey>, value: Option<Rc<dyn AnyValue>>)
Adds or replaces a resource.
Sourcepub fn keys(&self) -> Vec<ResourceKey>
pub fn keys(&self) -> Vec<ResourceKey>
The keys of the resources in the dictionary itself.
Sourcepub fn merged_dictionaries(&self) -> FerroList<Rc<dyn IResourceProvider>>
pub fn merged_dictionaries(&self) -> FerroList<Rc<dyn IResourceProvider>>
The child resource dictionaries.
The list is returned by handle: clones refer to the same list.
Sourcepub fn add_merged_dictionary(
&self,
provider: impl Into<Rc<dyn IResourceProvider>>,
)
pub fn add_merged_dictionary( &self, provider: impl Into<Rc<dyn IResourceProvider>>, )
Adds a child resource dictionary.
Sourcepub fn remove_merged_dictionary(
&self,
provider: &Rc<dyn IResourceProvider>,
) -> bool
pub fn remove_merged_dictionary( &self, provider: &Rc<dyn IResourceProvider>, ) -> bool
Removes a child resource dictionary. Returns whether it was present.
Sourcepub fn theme_dictionaries(
&self,
) -> FerroDictionary<ThemeVariant, Rc<dyn IThemeVariantProvider>>
pub fn theme_dictionaries( &self, ) -> FerroDictionary<ThemeVariant, Rc<dyn IThemeVariantProvider>>
The resource providers used for specific theme variants.
The dictionary is returned by handle: clones refer to the same dictionary. A provider added to it gets the owner of this dictionary; a removed one loses it.
Sourcepub fn theme_dictionaries_snapshot(
&self,
) -> Vec<(ThemeVariant, Rc<dyn IThemeVariantProvider>)>
pub fn theme_dictionaries_snapshot( &self, ) -> Vec<(ThemeVariant, Rc<dyn IThemeVariantProvider>)>
A snapshot of the resource providers used for specific theme variants.
Sourcepub fn theme_dictionary(
&self,
variant: &ThemeVariant,
) -> Option<Rc<dyn IThemeVariantProvider>>
pub fn theme_dictionary( &self, variant: &ThemeVariant, ) -> Option<Rc<dyn IThemeVariantProvider>>
The resource provider used for the given theme variant.
Sourcepub fn add_theme_dictionary(
&self,
variant: ThemeVariant,
provider: impl Into<Rc<dyn IThemeVariantProvider>>,
)
pub fn add_theme_dictionary( &self, variant: ThemeVariant, provider: impl Into<Rc<dyn IThemeVariantProvider>>, )
Adds a resource provider for a theme variant. Panics if the variant already has one.
Sourcepub fn set_theme_dictionary(
&self,
variant: ThemeVariant,
provider: impl Into<Rc<dyn IThemeVariantProvider>>,
)
pub fn set_theme_dictionary( &self, variant: ThemeVariant, provider: impl Into<Rc<dyn IThemeVariantProvider>>, )
Adds or replaces the resource provider of a theme variant.
Sourcepub fn remove_theme_dictionary(&self, variant: &ThemeVariant) -> bool
pub fn remove_theme_dictionary(&self, variant: &ThemeVariant) -> bool
Removes the resource provider of a theme variant. Returns whether it was present.
Sourcepub fn key(&self) -> Option<ThemeVariant>
pub fn key(&self) -> Option<ThemeVariant>
The key that is used in the theme dictionaries of the containing resource dictionary.
pub fn set_key(&self, value: Option<ThemeVariant>)
Sourcepub fn add(&self, key: impl Into<ResourceKey>, value: Option<Rc<dyn AnyValue>>)
pub fn add(&self, key: impl Into<ResourceKey>, value: Option<Rc<dyn AnyValue>>)
Adds a resource. Panics if the key is already present.
Sourcepub fn add_value<T>(&self, key: impl Into<ResourceKey>, value: T)where
T: PartialEq + 'static,
pub fn add_value<T>(&self, key: impl Into<ResourceKey>, value: T)where
T: PartialEq + 'static,
Adds a resource value. Panics if the key is already present.
Sourcepub fn add_deferred_fn(
&self,
key: impl Into<ResourceKey>,
factory: impl Fn(Option<&Rc<dyn IServiceProvider>>) -> Option<Rc<dyn AnyValue>> + 'static,
)
pub fn add_deferred_fn( &self, key: impl Into<ResourceKey>, factory: impl Fn(Option<&Rc<dyn IServiceProvider>>) -> Option<Rc<dyn AnyValue>> + 'static, )
Adds a resource that is created by factory the first time it is
requested.
Sourcepub fn add_deferred(
&self,
key: impl Into<ResourceKey>,
deferred_content: Rc<dyn IDeferredContent>,
)
pub fn add_deferred( &self, key: impl Into<ResourceKey>, deferred_content: Rc<dyn IDeferredContent>, )
Adds a resource that is built from deferred_content the first time
it is requested.
Adds a resource that is built from deferred_content every time it is
requested.
Sourcepub fn set_items(
&self,
values: impl IntoIterator<Item = (ResourceKey, Option<Rc<dyn AnyValue>>)>,
)
pub fn set_items( &self, values: impl IntoIterator<Item = (ResourceKey, Option<Rc<dyn AnyValue>>)>, )
Adds or replaces multiple resources, raising a single notification.
Sourcepub fn contains_key(&self, key: &ResourceKey) -> bool
pub fn contains_key(&self, key: &ResourceKey) -> bool
Whether the dictionary itself contains the key.
Sourcepub fn remove(&self, key: &ResourceKey) -> bool
pub fn remove(&self, key: &ResourceKey) -> bool
Removes a resource. Returns whether it was present.
Sourcepub fn try_get_value(
&self,
key: &ResourceKey,
) -> Option<Option<Rc<dyn AnyValue>>>
pub fn try_get_value( &self, key: &ResourceKey, ) -> Option<Option<Rc<dyn AnyValue>>>
Gets a resource of the dictionary itself, building it if it is deferred.
Sourcepub fn ensure_capacity(&self, capacity: usize)
pub fn ensure_capacity(&self, capacity: usize)
Ensures that the dictionary can hold up to capacity resources
without further expansion of its backing storage.
Sourcepub fn contains_deferred_key(&self, key: &ResourceKey) -> bool
pub fn contains_deferred_key(&self, key: &ResourceKey) -> bool
Whether the key is present and its resource has not been built yet.
Methods from Deref<Target = ResourceProvider>§
Sourcepub fn to_ref(&self) -> Ref<ResourceProvider>
pub fn to_ref(&self) -> Ref<ResourceProvider>
Returns a strong reference to this object.
Sourcepub fn has_resources(&self) -> bool
pub fn has_resources(&self) -> bool
Whether the provider has resources.
Sourcepub fn try_get_resource(
&self,
key: &ResourceKey,
theme: Option<&ThemeVariant>,
) -> Option<Option<Rc<dyn AnyValue>>>
pub fn try_get_resource( &self, key: &ResourceKey, theme: Option<&ThemeVariant>, ) -> Option<Option<Rc<dyn AnyValue>>>
Tries to find a resource within the provider.
Sourcepub fn on_add_owner(&self, owner: &ResourceHostRef)
pub fn on_add_owner(&self, owner: &ResourceHostRef)
Handles when the owner is added. The base method notifies the owner about its resources changing, if the provider has any.
Sourcepub fn on_remove_owner(&self, owner: &ResourceHostRef)
pub fn on_remove_owner(&self, owner: &ResourceHostRef)
Handles when the owner is removed. The base method notifies the owner about its resources changing, if the provider has any.
Sourcepub fn owner(&self) -> Option<ResourceHostRef>
pub fn owner(&self) -> Option<ResourceHostRef>
The owner of the resource provider.
Sourcepub fn owner_changed(&self, handler: impl Fn() + 'static) -> Rc<dyn IDisposable>
pub fn owner_changed(&self, handler: impl Fn() + 'static) -> Rc<dyn IDisposable>
Raised when the owner of the resource provider changes.
Sourcepub fn raise_resources_changed(&self)
pub fn raise_resources_changed(&self)
Notifies the owner, if any, that the resources of the provider have changed.
Sourcepub fn add_owner(&self, owner: &ResourceHostRef)
pub fn add_owner(&self, owner: &ResourceHostRef)
Adds an owner to the resource provider.
Sourcepub fn remove_owner(&self, owner: &ResourceHostRef)
pub fn remove_owner(&self, owner: &ResourceHostRef)
Removes a resource provider owner.
Methods from Deref<Target = FerroObject>§
Sourcepub fn dispatcher(&self) -> &Arc<Dispatcher> ⓘ
pub fn dispatcher(&self) -> &Arc<Dispatcher> ⓘ
Returns the Dispatcher that this object is associated with: the
dispatcher of the thread that owns the object.
Sourcepub fn check_access(&self) -> bool
pub fn check_access(&self) -> bool
Returns whether the calling thread is the thread that owns this object.
Sourcepub fn verify_access(&self)
pub fn verify_access(&self)
Sourcepub fn to_ref(&self) -> Ref<FerroObject>
pub fn to_ref(&self) -> Ref<FerroObject>
A strong reference to this object.
Sourcepub fn to_weak(&self) -> WeakRef<FerroObject>
pub fn to_weak(&self) -> WeakRef<FerroObject>
A weak reference to this object.
Sourcepub fn is<T>(&self) -> boolwhere
T: ObjectType,
pub fn is<T>(&self) -> boolwhere
T: ObjectType,
Whether the object is of class T or a class derived from it.
Sourcepub fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
pub fn downcast_ref<T>(&self) -> Option<&T>where
T: ObjectType,
Returns the object viewed as class T if it is one.
Sourcepub fn on_property_changed(&self, change: &FerroPropertyChangedEventArgs<'_>)
pub fn on_property_changed(&self, change: &FerroPropertyChangedEventArgs<'_>)
Invokes the on_property_changed virtual member.
Sourcepub fn inheritance_parent(&self) -> Option<Ref<FerroObject>>
pub fn inheritance_parent(&self) -> Option<Ref<FerroObject>>
The parent object that inherited property values are inherited from.
Sourcepub fn set_inheritance_parent(&self, value: impl Into<Nullable<FerroObject>>)
pub fn set_inheritance_parent(&self, value: impl Into<Nullable<FerroObject>>)
Sets the parent object that inherited property values are inherited from.
Sourcepub fn clear_value<T>(&self, property: &'static StyledProperty<T>)where
T: PropertyValue,
pub fn clear_value<T>(&self, property: &'static StyledProperty<T>)where
T: PropertyValue,
Clears a property’s local value.
Sourcepub fn get_value<T>(&self, property: &'static StyledProperty<T>) -> Twhere
T: PropertyValue,
pub fn get_value<T>(&self, property: &'static StyledProperty<T>) -> Twhere
T: PropertyValue,
Gets a property value.
Sourcepub fn get_base_value<T>(
&self,
property: &'static StyledProperty<T>,
) -> Option<T>where
T: PropertyValue,
pub fn get_base_value<T>(
&self,
property: &'static StyledProperty<T>,
) -> Option<T>where
T: PropertyValue,
Gets a property’s base value: the value excluding animated values.
Returns None if the value comes from inheritance or the default.
Sourcepub fn is_animating(&self, property: &FerroProperty) -> bool
pub fn is_animating(&self, property: &FerroProperty) -> bool
Checks whether a property is animating.
Sourcepub fn is_set(&self, property: &FerroProperty) -> bool
pub fn is_set(&self, property: &FerroProperty) -> bool
Checks whether a styled property has a value assigned to it or a binding targeting it.
Sourcepub fn set_value<T>(&self, property: &'static StyledProperty<T>, value: T)where
T: PropertyValue,
pub fn set_value<T>(&self, property: &'static StyledProperty<T>, value: T)where
T: PropertyValue,
Sets a property value with local value priority.
Sourcepub fn set_value_with_priority<T>(
&self,
property: &'static StyledProperty<T>,
value: T,
priority: BindingPriority,
) -> Option<Rc<dyn IDisposable>>where
T: PropertyValue,
pub fn set_value_with_priority<T>(
&self,
property: &'static StyledProperty<T>,
value: T,
priority: BindingPriority,
) -> Option<Rc<dyn IDisposable>>where
T: PropertyValue,
Sets a property value with the given priority. For priorities other than local value, disposing the returned handle removes the value.
Sourcepub fn set_current_value<T>(
&self,
property: &'static StyledProperty<T>,
value: T,
)where
T: PropertyValue,
pub fn set_current_value<T>(
&self,
property: &'static StyledProperty<T>,
value: T,
)where
T: PropertyValue,
Sets the value of a property without changing its value source.
This is used by a component that programmatically sets the value of one of its own properties without disabling an application’s declared use of the property: the effective value changes, but existing bindings and styles continue to work. The new value has the property’s current priority.
Sourcepub fn bind_binding(
&self,
property: &'static FerroProperty,
binding: &dyn BindingBase,
) -> Rc<dyn BindingExpressionBase>
pub fn bind_binding( &self, property: &'static FerroProperty, binding: &dyn BindingBase, ) -> Rc<dyn BindingExpressionBase>
Binds a property to a binding. Returns the binding expression which represents the binding instance on this object.
Sourcepub fn bind_binding_with_anchor(
&self,
property: &'static FerroProperty,
binding: &dyn BindingBase,
anchor: Option<&Ref<FerroObject>>,
) -> Rc<dyn BindingExpressionBase>
pub fn bind_binding_with_anchor( &self, property: &'static FerroProperty, binding: &dyn BindingBase, anchor: Option<&Ref<FerroObject>>, ) -> Rc<dyn BindingExpressionBase>
Binds a property to a binding.
Some bindings need context to locate their source: a data context,
named elements or resources. If this object is not an element, or is
not yet attached to the tree, anchor provides that context.
Sourcepub fn indexer(&self, binding: &IndexerDescriptor) -> IndexerBinding
pub fn indexer(&self, binding: &IndexerDescriptor) -> IndexerBinding
Gets a binding to a property of this object: the indexer taking an
IndexerDescriptor
(source[!Property] is source.indexer(&Property.bind())).
Sourcepub fn bind_indexer(
&self,
binding: &IndexerDescriptor,
value: &dyn BindingBase,
) -> Rc<dyn BindingExpressionBase>
pub fn bind_indexer( &self, binding: &IndexerDescriptor, value: &dyn BindingBase, ) -> Rc<dyn BindingExpressionBase>
Binds the property of an
IndexerDescriptor to a binding:
the setter of the indexer (target[!Property] = binding is
target.bind_indexer(&Property.bind(), &binding)).
Sourcepub fn bind<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<T>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<T>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a property to an observable.
Sourcepub fn bind_value<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<BindingValue<T>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_value<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<BindingValue<T>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a property to an observable of binding values.
Sourcepub fn bind_untyped<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_untyped<T>(
&self,
property: &'static StyledProperty<T>,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a property to an observable of untyped values.
Sourcepub fn coerce_value(&self, property: &'static FerroProperty)
pub fn coerce_value(&self, property: &'static FerroProperty)
Coerces the specified property.
Sourcepub fn get_direct_value<T>(&self, property: &'static DirectPropertyBase<T>) -> Twhere
T: PropertyValue,
pub fn get_direct_value<T>(&self, property: &'static DirectPropertyBase<T>) -> Twhere
T: PropertyValue,
Gets a direct property value.
Sourcepub fn set_direct_value<T>(
&self,
property: &'static DirectPropertyBase<T>,
value: T,
)where
T: PropertyValue,
pub fn set_direct_value<T>(
&self,
property: &'static DirectPropertyBase<T>,
value: T,
)where
T: PropertyValue,
Sets a direct property value.
Sourcepub fn clear_direct_value<T>(&self, property: &'static DirectPropertyBase<T>)where
T: PropertyValue,
pub fn clear_direct_value<T>(&self, property: &'static DirectPropertyBase<T>)where
T: PropertyValue,
Resets a direct property to its unset value.
Sourcepub fn bind_direct<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<T>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_direct<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<T>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a direct property to an observable.
Sourcepub fn bind_direct_value<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<BindingValue<T>>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_direct_value<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<BindingValue<T>>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a direct property to an observable of binding values.
Sourcepub fn bind_direct_untyped<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
pub fn bind_direct_untyped<T>(
&self,
property: &'static DirectPropertyBase<T>,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
) -> Rc<dyn IDisposable>where
T: PropertyValue,
Binds a direct property to an observable of untyped values.
Sourcepub fn set_and_raise<T>(
&self,
property: &'static DirectPropertyBase<T>,
field: &RefCell<T>,
value: T,
) -> boolwhere
T: PropertyValue,
pub fn set_and_raise<T>(
&self,
property: &'static DirectPropertyBase<T>,
field: &RefCell<T>,
value: T,
) -> boolwhere
T: PropertyValue,
Sets the backing field of a direct property, raising a change notification if the value changed. Returns true if it changed.
Sourcepub fn set_and_raise_cell<T>(
&self,
property: &'static DirectPropertyBase<T>,
field: &Cell<T>,
value: T,
) -> boolwhere
T: PropertyValue + Copy,
pub fn set_and_raise_cell<T>(
&self,
property: &'static DirectPropertyBase<T>,
field: &Cell<T>,
value: T,
) -> boolwhere
T: PropertyValue + Copy,
set_and_raise for Copy values stored in a
Cell.
Sourcepub fn get_value_untyped(
&self,
property: &'static FerroProperty,
) -> Rc<dyn AnyValue>
pub fn get_value_untyped( &self, property: &'static FerroProperty, ) -> Rc<dyn AnyValue>
Gets a property value as an untyped value.
Sourcepub fn set_value_untyped(
&self,
property: &'static FerroProperty,
value: &(dyn Any + 'static),
priority: BindingPriority,
) -> Option<Rc<dyn IDisposable>>
pub fn set_value_untyped( &self, property: &'static FerroProperty, value: &(dyn Any + 'static), priority: BindingPriority, ) -> Option<Rc<dyn IDisposable>>
Sets a property from an untyped value, which must hold exactly the property’s value type or the unset marker.
Sourcepub fn set_current_value_untyped(
&self,
property: &'static FerroProperty,
value: &(dyn Any + 'static),
)
pub fn set_current_value_untyped( &self, property: &'static FerroProperty, value: &(dyn Any + 'static), )
set_current_value with an untyped value.
Sourcepub fn clear_value_untyped(&self, property: &'static FerroProperty)
pub fn clear_value_untyped(&self, property: &'static FerroProperty)
Clears a property’s local value.
Sourcepub fn bind_property_untyped(
&self,
property: &'static FerroProperty,
source: Rc<dyn IObservable<Rc<dyn AnyValue>>>,
priority: BindingPriority,
) -> Rc<dyn IDisposable>
pub fn bind_property_untyped( &self, property: &'static FerroProperty, source: Rc<dyn IObservable<Rc<dyn AnyValue>>>, priority: BindingPriority, ) -> Rc<dyn IDisposable>
Binds a property to an observable of untyped values.
Sourcepub fn property_changed(
&self,
handler: impl Fn(&FerroPropertyChangedEventArgs<'_>) + 'static,
) -> Rc<dyn IDisposable>
pub fn property_changed( &self, handler: impl Fn(&FerroPropertyChangedEventArgs<'_>) + 'static, ) -> Rc<dyn IDisposable>
Subscribes to property changes on this object. Disposing the returned handle unsubscribes.
Sourcepub fn add_property_changed_handler(
&self,
handler: Rc<dyn Fn(&FerroPropertyChangedEventArgs<'_>)>,
) -> u64
pub fn add_property_changed_handler( &self, handler: Rc<dyn Fn(&FerroPropertyChangedEventArgs<'_>)>, ) -> u64
Subscribes handler to property changes on this object and returns
the token that remove_property_changed_handler
takes: property_changed for a subscriber
that keeps the object and the token itself, so that no handle is made.
Sourcepub fn remove_property_changed_handler(&self, token: u64) -> bool
pub fn remove_property_changed_handler(&self, token: u64) -> bool
Ends a subscription of add_property_changed_handler.
Sourcepub fn property_changed_subscriber_count(&self) -> usize
pub fn property_changed_subscriber_count(&self) -> usize
The number of subscribers to property changes on this object (a diagnostics member, used by tests to verify that subscriptions are released).
Sourcepub fn raise_property_changed<T>(
&self,
property: &'static FerroProperty,
old_value: Option<&T>,
new_value: &T,
priority: BindingPriority,
is_effective_value: bool,
)where
T: PropertyValue,
pub fn raise_property_changed<T>(
&self,
property: &'static FerroProperty,
old_value: Option<&T>,
new_value: &T,
priority: BindingPriority,
is_effective_value: bool,
)where
T: PropertyValue,
Raises a property changed notification.
Sourcepub fn raise_direct_property_changed<T>(
&self,
property: &'static DirectPropertyBase<T>,
old_value: &T,
new_value: &T,
)where
T: PropertyValue,
pub fn raise_direct_property_changed<T>(
&self,
property: &'static DirectPropertyBase<T>,
old_value: &T,
new_value: &T,
)where
T: PropertyValue,
Raises a property changed notification for a direct property.
Trait Implementations§
Source§impl Deref for ResourceSelectorConverter
impl Deref for ResourceSelectorConverter
Source§type Target = ResourceDictionary
type Target = ResourceDictionary
Source§fn deref(&self) -> &ResourceDictionary
fn deref(&self) -> &ResourceDictionary
Source§impl FerroObjectImpl for ResourceSelectorConverter
impl FerroObjectImpl for ResourceSelectorConverter
Source§fn constructed(this: &Self)
fn constructed(this: &Self)
parent_constructed first.Source§fn on_property_changed_core(
this: &Self,
change: &FerroPropertyChangedEventArgs<'_>,
)
fn on_property_changed_core( this: &Self, change: &FerroPropertyChangedEventArgs<'_>, )
on_property_changed instead.Source§fn on_property_changed(this: &Self, change: &FerroPropertyChangedEventArgs<'_>)
fn on_property_changed(this: &Self, change: &FerroPropertyChangedEventArgs<'_>)
Source§fn update_data_validation(
this: &Self,
property: &'static FerroProperty,
state: BindingValueType,
error: Option<&BindingError>,
)
fn update_data_validation( this: &Self, property: &'static FerroProperty, state: BindingValueType, error: Option<&BindingError>, )
Source§impl ObjectType for ResourceSelectorConverter
impl ObjectType for ResourceSelectorConverter
Source§type Parent = ResourceDictionary
type Parent = ResourceDictionary
Source§type VTable = <ResourceDictionary as ObjectType>::VTable
type VTable = <ResourceDictionary as ObjectType>::VTable
Source§fn vtable() -> &'static Self::VTable
fn vtable() -> &'static Self::VTable
Self.Source§fn register_class()
fn register_class()
Source§impl ResourceProviderImpl for ResourceSelectorConverter
impl ResourceProviderImpl for ResourceSelectorConverter
Source§fn has_resources(this: &Self) -> bool
fn has_resources(this: &Self) -> bool
Source§fn try_get_resource(
this: &Self,
key: &ResourceKey,
theme: Option<&ThemeVariant>,
) -> Option<Option<Rc<dyn AnyValue>>>
fn try_get_resource( this: &Self, key: &ResourceKey, theme: Option<&ThemeVariant>, ) -> Option<Option<Rc<dyn AnyValue>>>
Source§fn on_add_owner(this: &Self, owner: &ResourceHostRef)
fn on_add_owner(this: &Self, owner: &ResourceHostRef)
Source§fn on_remove_owner(this: &Self, owner: &ResourceHostRef)
fn on_remove_owner(this: &Self, owner: &ResourceHostRef)
impl<T> Subclassable<T> for ResourceSelectorConverterwhere
ResourceDictionary: Subclassable<T>,
Source§impl Upcast<ResourceSelectorConverter> for ResourceSelectorConverter
impl Upcast<ResourceSelectorConverter> for ResourceSelectorConverter
fn upcast(&self) -> &ResourceSelectorConverter
Auto Trait Implementations§
impl !Freeze for ResourceSelectorConverter
impl !RefUnwindSafe for ResourceSelectorConverter
impl !Send for ResourceSelectorConverter
impl !Sync for ResourceSelectorConverter
impl !UnwindSafe for ResourceSelectorConverter
impl Unpin for ResourceSelectorConverter
impl UnsafeUnpin for ResourceSelectorConverter
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
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