[][src]Trait orbtk::prelude::api::widget::State

pub trait State {
    fn init(&self, _context: &mut Context) { ... }
fn update(&self, _context: &mut Context) { ... }
fn update_post_layout(&self, _context: &mut Context) { ... }
fn receive_messages(&self, _context: &mut Context, _messages: &[MessageBox]) { ... } }

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.

Loading content...

Implementors

impl State for FocusBehaviorState[src]

impl State for MouseBehaviorState[src]

impl State for SelectionBehaviorState[src]

impl State for CursorState[src]

impl State for ItemsWidgetState[src]

impl State for ListViewItemState[src]

impl State for ListViewState[src]

impl State for ScrollIndicatorState[src]

impl State for ScrollViewerState[src]

impl State for SwitchState[src]

impl State for TextBoxState[src]

Loading content...