[][src]Trait relm::ContainerWidget

pub trait ContainerWidget {
    fn add_container<CHILDWIDGET>(
        &self,
        model_param: CHILDWIDGET::ModelParam
    ) -> ContainerComponent<CHILDWIDGET>
    where
        CHILDWIDGET: Container + Widget + 'static,
        CHILDWIDGET::Msg: DisplayVariant + 'static,
        CHILDWIDGET::Root: IsA<Widget> + IsA<Object> + WidgetExt
;
fn add_widget<CHILDWIDGET>(
        &self,
        model_param: CHILDWIDGET::ModelParam
    ) -> Component<CHILDWIDGET>
    where
        CHILDWIDGET: Widget + 'static,
        CHILDWIDGET::Msg: DisplayVariant + 'static,
        CHILDWIDGET::Root: IsA<Widget> + IsA<Object> + WidgetExt
;
fn remove_widget<CHILDWIDGET>(&self, component: Component<CHILDWIDGET>)
    where
        CHILDWIDGET: Widget,
        CHILDWIDGET::Root: IsA<Widget>
; }

Extension trait for GTK+ containers to add and remove relm Widgets.

Required methods

fn add_container<CHILDWIDGET>(
    &self,
    model_param: CHILDWIDGET::ModelParam
) -> ContainerComponent<CHILDWIDGET> where
    CHILDWIDGET: Container + Widget + 'static,
    CHILDWIDGET::Msg: DisplayVariant + 'static,
    CHILDWIDGET::Root: IsA<Widget> + IsA<Object> + WidgetExt

Add a relm Container to the current GTK+ container.

Note

The returned ContainerComponent 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 add_widget<CHILDWIDGET>(
    &self,
    model_param: CHILDWIDGET::ModelParam
) -> Component<CHILDWIDGET> where
    CHILDWIDGET: Widget + 'static,
    CHILDWIDGET::Msg: DisplayVariant + '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::Root: IsA<Widget>, 

Remove a relm Widget from the current GTK+ container.

Loading content...

Implementors

impl<W: Clone + ContainerExt + IsA<Widget> + IsA<Object>> ContainerWidget for W[src]

Loading content...