Skip to main content

StyledElementImpl

Trait StyledElementImpl 

Source
pub trait StyledElementImpl: FerroObjectImpl + Upcast<StyledElement> {
Show 18 methods // Provided methods fn begin_init(this: &Self) { ... } fn try_end_init(this: &Self) -> Result<(), InitializationError> { ... } fn logical_children_collection_changed( this: &Self, e: &NotifyCollectionChangedEventArgs<'_, Ref<StyledElement>>, ) { ... } fn on_attached_to_logical_tree( this: &Self, e: &LogicalTreeAttachmentEventArgs, ) { ... } fn on_detached_from_logical_tree( this: &Self, e: &LogicalTreeAttachmentEventArgs, ) { ... } fn on_data_context_changed(this: &Self) { ... } fn on_data_context_begin_update(this: &Self) { ... } fn on_data_context_end_update(this: &Self) { ... } fn on_initialized(this: &Self) { ... } fn style_key_override(this: &Self) -> &'static TypeInfo { ... } fn on_control_theme_changed(this: &Self) { ... } fn on_templated_parent_control_theme_changed(this: &Self) { ... } fn invalidate_styles(this: &Self, recurse: bool) { ... } fn is_logical_root(this: &Self) -> bool { ... } fn styling_parent(this: &Self) -> Option<StyleHostRef> { ... } fn notify_child_resources_changed(this: &Self, e: ResourcesChangedEventArgs) { ... } fn child_index_provider(this: &Self) -> Option<Rc<dyn IChildIndexProvider>> { ... } fn is_theme_variant_root(this: &Self) -> bool { ... }
}
Expand description

The overridable members introduced by the class.

Provided Methods§

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§