pub trait RelmSelectionExt: IsA<SelectionModel> {
// Required methods
fn new_model(model: ListModel) -> Self;
fn set_list_model(&mut self, model: &ListModel);
}Expand description
Allows to create new or change existing gtk::SelectionModel
for Relm’s type safe abstractions
over gtk::ColumnView
(i.e. TypedColumnView),
gtk::ListView
(i.e. TypedListView)
and gtk::GridView
(i.e. TypedGridView).
Required Methods§
Sourcefn new_model(model: ListModel) -> Self
fn new_model(model: ListModel) -> Self
Creates new gtk::SelectionModel to view it is implemented on
Typically called during init
phase of TypedColumnView,
TypedListView
or TypedGridView
to provide a chosen selection model for view instantiation.
Sourcefn set_list_model(&mut self, model: &ListModel)
fn set_list_model(&mut self, model: &ListModel)
Set provided gio::ListModel on the chosen (i.e. Self) selection model
Usually it is useful to do during the addition of new filters,
in that case the existing model has to be replaced with provided gtk::FilterListModel.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.