Struct limn_core::app::App
[−]
[src]
pub struct App { /* fields omitted */ }
The App
type is just a thin wrapper around a Ui
containing
the methods used to initialize and run an App
.
The main difference between App
and Ui
is that App
is available
while initializing your application, and Ui
is available to
every event handler. As such, App
should contain methods that
can't, or shouldn't be called while the App
is running.
There should be only one App
per Window.
Methods
impl App
[src]
pub fn add_layout_handlers(&mut self)
[src]
impl App
[src]
pub fn new(window: Window, events_loop: EventsLoop) -> Self
[src]
Creates a new App
from an existing Window
.
Automatically initializes the default event handlers for a typical
desktop app:
ui_handlers
, layout_handlers
, input_handlers
,
mouse_handlers
, keyboard_handlers
and drag_handlers
pub fn main_loop(self, root: Widget)
[src]
Updates the UI and redraws the window (the applications main loop)
ⓘImportant traits for &'a mut Ipub fn add_handler<E: 'static, T: EventHandler<E> + 'static>(
&mut self,
handler: T
) -> &mut Self
[src]
&mut self,
handler: T
) -> &mut Self
Add a new global event handler
pub fn get_root(&self) -> Widget
[src]
pub fn window(&self) -> Ref<Window>
[src]
impl App
[src]
pub fn add_ui_handlers(&mut self)
[src]
impl App
[src]
pub fn add_mouse_handlers(&mut self)
[src]
impl App
[src]
pub fn add_keyboard_handlers(&mut self)
[src]
impl App
[src]
pub fn add_drag_handlers(&mut self)
[src]
Add handlers to UI to enable drag detection
UI receives messages from draggable widgets when they are clicked,
and combines that with mouse move and mouse release events to
synthesize DragEvent
s