Struct widgetry::EventCtx [−][src]
Fields
fake_mouseover: bool
input: UserInput
canvas: &'a mut Canvas
prerender: &'a Prerender
style: &'a mut Style
updates_requested: Vec<UpdateType>
Implementations
impl<'a> EventCtx<'a>
[src]
pub fn loading_screen<O, S: Into<String>, F: FnOnce(&mut EventCtx<'_>, &mut Timer<'_>) -> O>(
&mut self,
raw_timer_name: S,
f: F
) -> O
[src]
&mut self,
raw_timer_name: S,
f: F
) -> O
pub fn request_update(&mut self, update_type: UpdateType)
[src]
pub fn canvas_movement(&mut self) -> bool
[src]
Allow panning and zooming on the canvas. Exactly which controls are active (click-and-drag, auto-pan at the edge of the screen, using arrow keys, etc) depend on options set. Returns true if the canvas moved at all.
pub fn no_op_event<O, F: FnMut(&mut EventCtx<'_>) -> O>(
&mut self,
fake_mouseover: bool,
cb: F
) -> O
[src]
&mut self,
fake_mouseover: bool,
cb: F
) -> O
pub fn redo_mouseover(&self) -> bool
[src]
pub fn normal_left_click(&mut self) -> bool
[src]
fn is_dragging(&self) -> bool
[src]
pub fn is_key_down(&self, key: Key) -> bool
[src]
pub fn default_line_height(&self) -> f64
[src]
pub fn upload(&self, batch: GeomBatch) -> Drawable
[src]
pub(crate) fn cursor_clickable(&mut self)
[src]
pub fn style(&self) -> &Style
[src]
pub fn set_style(&mut self, style: Style)
[src]
pub fn make_loading_screen(&mut self, txt: Text) -> Panel
[src]
pub fn is_font_loaded(&self, filename: &str) -> bool
[src]
Checks if an extra font has previously been loaded with load_font
. Returns false for
built-in system fonts.
pub fn load_font(&mut self, filename: &str, bytes: Vec<u8>)
[src]
Loads an extra font, used only for automatic fallback of missing glyphs.
pub fn hide_cursor(&self)
[src]
pub fn show_cursor(&self)
[src]
Trait Implementations
Auto Trait Implementations
impl<'a> !RefUnwindSafe for EventCtx<'a>
impl<'a> !Send for EventCtx<'a>
impl<'a> !Sync for EventCtx<'a>
impl<'a> Unpin for EventCtx<'a>
impl<'a> !UnwindSafe for EventCtx<'a>
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> Downcast for T where
T: Any,
T: Any,
pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn as_any(&self) -> &(dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
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.
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>,