Skip to main content

CacheMode

Struct CacheMode 

Source
pub struct CacheMode { /* private fields */ }
Expand description

Represents cached content modes for graphics acceleration features.

Implementations§

Source§

impl CacheMode

Source

pub const TYPE: &'static TypeInfo = <CacheMode as crate::StaticType>::TYPE

The runtime type of this class.

Source

pub fn to_ref(&self) -> Ref<CacheMode>

Returns a strong reference to this object.

Source§

impl CacheMode

Source

pub fn get_for_compositor(&self, c: &Rc<Compositor>) -> Rc<CompositionCacheMode>

The composition cache mode that mirrors this cache mode on compositor c.

Source§

impl CacheMode

Source

pub fn construct() -> Self

Creates the class data; see crate::FerroObject::construct.

Source

pub fn parse(s: &str) -> Result<Ref<CacheMode>, FormatError>

Parses a cache mode: the only known mode is BitmapCache.

Methods from Deref<Target = StyledElement>§

Source

pub fn get_logical_ancestors(&self) -> LogicalAncestors ⓘ

Enumerates the ancestors of the element in the logical tree, from its parent to the root.

Source

pub fn get_self_and_logical_ancestors(&self) -> LogicalAncestors ⓘ

Enumerates the element and its ancestors in the logical tree.

Source

pub fn find_logical_ancestor_of_type<T: ObjectType>( &self, include_self: bool, ) -> Option<Ref<T>>

Finds the first logical ancestor of class T, optionally starting with the element itself.

Source

pub fn get_logical_children(&self) -> Rc<Vec<Ref<StyledElement>>>

The logical children of the element.

Source

pub fn get_logical_descendants(&self) -> LogicalDescendants ⓘ

Enumerates the descendants of the element in the logical tree, in depth-first pre-order.

Source

pub fn get_self_and_logical_descendants(&self) -> LogicalDescendants ⓘ

Enumerates the element and its descendants in the logical tree, in depth-first pre-order.

Source

pub fn find_logical_descendant_of_type<T: ObjectType>( &self, include_self: bool, ) -> Option<Ref<T>>

Finds the first logical descendant of class T (depth first), optionally starting with the element itself.

Source

pub fn get_logical_parent(&self) -> Option<Ref<StyledElement>>

The logical parent of the element.

Source

pub fn get_logical_parent_of_type<T: ObjectType>(&self) -> Option<Ref<T>>

The logical parent of the element, if it is of class T.

Source

pub fn get_logical_siblings(&self) -> Rc<Vec<Ref<StyledElement>>>

The children of the logical parent of the element, including the element itself; empty when the element has no logical parent.

Source

pub fn is_logical_ancestor_of(&self, target: Option<&StyledElement>) -> bool

Whether the element is a logical ancestor of target.

Source

pub fn to_ref(&self) -> Ref<StyledElement>

Returns a strong reference to this object.

Source

pub fn begin_init(&self)

Signals the beginning of a batch of initialization: styling is deferred until the matching end_init.

Source

pub fn try_end_init(&self) -> Result<(), InitializationError>

Signals the end of a batch of initialization: the element is styled (if it is attached to a rooted logical tree) and initialized. A style or control theme that cannot be applied (two setters for the same property) is an error, the counterpart of the invalid operation EndInit raises in the managed original; what follows the failure is skipped. This is the overridable member; end_init is the form that panics on the error.

Source

pub fn logical_children_collection_changed( &self, e: &NotifyCollectionChangedEventArgs<'_, Ref<StyledElement>>, )

Called when the logical children collection changes.

Source

pub fn on_attached_to_logical_tree(&self, e: &LogicalTreeAttachmentEventArgs)

Called when the styled element is added to a rooted logical tree.

Source

pub fn on_detached_from_logical_tree(&self, e: &LogicalTreeAttachmentEventArgs)

Called when the styled element is removed from a rooted logical tree.

Source

pub fn on_data_context_changed(&self)

Called when the data context changes.

Source

pub fn on_data_context_begin_update(&self)

Called when the data context begins updating.

Source

pub fn on_data_context_end_update(&self)

Called when the data context finishes updating.

Source

pub fn on_initialized(&self)

Called when the control finishes initialization.

Source

pub fn style_key_override(&self) -> &'static TypeInfo

The type by which the element is styled. Defaults to the element’s own type; override to be styled as a base class.

Source

pub fn on_control_theme_changed(&self)

Called when the control theme changes.

Source

pub fn on_templated_parent_control_theme_changed(&self)

Called when the templated parent’s control theme changes.

Source

pub fn invalidate_styles(&self, recurse: bool)

Detaches all styles from the element (and optionally from its inheritance children) so that they are re-applied.

Source

pub fn is_logical_root(&self) -> bool

Whether the element is the root of a logical tree.

Source

pub fn styling_parent(&self) -> Option<StyleHostRef>

The parent style host of the element: by default the inheritance parent, when it is a styled element. The root of a tree overrides this to return the host of the global styles.

Source

pub fn notify_child_resources_changed(&self, e: ResourcesChangedEventArgs)

Notifies the children of the element that the resources visible to them have changed. The base method notifies the logical children.

Source

pub fn child_index_provider(&self) -> Option<Rc<dyn IChildIndexProvider>>

The child index provider implemented by the element, if any. Used to match the children of the element by their position.

Source

pub fn is_theme_variant_root(&self) -> bool

Whether the element is a root of theme variant resolution: at a root the default theme variant resolves to the variant of the platform instead of being inherited.

Source

pub fn attached_to_logical_tree( &self, handler: impl Fn(&LogicalTreeAttachmentEventArgs) + 'static, ) -> Rc<dyn IDisposable>

Raised when the styled element is attached to a rooted logical tree.

Source

pub fn detached_from_logical_tree( &self, handler: impl Fn(&LogicalTreeAttachmentEventArgs) + 'static, ) -> Rc<dyn IDisposable>

Raised when the styled element is detached from a rooted logical tree.

Source

pub fn data_context_changed( &self, handler: impl Fn() + 'static, ) -> Rc<dyn IDisposable>

Occurs when the data context property changes.

Source

pub fn initialized(&self, handler: impl Fn() + 'static) -> Rc<dyn IDisposable>

Occurs when the styled element has finished initialization.

Source

pub fn resources_changed( &self, handler: impl Fn(&ResourcesChangedEventArgs) + 'static, ) -> Rc<dyn IDisposable>

Raised when the resources change on the element or an ancestor of the element.

Source

pub fn actual_theme_variant_changed( &self, handler: impl Fn() + 'static, ) -> Rc<dyn IDisposable>

Raised when the theme variant in effect for the element changes.

Source

pub fn name(&self) -> Option<String>

The name of the styled element.

An element’s name is used to uniquely identify it within its name scope. Once the element has been styled its name may not be changed.

Source

pub fn set_name(&self, value: Option<String>)

Source

pub fn classes(&self) -> Classes

The styled element’s classes.

The collection is returned by handle: clones refer to the same collection.

Source

pub fn pseudo_classes(&self) -> &dyn IPseudoClasses

The pseudoclasses of the element, settable by the control itself.

Source

pub fn data_context(&self) -> Option<BoxedValue>

The control’s data context.

The data context is an inherited property that specifies the default object that will be used for data binding.

Source

pub fn set_data_context(&self, value: Option<BoxedValue>)

Source

pub fn is_initialized(&self) -> bool

Whether the element has finished initialization.

For more information about when this happens, see the initialized event.

Source

pub fn styles(&self) -> Ref<Styles>

The styles for the styled element.

Styles for the entire application are added to the application’s styles collection.

Source

pub fn is_styles_initialized(&self) -> bool

Whether the styles collection of the element has been created.

Source

pub fn style_key(&self) -> &'static TypeInfo

The type by which the element is styled.

Source

pub fn resources(&self) -> Ref<ResourceDictionary>

The styled element’s resource dictionary.

Source

pub fn set_resources(&self, value: Ref<ResourceDictionary>)

Source

pub fn theme(&self) -> Option<Ref<ControlTheme>>

The theme to be applied to the element.

By default the theme is looked up as a resource keyed by the element’s style key; setting this property takes precedence over that lookup.

Source

pub fn set_theme(&self, value: impl Into<Nullable<ControlTheme>>)

Source

pub fn actual_theme_variant(&self) -> Option<ThemeVariant>

The UI theme variant that is currently used by the element, which might be different than the requested theme variant. None until a theme variant has been established for the element or an ancestor.

Source

pub fn has_resources(&self) -> bool

Whether the element or its styles have resources.

Source

pub fn try_get_resource( &self, key: &ResourceKey, theme: Option<&ThemeVariant>, ) -> Option<ResourceValue>

Tries to find a resource within the element: in its resource dictionary, then in its styles.

Source

pub fn try_find_resource( &self, key: &ResourceKey, theme: Option<&ThemeVariant>, ) -> Option<ResourceValue>

Tries to find a resource by searching up the logical tree and then the global styles.

Source

pub fn find_resource(&self, key: &ResourceKey) -> ResourceValue

Finds a resource by searching up the logical tree and then the global styles. Returns the unset value marker if it is not found.

Source

pub fn templated_parent(&self) -> Option<Ref<FerroObject>>

The styled element whose lookless template this element is part of.

Source

pub fn set_templated_parent(&self, value: impl Into<Nullable<FerroObject>>)

Sets the templated parent. Called by the template that creates the element.

Source

pub fn logical_children(&self) -> &FerroList<Ref<StyledElement>>

The styled element’s logical children.

Source

pub fn is_attached_to_logical_tree(&self) -> bool

Whether the element is attached to a rooted logical tree.

Source

pub fn parent(&self) -> Option<Ref<StyledElement>>

The styled element’s logical parent.

Source

pub fn apply_styling(&self) -> bool

Applies styling to the control if the control is initialized and styling is not already applied.

The styling system will automatically apply styling when required, so this method need only be called by tests or in rare special cases.

Returns true if styling is applied to the control, false if the control is still initializing.

Source

pub fn try_apply_styling(&self) -> Result<bool, DuplicateSetterError>

As apply_styling, reporting a style or control theme that cannot be applied (two setters for the same property: the invalid operation of the managed original) instead of panicking. After an error the styling pass is ended and the element is not marked as styled, as when the managed original throws.

Source

pub fn end_init(&self)

Signals the end of a batch of initialization (try_end_init). A style or control theme that cannot be applied panics with the message of the error.

Source

pub fn initialize_if_needed(&self)

Marks the element as initialized and raises the initialization notifications, if initialization is complete.

Source

pub fn set_parent(&self, parent: impl Into<Nullable<StyledElement>>)

Sets the element’s logical parent.

You should not usually need to call this method: it is called when an element is added to or removed from a logical children collection.

Source

pub fn notify_attached_to_logical_tree( &self, e: &LogicalTreeAttachmentEventArgs, )

Notifies the element that it has been attached to a rooted logical tree. Called by a parent for children that are part of its logical tree without being in its logical children collection (the template child of a templated control).

Source

pub fn notify_detached_from_logical_tree( &self, e: &LogicalTreeAttachmentEventArgs, )

Notifies the element that it has been detached from a rooted logical tree. See notify_attached_to_logical_tree.

Source

pub fn get_effective_theme(&self) -> Option<Ref<ControlTheme>>

The theme in effect for the element: the Theme property if set, otherwise the control theme resource keyed by the element’s style key that is visible to the element (a resource holding a Ref<ControlTheme>).

Source

pub fn styles_added(&self, styles: &[Rc<dyn IStyle>])

Called when styles are added to the styles collection of the element or a nested styles collection.

Source

pub fn styles_removed(&self, styles: &[Rc<dyn IStyle>])

Called when styles are removed from the styles collection of the element or a nested styles collection.

Source

pub fn notify_resources_changed( &self, e: ResourcesChangedEventArgs, propagate: bool, )

Notifies the element, and with propagate its children, that the resources visible to it have changed.

Source

pub fn set_data_context_with_priority( &self, value: Option<BoxedValue>, priority: BindingPriority, ) -> Option<Rc<dyn IDisposable>>

The priority-aware setter used by templates.

Source

pub fn bind_class( &self, class_name: &str, source: &dyn BindingBase, anchor: Option<&Ref<FerroObject>>, ) -> Rc<dyn BindingExpressionBase>

Binds the presence of the class class_name on this element to source. anchor provides the context the binding locates its source with when the element cannot.

Methods from Deref<Target = Animatable>§

Source

pub fn to_ref(&self) -> Ref<Animatable>

Returns a strong reference to this object.

Source

pub fn clock(&self) -> Option<Rc<dyn IClock>>

The clock which controls the animations and transitions on the object and, by inheritance, on its descendants. The global clock is used when there is none.

Source

pub fn set_clock(&self, value: Option<Rc<dyn IClock>>)

Source

pub fn transitions(&self) -> Option<Transitions>

The property transitions of the object.

Source

pub fn set_transitions(&self, value: Option<Transitions>)

Source

pub fn enable_transitions(&self)

Enables transitions for the object.

This is called when the object is attached to the visual tree, so that transitions do not run on its initial property values.

Source

pub fn disable_transitions(&self)

Disables transitions for the object.

This is called when the object is detached from the visual tree.

Source

pub fn try_get_transition_instance( &self, transition: &Rc<dyn ITransition>, ) -> Option<Rc<TransitionInstance>>

The progress of the transition that transition is currently running on this object: the instance created when the transition was last applied. None when the transition is not one of the object’s transitions or has not been applied.

Methods from Deref<Target = FerroObject>§

Source

pub fn dispatcher(&self) -> &Arc<Dispatcher> ⓘ

Returns the Dispatcher that this object is associated with: the dispatcher of the thread that owns the object.

Source

pub fn check_access(&self) -> bool

Returns whether the calling thread is the thread that owns this object.

Source

pub fn verify_access(&self)

Checks that the calling thread is the thread that owns this object.

§Panics

Panics when it is not.

Source

pub fn to_ref(&self) -> Ref<FerroObject>

A strong reference to this object.

Source

pub fn to_weak(&self) -> WeakRef<FerroObject>

A weak reference to this object.

Source

pub fn get_type(&self) -> &'static TypeInfo

The runtime type of the object.

Source

pub fn is<T: ObjectType>(&self) -> bool

Whether the object is of class T or a class derived from it.

Source

pub fn downcast_ref<T: ObjectType>(&self) -> Option<&T>

Returns the object viewed as class T if it is one.

Source

pub fn on_property_changed(&self, change: &FerroPropertyChangedEventArgs<'_>)

Invokes the on_property_changed virtual member.

Source

pub fn inheritance_parent(&self) -> Option<Ref<FerroObject>>

The parent object that inherited property values are inherited from.

Source

pub fn set_inheritance_parent(&self, value: impl Into<Nullable<FerroObject>>)

Sets the parent object that inherited property values are inherited from.

Source

pub fn clear_value<T: PropertyValue>( &self, property: &'static StyledProperty<T>, )

Clears a property’s local value.

Source

pub fn get_value<T: PropertyValue>( &self, property: &'static StyledProperty<T>, ) -> T

Gets a property value.

Source

pub fn get_base_value<T: PropertyValue>( &self, property: &'static StyledProperty<T>, ) -> Option<T>

Gets a property’s base value: the value excluding animated values. Returns None if the value comes from inheritance or the default.

Source

pub fn is_animating(&self, property: &FerroProperty) -> bool

Checks whether a property is animating.

Source

pub fn is_set(&self, property: &FerroProperty) -> bool

Checks whether a styled property has a value assigned to it or a binding targeting it.

Source

pub fn set_value<T: PropertyValue>( &self, property: &'static StyledProperty<T>, value: T, )

Sets a property value with local value priority.

Source

pub fn set_value_with_priority<T: PropertyValue>( &self, property: &'static StyledProperty<T>, value: T, priority: BindingPriority, ) -> Option<Rc<dyn IDisposable>>

Sets a property value with the given priority. For priorities other than local value, disposing the returned handle removes the value.

Source

pub fn set_current_value<T: PropertyValue>( &self, property: &'static StyledProperty<T>, value: T, )

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.

Source

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.

Source

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.

Source

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())).

Source

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)).

Source

pub fn bind<T: PropertyValue>( &self, property: &'static StyledProperty<T>, source: Rc<dyn IObservable<T>>, priority: BindingPriority, ) -> Rc<dyn IDisposable>

Binds a property to an observable.

Source

pub fn bind_value<T: PropertyValue>( &self, property: &'static StyledProperty<T>, source: Rc<dyn IObservable<BindingValue<T>>>, priority: BindingPriority, ) -> Rc<dyn IDisposable>

Binds a property to an observable of binding values.

Source

pub fn bind_untyped<T: PropertyValue>( &self, property: &'static StyledProperty<T>, source: Rc<dyn IObservable<BoxedValue>>, priority: BindingPriority, ) -> Rc<dyn IDisposable>

Binds a property to an observable of untyped values.

Source

pub fn coerce_value(&self, property: &'static FerroProperty)

Coerces the specified property.

Source

pub fn get_direct_value<T: PropertyValue>( &self, property: &'static DirectPropertyBase<T>, ) -> T

Gets a direct property value.

Source

pub fn set_direct_value<T: PropertyValue>( &self, property: &'static DirectPropertyBase<T>, value: T, )

Sets a direct property value.

Source

pub fn clear_direct_value<T: PropertyValue>( &self, property: &'static DirectPropertyBase<T>, )

Resets a direct property to its unset value.

Source

pub fn bind_direct<T: PropertyValue>( &self, property: &'static DirectPropertyBase<T>, source: Rc<dyn IObservable<T>>, ) -> Rc<dyn IDisposable>

Binds a direct property to an observable.

Source

pub fn bind_direct_value<T: PropertyValue>( &self, property: &'static DirectPropertyBase<T>, source: Rc<dyn IObservable<BindingValue<T>>>, ) -> Rc<dyn IDisposable>

Binds a direct property to an observable of binding values.

Source

pub fn bind_direct_untyped<T: PropertyValue>( &self, property: &'static DirectPropertyBase<T>, source: Rc<dyn IObservable<BoxedValue>>, ) -> Rc<dyn IDisposable>

Binds a direct property to an observable of untyped values.

Source

pub fn set_and_raise<T: PropertyValue>( &self, property: &'static DirectPropertyBase<T>, field: &RefCell<T>, value: T, ) -> bool

Sets the backing field of a direct property, raising a change notification if the value changed. Returns true if it changed.

Source

pub fn set_and_raise_cell<T: PropertyValue + Copy>( &self, property: &'static DirectPropertyBase<T>, field: &Cell<T>, value: T, ) -> bool

set_and_raise for Copy values stored in a Cell.

Source

pub fn get_value_untyped(&self, property: &'static FerroProperty) -> BoxedValue

Gets a property value as an untyped value.

Source

pub fn set_value_untyped( &self, property: &'static FerroProperty, value: &dyn Any, 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.

Source

pub fn set_current_value_untyped( &self, property: &'static FerroProperty, value: &dyn Any, )

set_current_value with an untyped value.

Source

pub fn clear_value_untyped(&self, property: &'static FerroProperty)

Clears a property’s local value.

Source

pub fn bind_property_untyped( &self, property: &'static FerroProperty, source: Rc<dyn IObservable<BoxedValue>>, priority: BindingPriority, ) -> Rc<dyn IDisposable>

Binds a property to an observable of untyped values.

Source

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.

Source

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.

Source

pub fn remove_property_changed_handler(&self, token: u64) -> bool

Ends a subscription of add_property_changed_handler.

Source

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).

Source

pub fn raise_property_changed<T: PropertyValue>( &self, property: &'static FerroProperty, old_value: Option<&T>, new_value: &T, priority: BindingPriority, is_effective_value: bool, )

Raises a property changed notification.

Source

pub fn raise_direct_property_changed<T: PropertyValue>( &self, property: &'static DirectPropertyBase<T>, old_value: &T, new_value: &T, )

Raises a property changed notification for a direct property.

Trait Implementations§

Source§

impl CacheModeImpl for CacheMode

Source§

fn get_for_compositor( _this: &Self, _c: &Rc<Compositor>, ) -> Rc<CompositionCacheMode>

The composition cache mode that mirrors this cache mode on compositor c.
Source§

impl Deref for CacheMode

Source§

type Target = StyledElement

The resulting type after dereferencing.
Source§

fn deref(&self) -> &StyledElement

Dereferences the value.
Source§

impl FerroObjectImpl for CacheMode

Source§

fn constructed(this: &Self)

Called once, right after the object has been allocated. This is where constructor logic that needs a reference to the object runs. Overrides must call parent_constructed first.
Source§

fn on_property_changed_core( this: &Self, change: &FerroPropertyChangedEventArgs<'_>, )

Called for every property change on the object, including changes of non-effective (base) values. Overriding this is rarely needed; override on_property_changed instead.
Source§

fn on_property_changed(this: &Self, change: &FerroPropertyChangedEventArgs<'_>)

Called when the effective value of a property changes on the object.
Source§

fn update_data_validation( this: &Self, property: &'static FerroProperty, state: BindingValueType, error: Option<&BindingError>, )

Called to update the validation state for properties for which data validation is enabled.
Source§

impl ObjectType for CacheMode

Source§

type Parent = StyledElement

The base class. The root class is its own parent.
Source§

type VTable = CacheModeVTable

The virtual table of the class.
Source§

fn vtable() -> &'static Self::VTable

The virtual table used by instances whose most-derived class is Self.
Source§

fn register_class()

The static initialisation of the class. The first call on a thread, after doing the same for the base class: Read more
Source§

impl StaticType for CacheMode

Source§

const TYPE: &'static TypeInfo

The runtime type.
Source§

impl StyledElementImpl for CacheMode

Source§

fn begin_init(this: &Self)

Signals the beginning of a batch of initialization: styling is deferred until the matching end_init.
Source§

fn try_end_init(this: &Self) -> Result<(), InitializationError>

Signals the end of a batch of initialization: the element is styled (if it is attached to a rooted logical tree) and initialized. A style or control theme that cannot be applied (two setters for the same property) is an error, the counterpart of the invalid operation EndInit raises in the managed original; what follows the failure is skipped. This is the overridable member; end_init is the form that panics on the error.
Source§

fn logical_children_collection_changed( this: &Self, e: &NotifyCollectionChangedEventArgs<'_, Ref<StyledElement>>, )

Called when the logical children collection changes.
Source§

fn on_attached_to_logical_tree(this: &Self, e: &LogicalTreeAttachmentEventArgs)

Called when the styled element is added to a rooted logical tree.
Source§

fn on_detached_from_logical_tree( this: &Self, e: &LogicalTreeAttachmentEventArgs, )

Called when the styled element is removed from a rooted logical tree.
Source§

fn on_data_context_changed(this: &Self)

Called when the data context changes.
Source§

fn on_data_context_begin_update(this: &Self)

Called when the data context begins updating.
Source§

fn on_data_context_end_update(this: &Self)

Called when the data context finishes updating.
Source§

fn on_initialized(this: &Self)

Called when the control finishes initialization.
Source§

fn style_key_override(this: &Self) -> &'static TypeInfo

The type by which the element is styled. Defaults to the element’s own type; override to be styled as a base class.
Source§

fn on_control_theme_changed(this: &Self)

Called when the control theme changes.
Source§

fn on_templated_parent_control_theme_changed(this: &Self)

Called when the templated parent’s control theme changes.
Source§

fn invalidate_styles(this: &Self, recurse: bool)

Detaches all styles from the element (and optionally from its inheritance children) so that they are re-applied.
Source§

fn is_logical_root(this: &Self) -> bool

Whether the element is the root of a logical tree.
Source§

fn styling_parent(this: &Self) -> Option<StyleHostRef>

The parent style host of the element: by default the inheritance parent, when it is a styled element. The root of a tree overrides this to return the host of the global styles.
Source§

fn notify_child_resources_changed(this: &Self, e: ResourcesChangedEventArgs)

Notifies the children of the element that the resources visible to them have changed. The base method notifies the logical children.
Source§

fn child_index_provider(this: &Self) -> Option<Rc<dyn IChildIndexProvider>>

The child index provider implemented by the element, if any. Used to match the children of the element by their position.
Source§

fn is_theme_variant_root(this: &Self) -> bool

Whether the element is a root of theme variant resolution: at a root the default theme variant resolves to the variant of the platform instead of being inherited.
Source§

impl<T: CacheModeImpl> Subclassable<T> for CacheMode

Source§

impl Upcast<CacheMode> for CacheMode

Source§

impl<T: ?Sized> Upcast<T> for CacheMode

Source§

fn upcast(&self) -> &T

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CacheModeImplExt for T
where T: CacheModeImpl,

Source§

fn parent_get_for_compositor( this: &Self, c: &Rc<Compositor>, ) -> Rc<CompositionCacheMode>

Calls the base class implementation of the member.
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

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
Source§

impl<T> FerroObjectImplExt for T
where T: FerroObjectImpl,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> StyledElementImplExt for T

Source§

fn parent_begin_init(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_try_end_init(this: &Self) -> Result<(), InitializationError>

Calls the base class implementation of the member.
Source§

fn parent_logical_children_collection_changed( this: &Self, e: &NotifyCollectionChangedEventArgs<'_, Ref<StyledElement>>, )

Calls the base class implementation of the member.
Source§

fn parent_on_attached_to_logical_tree( this: &Self, e: &LogicalTreeAttachmentEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_on_detached_from_logical_tree( this: &Self, e: &LogicalTreeAttachmentEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_on_data_context_changed(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_data_context_begin_update(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_data_context_end_update(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_initialized(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_style_key_override(this: &Self) -> &'static TypeInfo

Calls the base class implementation of the member.
Source§

fn parent_on_control_theme_changed(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_on_templated_parent_control_theme_changed(this: &Self)

Calls the base class implementation of the member.
Source§

fn parent_invalidate_styles(this: &Self, recurse: bool)

Calls the base class implementation of the member.
Source§

fn parent_is_logical_root(this: &Self) -> bool

Calls the base class implementation of the member.
Source§

fn parent_styling_parent(this: &Self) -> Option<StyleHostRef>

Calls the base class implementation of the member.
Source§

fn parent_notify_child_resources_changed( this: &Self, e: ResourcesChangedEventArgs, )

Calls the base class implementation of the member.
Source§

fn parent_child_index_provider( this: &Self, ) -> Option<Rc<dyn IChildIndexProvider>>

Calls the base class implementation of the member.
Source§

fn parent_is_theme_variant_root(this: &Self) -> bool

Calls the base class implementation of the member.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.