Enum druid::InternalLifeCycle
source · pub enum InternalLifeCycle {
RouteWidgetAdded,
RouteFocusChanged {
old: Option<WidgetId>,
new: Option<WidgetId>,
},
RouteDisabledChanged,
RouteViewContextChanged(ViewContext),
DebugRequestState {
widget: WidgetId,
state_cell: StateCell,
},
DebugRequestDebugState {
widget: WidgetId,
state_cell: DebugStateCell,
},
DebugInspectState(StateCheckFn),
}
Expand description
Variants§
RouteWidgetAdded
Used to route the WidgetAdded
event to the required widgets.
RouteFocusChanged
Fields
Used to route the FocusChanged
event.
RouteDisabledChanged
Used to route the DisabledChanged
event to the required widgets.
RouteViewContextChanged(ViewContext)
Used to route the ViewContextChanged
event to the required widgets.
DebugRequestState
Fields
widget: WidgetId
the widget whose state is requested
state_cell: StateCell
a cell used to store the a widget’s state
For testing: request the WidgetState
of a specific widget.
During testing, you may wish to verify that the state of a widget
somewhere in the tree is as expected. In that case you can dispatch
this event, specifying the widget in question, and that widget will
set its state in the provided Cell
, if it exists.
DebugRequestDebugState
Fields
widget: WidgetId
the widget whose state is requested
state_cell: DebugStateCell
a cell used to store the a widget’s state
For testing: request the DebugState
of a specific widget.
This is useful if you need to get a best-effort description of the
state of this widget and its children. You can dispatch this event,
specifying the widget in question, and that widget will
set its state in the provided Cell
, if it exists.
DebugInspectState(StateCheckFn)
For testing: apply the given function on every widget.
Implementations§
source§impl InternalLifeCycle
impl InternalLifeCycle
Whether this event should be sent to widgets which are currently not visible and not accessible.
If a widget changes which children are hidden
it must call children_changed
.
For a more detailed explanation of the hidden
state, see Event::should_propagate_to_hidden
.
Trait Implementations§
source§impl Clone for InternalLifeCycle
impl Clone for InternalLifeCycle
source§fn clone(&self) -> InternalLifeCycle
fn clone(&self) -> InternalLifeCycle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more