[][src]Trait druid::GlobalWindows

pub trait GlobalWindows<D: Data + 'static + Default> {
    fn add_window(&self, window_id: WindowId, window: WindowBox<D>);
fn add_handler(&self, window_id: WindowId, handler: DruidHandler<D>);
fn get_handle(&self, window_id: WindowId) -> WindowHandle<DruidHandler<D>>;
fn set_data(&self, data: D);
fn window_event(
        &mut self,
        window_id: WindowId,
        ctx: &mut EventCtx<D>,
        event: &Event
    );
fn window_update(&mut self, window_id: WindowId, ctx: &mut UpdateCtx<D>);
fn window_layout(&mut self, window_id: WindowId, layout_ctx: &mut LayoutCtx);
fn window_paint(&mut self, window_id: WindowId, paint_ctx: &mut PaintCtx);
fn window_has_active(&mut self, window_id: WindowId) -> bool; }

Specialised Trait for handling static Windows, Window Handlers and Application Data on embedded platforms

Required methods

fn add_window(&self, window_id: WindowId, window: WindowBox<D>)

Add a WindowBox for the Data type

fn add_handler(&self, window_id: WindowId, handler: DruidHandler<D>)

Add a Window Handler for the Data type

fn get_handle(&self, window_id: WindowId) -> WindowHandle<DruidHandler<D>>

Return a Window Handle that wraps the Window Handler for the Data type

fn set_data(&self, data: D)

Set the application data

fn window_event(
    &mut self,
    window_id: WindowId,
    ctx: &mut EventCtx<D>,
    event: &Event
)

Handle the Window event

fn window_update(&mut self, window_id: WindowId, ctx: &mut UpdateCtx<D>)

Handle the Window update

fn window_layout(&mut self, window_id: WindowId, layout_ctx: &mut LayoutCtx)

Handle the Window layout

fn window_paint(&mut self, window_id: WindowId, paint_ctx: &mut PaintCtx)

Handle the Window painting

fn window_has_active(&mut self, window_id: WindowId) -> bool

Return true if Window is active

Loading content...

Implementors

impl<D: Data + 'static + Default> GlobalWindows<D> for AppState<D>[src]

Default Trait will not have static Windows and Window Handlers

Loading content...