[][src]Trait relm::Container

pub trait Container: Widget {
    type Container: Clone + IsA<Container> + IsA<Object> + IsA<Widget>;
    type Containers: Clone;
    fn container(&self) -> &Self::Container;
fn other_containers(&self) -> Self::Containers; fn add_widget<WIDGET: Widget>(
        container: &ContainerComponent<Self>,
        component: &Component<WIDGET>
    ) -> Container { ... } }

Trait to implement relm container widget.

Associated Types

type Container: Clone + IsA<Container> + IsA<Object> + IsA<Widget>

The type of the containing widget, i.e. where the child widgets will be added.

type Containers: Clone

Type to contain the additional container widgets.

Loading content...

Required methods

fn container(&self) -> &Self::Container

Get the containing widget, i.e. the widget where the children will be added.

fn other_containers(&self) -> Self::Containers

Get additional container widgets. This is useful to create a multi-container.

Loading content...

Provided methods

fn add_widget<WIDGET: Widget>(
    container: &ContainerComponent<Self>,
    component: &Component<WIDGET>
) -> Container

Add a relm widget to this container. Return the widget that will be send to Widget::on_add().

Loading content...

Implementors

Loading content...