Skip to main content

Widgets

Struct Widgets 

Source
pub struct Widgets<'a> {
    pub coord: &'a mut InputCoordinator,
    pub states: &'a mut StateRegistry,
    pub selectables: &'a mut Selectables,
    pub layer: LayerId,
}
Expand description

Widget registration face a hook draws against: the window’s coordinator (library L1 register_* fns take it), the per-widget typed state store and the layer the hook’s widgets register into.

The coordinator’s state-mutating driver methods are deliberately not reachable here (one writer of focus / hover / capture, design §6.3); lib brief L6 makes that mechanical.

Fields§

§coord: &'a mut InputCoordinator

The window’s input coordinator (widget registration only).

§states: &'a mut StateRegistry

Per-widget persistent typed state (scroll offsets, expand flags).

§selectables: &'a mut Selectables

Selectable plain text of this frame (select by drag / double / triple click, copy).

§layer: LayerId

The layer this hook’s widgets register into (panel-local or the overlay’s own).

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for Widgets<'a>

§

impl<'a> !UnwindSafe for Widgets<'a>

§

impl<'a> Freeze for Widgets<'a>

§

impl<'a> Send for Widgets<'a>

§

impl<'a> Sync for Widgets<'a>

§

impl<'a> Unpin for Widgets<'a>

§

impl<'a> UnsafeUnpin for Widgets<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.