Struct carbide_core::event_handler::EventHandler [−][src]
A basic, non-interactive rectangle shape widget.
Implementations
impl EventHandler
[src]
pub fn get_events(&self) -> &Vec<WidgetEvent>
[src]
pub fn clear_events(&mut self)
[src]
impl EventHandler
[src]
pub fn new() -> Self
[src]
pub fn handle_event(
&mut self,
event: Input,
window_dimensions: Dimensions
) -> Option<WindowEvent>
[src]
&mut self,
event: Input,
window_dimensions: Dimensions
) -> Option<WindowEvent>
Handle raw window events and update the Ui
state accordingly.
This occurs within several stages:
- Convert the user's given
event
to aRawEvent
so that theUi
may use it. - Interpret the
RawEvent
for higher-levelEvent
s such asDoubleClick
,WidgetCapturesKeyboard
, etc. - Update the
Ui
'sglobal_input
State
accordingly, depending on theRawEvent
. - Store newly produced
event::Ui
s within theglobal_input
so that they may be filtered and fed toWidget
s next timeUi::set_widget
is called.
This method drives the Ui
forward, and is what allows for using carbide's Ui
with any
window event stream.
The given event
must implement the ToRawEvent trait so that it can be converted to a
RawEvent
that can be used by the Ui
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for EventHandler
[src]
impl Send for EventHandler
[src]
impl Sync for EventHandler
[src]
impl Unpin for EventHandler
[src]
impl UnwindSafe for EventHandler
[src]
Blanket Implementations
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> 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, 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,