StdHandler

Struct StdHandler 

Source
pub struct StdHandler<S, E>
where S: Handler<E>, E: Env, E::Context: AsRefMut<Self>, EEvent<E>: StdVarSup<E>,
{ pub sup: S, pub s: StdStdState<E>, /* private fields */ }

Fields§

§sup: S§s: StdStdState<E>

Implementations§

Source§

impl<S, E> StdHandler<S, E>
where S: Handler<E>, E: Env, E::Context: AsRefMut<Self>, EEvent<E>: StdVarSup<E>,

Source

pub fn new(sup: S) -> Self

Source

pub fn unfocus(root: Link<'_, E>, root_bounds: Bounds, ts: u64) -> EventResp

Source

pub fn focus( root: Link<'_, E>, p: E::WidgetPath, root_bounds: Bounds, ts: u64, ) -> Result<EventResp, GuionError<E>>

Trait Implementations§

Source§

impl<S, E> DynState<E> for StdHandler<S, E>
where S: Handler<E>, E: Env, E::WidgetID: Eq + Hash, E::Context: AsRefMut<Self> + CtxStdState<E> + 'static, EEvent<E>: StdVarSup<E>,

Source§

fn remote_state_or_default<T>(&self, i: E::WidgetID) -> T
where T: Default + Clone + 'static,

Source§

fn push_remote_state<T>(&mut self, i: E::WidgetID, v: T)
where T: 'static,

Source§

impl<S, E> Handler<E> for StdHandler<S, E>
where S: Handler<E>, E: Env, E::Context: AsRefMut<Self> + CtxStdState<E> + 'static, EEvent<E>: StdVarSup<E>,

Source§

fn _render(l: Link<'_, E>, r: &mut RenderLink<'_, E>)

Source§

fn _event_direct(l: Link<'_, E>, e: &EventCompound<E>) -> EventResp

Source§

fn _send_event( l: Link<'_, E>, e: &EventCompound<E>, child: E::WidgetPath, ) -> Result<EventResp, GuionError<E>>

Source§

fn _event_root(l: Link<'_, E>, e: &EventCompound<E>) -> EventResp

Source§

fn _size(l: Link<'_, E>, e: &EStyle<E>) -> ESize<E>

Source§

impl<S, E> StdState<E> for StdHandler<S, E>
where S: Handler<E>, E: Env, E::Context: AsRefMut<Self> + CtxStdState<E> + 'static, EEvent<E>: StdVarSup<E>,

Source§

type K = StdPressedKey<E>

Source§

fn hovered(&self) -> Option<E::WidgetID>

Source§

fn selected(&self) -> Option<E::WidgetID>

Source§

fn pressed(&self) -> &[Self::K]

Source§

fn cursor_pos(&self) -> Option<Offset>

Source§

fn is_hovered(&self, i: &E::WidgetID) -> bool

Source§

fn is_focused(&self, i: &E::WidgetID) -> bool

Source§

fn is_pressed(&self, c: &[EEKey<E>]) -> Option<&Self::K>

Source§

fn is_pressed_and_id(&self, c: &[EEKey<E>], id: E::WidgetID) -> Option<&Self::K>

Auto Trait Implementations§

§

impl<S, E> Freeze for StdHandler<S, E>
where <<E as Env>::Backend as Backend<E>>::Event: Sized, S: Freeze, <E as Env>::WidgetID: Freeze, <E as Env>::WidgetPath: Freeze,

§

impl<S, E> !RefUnwindSafe for StdHandler<S, E>

§

impl<S, E> !Send for StdHandler<S, E>

§

impl<S, E> !Sync for StdHandler<S, E>

§

impl<S, E> Unpin for StdHandler<S, E>
where <<E as Env>::Backend as Backend<E>>::Event: Sized, S: Unpin, E: Unpin, <E as Env>::WidgetID: Unpin, <E as Env>::WidgetPath: Unpin, <<<E as Env>::Backend as Backend<E>>::Event as Event<E>>::Key: Unpin,

§

impl<S, E> !UnwindSafe for StdHandler<S, E>

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> FromInto<U> for T
where T: From<U> + Into<U>,

Source§

fn qfrom(t: U) -> T

Source§

fn qinto(self) -> U

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<'a, S, T, E> StyleSelectorAppend<&'a [S], E> for T
where T: StyleSelectorAppend<S, E>, S: StyleSelectag<E>,

Source§

fn append(&mut self, selectag: &[S])

Source§

fn with(&self, selectag: S) -> Self
where Self: Sized,

Source§

fn from(selectag: S) -> Self
where Self: Sized,

Source§

impl<S, T, E> StyleSelectorAppend<&S, E> for T
where T: StyleSelectorAppend<S, E>, S: StyleSelectag<E>,

Source§

fn append(&mut self, selectag: &S)

Source§

fn with(&self, selectag: S) -> Self
where Self: Sized,

Source§

fn from(selectag: S) -> Self
where Self: Sized,

Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.