pub trait WidgetExt: Widget {
    fn id(&self) -> WidgetId { ... }
    fn eq_id<T>(&self, rhs: T) -> bool
   where
        WidgetId: PartialEq<T>
, { ... } fn identify(&self) -> IdentifyWidget { ... } fn is_ancestor_of(&self, id: &WidgetId) -> bool { ... } fn is_strict_ancestor_of(&self, id: &WidgetId) -> bool { ... } fn find_widget(&self, id: &WidgetId) -> Option<&dyn Widget> { ... } fn find_widget_mut(&mut self, id: &WidgetId) -> Option<&mut dyn Widget> { ... } }
Expand description

Extension trait over widgets

Provided Methods

Get the widget’s identifier

Note that the default-constructed WidgetId is invalid: any operations on this value will cause a panic. Valid identifiers are assigned by Widget::pre_configure.

Test widget identifier for equality

This method may be used to test against WidgetId, Option<WidgetId> and Option<&WidgetId>.

Display as “StructName#WidgetId”

Check whether id is self or a descendant

This function assumes that id is a valid widget.

Check whether id is not self and is a descendant

This function assumes that id is a valid widget.

Find the descendant with this id, if any

Find the descendant with this id, if any

Implementors