[][src]Trait gui::Widget

pub trait Widget<E>: Handleable<E> + Renderable + Object + Debug where
    E: 'static, 
{ fn type_id(&self) -> TypeId; }

A widget as used by a Ui.

In addition to taking care of Id management and parent-child relationships, the Ui is responsible for dispatching events to widgets and rendering them. Hence, a widget usable for the Ui needs to implement Handleable, Renderable, and Object.

Required methods

fn type_id(&self) -> TypeId

Get the TypeId of self.

Loading content...

Methods

impl<E> dyn Widget<E> where
    E: 'static, 
[src]

pub fn is<T: Widget<E>>(&self) -> bool[src]

Check if the widget is of type T.

pub fn downcast_ref<T: Widget<E>>(&self) -> Option<&T>[src]

Downcast the widget reference to type T.

pub fn downcast_mut<T: Widget<E>>(&mut self) -> Option<&mut T>[src]

Downcast the widget reference to type T.

Implementors

Loading content...