pub struct KeyController { /* private fields */ }Expand description
Reports key presses and releases, optionally only for chosen keys.
Key events bubble, so a container can handle keys its focused child ignored.
Implementations§
Trait Implementations§
Source§impl Controller for KeyController
impl Controller for KeyController
Source§fn handle(
&mut self,
_widget: WidgetId,
event: &Event,
out: &mut Vec<ControllerEvent>,
)
fn handle( &mut self, _widget: WidgetId, event: &Event, out: &mut Vec<ControllerEvent>, )
Examines one event and reports any result.
§Arguments
_widget- The ID of the owningWidget(unused).event- The event theWidgetreceived.out- Where results are pushed.
Source§fn event_mask(&self) -> EventMask
fn event_mask(&self) -> EventMask
Returns the event classes this controller needs.
§Returns
The mask added to the Widget’s event mask.
Auto Trait Implementations§
impl Freeze for KeyController
impl RefUnwindSafe for KeyController
impl Send for KeyController
impl Sync for KeyController
impl Unpin for KeyController
impl UnsafeUnpin for KeyController
impl UnwindSafe for KeyController
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