Struct conrod::widget::UpdateArgs[][src]

pub struct UpdateArgs<'a, 'b: 'a, 'c, 'd: 'c, W> where
    W: Widget
{ pub id: Id, pub maybe_parent_id: Option<Id>, pub prev: &'a CommonState, pub state: &'a mut State<'b, W::State>, pub rect: Rect, pub style: &'a W::Style, pub ui: &'c mut UiCell<'d>, }

Arguments for the Widget::update method in a struct to simplify the method signature.

Fields

The Widget's unique index.

The Widget's parent unique index, if there is one.

The Widget's previous state. Specifically, the state that is common between all widgets, such as positioning, floatability, draggability, etc.

A wrapper around the Widget's unique state, providing methods for both immutably viewing and mutably updating the state.

We wrap mutation in a method so that we can keep track of whether or not the unique state has been updated.

If State::update is called, we assume that there has been some mutation and in turn will require re-drawing the Widget. Thus, it is recommended that you only call State::update if you need to update the unique state in some way.

The rectangle describing the Widget's area.

The Widget's current Widget::Style.

Restricted access to the Ui.

Provides methods for immutably accessing the Ui's Theme and GlyphCache. Also allows calling Widget::set within the Widget::update method.

Auto Trait Implementations

impl<'a, 'b, 'c, 'd, W> Send for UpdateArgs<'a, 'b, 'c, 'd, W> where
    <W as Widget>::State: Send,
    <W as Widget>::Style: Sync

impl<'a, 'b, 'c, 'd, W> !Sync for UpdateArgs<'a, 'b, 'c, 'd, W>