StyledElementImpl
trait · ferroui-base · v0.5.0
trait StyledElementImpl: FerroObjectImpl + $crate::Upcast<StyledElement>
The overridable members introduced by the class.
Members
begin_inittry_end_initlogical_children_collection_changedon_attached_to_logical_treeon_detached_from_logical_treeon_data_context_changedon_data_context_begin_updateon_data_context_end_updateon_initializedstyle_key_overrideon_control_theme_changedon_templated_parent_control_theme_changedinvalidate_stylesis_logical_rootstyling_parentnotify_child_resources_changedchild_index_provideris_theme_variant_root
begin_init
fn begin_init(this: &Self)
Signals the beginning of a batch of initialization: styling is
deferred until the matching end_init.
try_end_init
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.
logical_children_collection_changed
fn logical_children_collection_changed(this: &Self, e: &NotifyCollectionChangedEventArgs<'_, Ref<StyledElement>>)
Called when the logical children collection changes.
on_attached_to_logical_tree
fn on_attached_to_logical_tree(this: &Self, e: &LogicalTreeAttachmentEventArgs)
Called when the styled element is added to a rooted logical tree.
on_detached_from_logical_tree
fn on_detached_from_logical_tree(this: &Self, e: &LogicalTreeAttachmentEventArgs)
Called when the styled element is removed from a rooted logical tree.
on_data_context_changed
fn on_data_context_changed(this: &Self)
Called when the data context changes.
on_data_context_begin_update
fn on_data_context_begin_update(this: &Self)
Called when the data context begins updating.
on_data_context_end_update
fn on_data_context_end_update(this: &Self)
Called when the data context finishes updating.
on_initialized
fn on_initialized(this: &Self)
Called when the control finishes initialization.
style_key_override
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.
on_control_theme_changed
fn on_control_theme_changed(this: &Self)
Called when the control theme changes.
on_templated_parent_control_theme_changed
fn on_templated_parent_control_theme_changed(this: &Self)
Called when the templated parent's control theme changes.
invalidate_styles
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.
is_logical_root
fn is_logical_root(this: &Self) -> bool
Whether the element is the root of a logical tree.
styling_parent
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.
notify_child_resources_changed
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.
child_index_provider
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.
is_theme_variant_root
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.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.