[−][src]Trait orbtk::prelude::api::widget::State
Used to define a state of a widget.
A state is used to operate on the properties (components) of the widget, its parent or children.
Provided methods
fn init(&self, _context: &mut Context)
Init is used for initial setup.
fn update(&self, _context: &mut Context)
Updates the state for the given ctx
.
This update method is called before layout is calculated.
fn update_post_layout(&self, _context: &mut Context)
Updates the state for the given ctx
.
This update method is called after layout is calculated and before rendering.
fn receive_messages(&self, _context: &mut Context, _messages: &[MessageBox])
Receives all messages from the message channel. This message is only called if the state has messages.