pub trait FactoryPrototype: Sized {
    type Factory: Factory<Self, Self::View>;
    type Widgets: Debug;
    type Root: WidgetExt;
    type View: FactoryView<Self::Root>;
    type Msg;

    fn init_view(
        key: &<Self::Factory as Factory<Self, Self::View>>::Key,
        sender: Sender<Self::Msg>
    ) -> Self::Widgets; fn position(
        key: &<Self::Factory as Factory<Self, Self::View>>::Key
    ) -> <Self::View as FactoryView<Self::Root>>::Position; fn view(
        key: &<Self::Factory as Factory<Self, Self::View>>::Key,
        widgets: &Self::Widgets
    ); fn root_widget(widgets: &Self::Widgets) -> &Self::Root; }
Expand description

Define behavior to create, update and remove widgets according to data stored in a factory.

Required Associated Types§

Factory container that stores the data.

Type that stores all widgets needed to update them in the view function.

Outermost type of the newly created widgets. Similar to the Root type in crate::Widgets.

Widget that the generated widgets are added to.

Message type used to send messages back to the component or app where this factory is used

Required Methods§

Create new widgets when self is inserted into the factory.

Set the widget position upon creation, useful for gtk::Grid or similar.

Function called when self is modified.

Get the outermost widget from the widgets.