pub struct KeyboardEventDetector<W: Widget, F: Fn(KeyEvent)> {
pub on_event: F,
pub child: W,
}Fields§
§on_event: F§child: WTrait Implementations§
Source§impl<W: Widget, F: Fn(KeyEvent)> ViewWidget for KeyboardEventDetector<W, F>
impl<W: Widget, F: Fn(KeyEvent)> ViewWidget for KeyboardEventDetector<W, F>
fn build<'w>(&'w self, _: BuildContext<'w, Self>) -> Self::Widget<'w>
Source§impl<W: Widget, F: Fn(KeyEvent)> Widget for KeyboardEventDetector<W, F>
impl<W: Widget, F: Fn(KeyEvent)> Widget for KeyboardEventDetector<W, F>
Source§fn unique_type(&self) -> TypeId
fn unique_type(&self) -> TypeId
Implementation should return the same unique TypeId for given structure definition,
even if that structure contains generic parameters. This is used to preserve state
between generic widgets.
fn kind<'frui>(&'frui self) -> WidgetKind<'_>
Source§impl<W: Widget, F: Fn(KeyEvent)> WidgetDerive for KeyboardEventDetector<W, F>
impl<W: Widget, F: Fn(KeyEvent)> WidgetDerive for KeyboardEventDetector<W, F>
Source§impl<W: Widget, F: Fn(KeyEvent)> WidgetState for KeyboardEventDetector<W, F>
impl<W: Widget, F: Fn(KeyEvent)> WidgetState for KeyboardEventDetector<W, F>
type State = Option<CallbackKey>
fn create_state<'a>(&'a self) -> Self::State
Source§fn mount(&self, ctx: BuildContext<'_, Self>)
fn mount(&self, ctx: BuildContext<'_, Self>)
Called when the widget is mounted into the tree (before build). Read more
Source§fn unmount(&self, ctx: BuildContext<'_, Self>)
fn unmount(&self, ctx: BuildContext<'_, Self>)
Called when the widget is unmounted from the tree. At this point given
widget may be dropped or mounted again with its configuration updated. Read more
Auto Trait Implementations§
impl<W, F> Freeze for KeyboardEventDetector<W, F>
impl<W, F> Immutable for KeyboardEventDetector<W, F>
impl<W, F> RefUnwindSafe for KeyboardEventDetector<W, F>where
F: RefUnwindSafe,
W: RefUnwindSafe,
impl<W, F> Send for KeyboardEventDetector<W, F>
impl<W, F> Sync for KeyboardEventDetector<W, F>
impl<W, F> Unpin for KeyboardEventDetector<W, F>
impl<W, F> UnwindSafe for KeyboardEventDetector<W, F>where
F: UnwindSafe,
W: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more