Trait relm4::factory::FactoryView
source · [−]pub trait FactoryView<Widget> {
type Root: Debug;
type Position;
fn add(&self, widget: &Widget, position: &Self::Position) -> Self::Root;
fn remove(&self, widget: &Self::Root);
}
Expand description
A trait implemented for GTK4 widgets that allows a factory to create and remove widgets.
Associated Types
Position type used by this widget.
For example GridPosition
for gtk::Grid
or ()
for gtk::Box
Required methods
Adds a new widget to self at the end.
Implementations on Foreign Types
sourceimpl<Widget> FactoryView<Widget> for Box where
Widget: IsA<Widget>,
impl<Widget> FactoryView<Widget> for Box where
Widget: IsA<Widget>,
sourceimpl<Widget> FactoryView<Widget> for ListBox where
Widget: IsA<Widget>,
impl<Widget> FactoryView<Widget> for ListBox where
Widget: IsA<Widget>,
sourceimpl FactoryView<TreeViewColumn> for TreeView
impl FactoryView<TreeViewColumn> for TreeView
type Position = ()
type Root = TreeViewColumn
fn add(&self, widget: &TreeViewColumn, _position: &()) -> TreeViewColumn
fn remove(&self, widget: &TreeViewColumn)
sourceimpl<Widget> FactoryView<Widget> for FlowBox where
Widget: IsA<Widget>,
impl<Widget> FactoryView<Widget> for FlowBox where
Widget: IsA<Widget>,
sourceimpl<Widget> FactoryView<Widget> for Stack where
Widget: IsA<Widget>,
impl<Widget> FactoryView<Widget> for Stack where
Widget: IsA<Widget>,
type Position = StackPageInfo
type Root = Widget
fn add(&self, widget: &Widget, position: &StackPageInfo) -> Widget
fn remove(&self, widget: &Widget)
sourceimpl<Widget> FactoryView<Widget> for Fixed where
Widget: IsA<Widget>,
impl<Widget> FactoryView<Widget> for Fixed where
Widget: IsA<Widget>,
type Position = FixedPosition
type Root = Widget
fn add(&self, widget: &Widget, position: &FixedPosition) -> Widget
fn remove(&self, widget: &Widget)
sourceimpl<Widget> FactoryView<Widget> for Grid where
Widget: IsA<Widget>,
impl<Widget> FactoryView<Widget> for Grid where
Widget: IsA<Widget>,
type Position = GridPosition
type Root = Widget
fn add(&self, widget: &Widget, position: &GridPosition) -> Widget
fn remove(&self, widget: &Widget)
sourceimpl<Widget> FactoryView<Widget> for Carousel where
Widget: IsA<Widget>,
This is supported on crate feature libadwaita
only.
impl<Widget> FactoryView<Widget> for Carousel where
Widget: IsA<Widget>,
This is supported on crate feature
libadwaita
only.sourceimpl<Widget> FactoryView<Widget> for TabView where
Widget: IsA<Widget>,
This is supported on crate feature libadwaita
only.
impl<Widget> FactoryView<Widget> for TabView where
Widget: IsA<Widget>,
This is supported on crate feature
libadwaita
only.sourceimpl<Widget> FactoryView<Widget> for ViewStack where
Widget: IsA<Widget>,
This is supported on crate feature libadwaita
only.
impl<Widget> FactoryView<Widget> for ViewStack where
Widget: IsA<Widget>,
This is supported on crate feature
libadwaita
only.type Position = StackPageInfo
type Root = Widget
fn add(&self, widget: &Widget, position: &StackPageInfo) -> Widget
fn remove(&self, widget: &Widget)
sourceimpl<Widget> FactoryView<Widget> for Leaflet where
Widget: IsA<Widget>,
This is supported on crate feature libadwaita
only.
impl<Widget> FactoryView<Widget> for Leaflet where
Widget: IsA<Widget>,
This is supported on crate feature
libadwaita
only.type Position = ()
type Root = LeafletPage
fn add(&self, widget: &Widget, _position: &()) -> LeafletPage
fn remove(&self, widget: &LeafletPage)
sourceimpl<Widget> FactoryView<Widget> for Paned where
Widget: IsA<Widget>,
This is supported on crate feature libpanel
only.
impl<Widget> FactoryView<Widget> for Paned where
Widget: IsA<Widget>,
This is supported on crate feature
libpanel
only.