Struct nannou::ui::widget::UpdateArgs [−][src]
pub struct UpdateArgs<'a, 'b, 'c, 'd, W> where
'b: 'a,
'd: 'c,
W: Widget, { pub id: NodeIndex<u32>, pub maybe_parent_id: Option<NodeIndex<u32>>, pub prev: &'a CommonState, pub state: &'a mut State<'b, <W as Widget>::State>, pub rect: Rect, pub style: &'a <W as Widget>::Style, pub ui: &'c mut UiCell<'d>, }
Arguments for the Widget::update method in a struct to simplify the method signature.
Fields
id: NodeIndex<u32>
The Widget’s unique index.
maybe_parent_id: Option<NodeIndex<u32>>
The Widget’s parent unique index, if there is one.
prev: &'a CommonState
The Widget’s previous state. Specifically, the state that is common between all widgets, such as positioning, floatability, draggability, etc.
state: &'a mut State<'b, <W as Widget>::State>
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.
rect: Rect
The rectangle describing the Widget’s area.
style: &'a <W as Widget>::Style
The Widget’s current Widget::Style.
ui: &'c mut UiCell<'d>
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> !RefUnwindSafe for UpdateArgs<'a, 'b, 'c, 'd, W>
impl<'a, 'b, 'c, 'd, W> Send for UpdateArgs<'a, 'b, 'c, 'd, W> where
<W as Widget>::Style: Sync,
<W as Widget>::Style: Sync,
impl<'a, 'b, 'c, 'd, W> !Sync for UpdateArgs<'a, 'b, 'c, 'd, W>
impl<'a, 'b, 'c, 'd, W> Unpin for UpdateArgs<'a, 'b, 'c, 'd, W> where
'b: 'a,
'd: 'c,
'b: 'a,
'd: 'c,
impl<'a, 'b, 'c, 'd, W> !UnwindSafe for UpdateArgs<'a, 'b, 'c, 'd, W>
Blanket Implementations
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
[src]
T: Component + Float,
D: AdaptFrom<S, Swp, Dwp, T>,
Swp: WhitePoint,
Dwp: WhitePoint,
pub fn adapt_into_using<M>(self, method: M) -> D where
M: TransformMatrix<Swp, Dwp, T>,
[src]
M: TransformMatrix<Swp, Dwp, T>,
pub fn adapt_into(self) -> D
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> ConvertInto<U> for T where
U: ConvertFrom<T>,
[src]
U: ConvertFrom<T>,
pub fn convert_into(self) -> U
[src]
pub fn convert_unclamped_into(self) -> U
[src]
pub fn try_convert_into(self) -> Result<U, OutOfBounds<U>>
[src]
impl<T> Downcast<T> for T
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
impl<T> SetParameter for T
pub fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
T: Parameter<Self>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Upcast<T> for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,