Trait relm::ContainerWidget
[−]
[src]
pub trait ContainerWidget { fn add_widget<CHILDWIDGET, WIDGET: Widget>(
&self,
relm: &RemoteRelm<WIDGET>,
model_param: CHILDWIDGET::ModelParam
) -> Component<CHILDWIDGET>
where
CHILDWIDGET: Widget + 'static,
CHILDWIDGET::Model: Clone + Send,
CHILDWIDGET::Msg: Clone + DisplayVariant + Send + 'static,
CHILDWIDGET::Root: IsA<Widget> + IsA<Object> + WidgetExt; fn remove_widget<CHILDWIDGET>(&self, component: Component<CHILDWIDGET>)
where
CHILDWIDGET: Widget,
CHILDWIDGET::Model: Clone,
CHILDWIDGET::Root: IsA<Widget>; }
Extension trait for GTK+ containers to add and remove relm Widget
s.
Required Methods
fn add_widget<CHILDWIDGET, WIDGET: Widget>(
&self,
relm: &RemoteRelm<WIDGET>,
model_param: CHILDWIDGET::ModelParam
) -> Component<CHILDWIDGET> where
CHILDWIDGET: Widget + 'static,
CHILDWIDGET::Model: Clone + Send,
CHILDWIDGET::Msg: Clone + DisplayVariant + Send + 'static,
CHILDWIDGET::Root: IsA<Widget> + IsA<Object> + WidgetExt,
&self,
relm: &RemoteRelm<WIDGET>,
model_param: CHILDWIDGET::ModelParam
) -> Component<CHILDWIDGET> where
CHILDWIDGET: Widget + 'static,
CHILDWIDGET::Model: Clone + Send,
CHILDWIDGET::Msg: Clone + DisplayVariant + Send + 'static,
CHILDWIDGET::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<CHILDWIDGET>(&self, component: Component<CHILDWIDGET>) where
CHILDWIDGET: Widget,
CHILDWIDGET::Model: Clone,
CHILDWIDGET::Root: IsA<Widget>,
CHILDWIDGET: Widget,
CHILDWIDGET::Model: Clone,
CHILDWIDGET::Root: IsA<Widget>,
Remove a relm Widget
from the current GTK+ container.
Implementors
impl<W: Clone + ContainerExt + IsA<Widget> + IsA<Object>> ContainerWidget for W