Trait cushy::context::AsEventContext

source ·
pub trait AsEventContext {
    // Required method
    fn as_event_context(&mut self) -> EventContext<'_>;

    // Provided methods
    fn push_child(&mut self, child: WidgetInstance) -> MountedWidget { ... }
    fn remove_child(&mut self, child: &MountedWidget) { ... }
}
Expand description

Converts from one context to an EventContext.

Required Methods§

source

fn as_event_context(&mut self) -> EventContext<'_>

Returns this context as an EventContext.

Provided Methods§

source

fn push_child(&mut self, child: WidgetInstance) -> MountedWidget

Pushes a new child widget into the widget hierarchy beneathq the context’s widget.

source

fn remove_child(&mut self, child: &MountedWidget)

Removes a widget from the hierarchy.

Implementors§

source§

impl AsEventContext for EventContext<'_>

source§

impl AsEventContext for GraphicsContext<'_, '_, '_, '_>

source§

impl<'context, 'clip, 'gfx, 'pass> AsEventContext for LayoutContext<'context, 'clip, 'gfx, 'pass>