Trait relm::ContainerWidget
[−]
[src]
pub trait ContainerWidget where
Self: Sized, { fn add_widget<WIDGET, MSG>(
&self,
relm: &RemoteRelm<MSG>
) -> Component<WIDGET>
where
MSG: Clone + DisplayVariant + Send + 'static,
WIDGET: Widget + 'static,
WIDGET::Model: Clone + Send,
WIDGET::Msg: Clone + DisplayVariant + Send + 'static,
WIDGET::Root: IsA<Widget> + IsA<Object> + WidgetExt; fn remove_widget<WIDGET>(&self, component: Component<WIDGET>)
where
WIDGET: Widget,
WIDGET::Model: Clone,
WIDGET::Root: IsA<Widget>; }
Extension trait for GTK+ containers to add and remove relm Widget
s.
Required Methods
fn add_widget<WIDGET, MSG>(&self, relm: &RemoteRelm<MSG>) -> Component<WIDGET> where
MSG: Clone + DisplayVariant + Send + 'static,
WIDGET: Widget + 'static,
WIDGET::Model: Clone + Send,
WIDGET::Msg: Clone + DisplayVariant + Send + 'static,
WIDGET::Root: IsA<Widget> + IsA<Object> + WidgetExt,
MSG: Clone + DisplayVariant + Send + 'static,
WIDGET: Widget + 'static,
WIDGET::Model: Clone + Send,
WIDGET::Msg: Clone + DisplayVariant + Send + 'static,
WIDGET::Root: IsA<Widget> + IsA<Object> + WidgetExt,
Add a relm Widget
to the current GTK+ container.
Note
The returned Component
must be stored in a Widget
. If it is not stored, a communication
receiver will be droped which will cause events to be ignored for this widget.
fn remove_widget<WIDGET>(&self, component: Component<WIDGET>) where
WIDGET: Widget,
WIDGET::Model: Clone,
WIDGET::Root: IsA<Widget>,
WIDGET: Widget,
WIDGET::Model: Clone,
WIDGET::Root: IsA<Widget>,
Remove a relm Widget
from the current GTK+ container.
Implementors
impl<W: Clone + ContainerExt + IsA<Widget> + IsA<Object>> ContainerWidget for W