[−][src]Struct druid::DruidHandler
The struct implements the druid-shell WinHandler trait.
One DruidHandler exists per window.
This is something of an internal detail and possibly we don't want to surface it publicly.
Fields
window_id: WindowIdThe shared app state. The id for the current window.
phantom: PhantomData<T>Methods
impl<T: Data + 'static + Default> DruidHandler<T>[src]
pub(crate) fn new_shared(window_id: WindowId) -> DruidHandler<T>[src]
Note: the root widget doesn't go in here, because it gets added to the app state.
fn do_event(&mut self, event: Event, win_ctx: &mut dyn WinCtx) -> bool[src]
Send an event to the widget hierarchy.
Returns true if the event produced an action.
This is principally because in certain cases (such as keydown on Windows) the OS needs to know if an event was handled.
Trait Implementations
impl<T: Clone + Data + 'static + Default> Clone for DruidHandler<T>[src]
fn clone(&self) -> DruidHandler<T>[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<T: Default + Data + 'static> Default for DruidHandler<T>[src]
fn default() -> DruidHandler<T>[src]
impl<T: Data + 'static + Default> WinHandler<DruidHandler<T>> for DruidHandler<T>[src]
fn paint(&mut self, piet: &mut Piet, ctx: &mut dyn WinCtx) -> bool[src]
fn size(&mut self, width: u32, height: u32, ctx: &mut dyn WinCtx)[src]
fn mouse_down(&mut self, event: &MouseEvent, ctx: &mut dyn WinCtx)[src]
fn mouse_up(&mut self, event: &MouseEvent, ctx: &mut dyn WinCtx)[src]
fn mouse_move(&mut self, _event: &MouseEvent, _ctx: &mut dyn WinCtx)[src]
fn got_focus(&mut self, ctx: &mut dyn WinCtx)[src]
fn get_window_id(&self) -> WindowIdType[src]
fn add_handler(&self, window_id: WindowIdType, handler: DruidHandler<T>)[src]
fn timer(&mut self, token: TimerToken, ctx: &mut dyn WinCtx)[src]
fn destroy(&mut self, ctx: &mut dyn WinCtx)[src]
Auto Trait Implementations
impl<T> Send for DruidHandler<T> where
T: Send,
T: Send,
impl<T> Sync for DruidHandler<T> where
T: Sync,
T: Sync,
impl<T> Unpin for DruidHandler<T> where
T: Unpin,
T: Unpin,
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,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> RoundFrom<T> for T[src]
fn round_from(x: T) -> T[src]
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>, [src]
U: RoundFrom<T>,
fn round_into(self) -> U[src]
impl<T> Same<T> for T[src]
type Output = T
Should always be Self
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.
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>,