Struct widgetry::EventCtx [−][src]
pub struct EventCtx<'a> { pub(crate) fake_mouseover: bool, pub input: UserInput, pub canvas: &'a mut Canvas, pub prerender: &'a Prerender, pub(crate) style: &'a mut Style, pub(crate) updates_requested: Vec<UpdateType>, }
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]
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.