Trait libadwaita::prelude::ComboRowExt
source · pub trait ComboRowExt: IsA<ComboRow> + Sealed + 'static {
Show 29 methods
// Provided methods
fn enables_search(&self) -> bool { ... }
fn expression(&self) -> Option<Expression> { ... }
fn factory(&self) -> Option<ListItemFactory> { ... }
fn header_factory(&self) -> Option<ListItemFactory> { ... }
fn list_factory(&self) -> Option<ListItemFactory> { ... }
fn model(&self) -> Option<ListModel> { ... }
fn search_match_mode(&self) -> StringFilterMatchMode { ... }
fn selected(&self) -> u32 { ... }
fn selected_item(&self) -> Option<Object> { ... }
fn uses_subtitle(&self) -> bool { ... }
fn set_enable_search(&self, enable_search: bool) { ... }
fn set_expression(&self, expression: Option<impl AsRef<Expression>>) { ... }
fn set_factory(&self, factory: Option<&impl IsA<ListItemFactory>>) { ... }
fn set_header_factory(&self, factory: Option<&impl IsA<ListItemFactory>>) { ... }
fn set_list_factory(&self, factory: Option<&impl IsA<ListItemFactory>>) { ... }
fn set_model(&self, model: Option<&impl IsA<ListModel>>) { ... }
fn set_search_match_mode(&self, search_match_mode: StringFilterMatchMode) { ... }
fn set_selected(&self, position: u32) { ... }
fn set_use_subtitle(&self, use_subtitle: bool) { ... }
fn connect_enable_search_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_expression_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_factory_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_header_factory_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_list_factory_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_model_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_search_match_mode_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_selected_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_selected_item_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_use_subtitle_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Provided Methods§
sourcefn enables_search(&self) -> bool
Available on crate feature v1_4
only.
fn enables_search(&self) -> bool
v1_4
only.Gets whether search is enabled.
If set to TRUE
, a search entry will be shown in the popup that
allows to search for items in the list.
Search requires expression
to be set.
§Returns
whether the popup includes a search entry
sourcefn expression(&self) -> Option<Expression>
fn expression(&self) -> Option<Expression>
Gets the expression used to obtain strings from items.
§Returns
the expression used to obtain strings from items
sourcefn factory(&self) -> Option<ListItemFactory>
fn factory(&self) -> Option<ListItemFactory>
sourcefn header_factory(&self) -> Option<ListItemFactory>
Available on crate feature v1_6
only.
fn header_factory(&self) -> Option<ListItemFactory>
v1_6
only.Gets the factory that’s currently used to create header widgets for the popup.
§Returns
The factory in use
sourcefn list_factory(&self) -> Option<ListItemFactory>
fn list_factory(&self) -> Option<ListItemFactory>
sourcefn search_match_mode(&self) -> StringFilterMatchMode
Available on crate feature v1_6
only.
fn search_match_mode(&self) -> StringFilterMatchMode
v1_6
only.Returns the match mode that the search filter is using.
§Returns
the match mode of the search filter
sourcefn selected(&self) -> u32
fn selected(&self) -> u32
Gets the position of the selected item.
§Returns
the position of the selected item, or
Gtk::INVALID_LIST_POSITION
if no item is selected
sourcefn selected_item(&self) -> Option<Object>
fn selected_item(&self) -> Option<Object>
sourcefn uses_subtitle(&self) -> bool
fn uses_subtitle(&self) -> bool
Gets whether to use the current value as the subtitle.
§Returns
whether to use the current value as the subtitle
sourcefn set_enable_search(&self, enable_search: bool)
Available on crate feature v1_4
only.
fn set_enable_search(&self, enable_search: bool)
v1_4
only.Sets whether to enable search.
If set to TRUE
, a search entry will be shown in the popup that
allows to search for items in the list.
Search requires expression
to be set.
§enable_search
whether to enable search
sourcefn set_expression(&self, expression: Option<impl AsRef<Expression>>)
fn set_expression(&self, expression: Option<impl AsRef<Expression>>)
Sets the expression used to obtain strings from items.
The expression must have a value type of G_TYPE_STRING
.
It’s used to bind strings to labels produced by the default factory if
factory
is not set, or when
use-subtitle
is set to TRUE
.
§expression
an expression
sourcefn set_factory(&self, factory: Option<&impl IsA<ListItemFactory>>)
fn set_factory(&self, factory: Option<&impl IsA<ListItemFactory>>)
Sets the factory for populating list items.
This factory is always used for the item in the row. It is also used for
items in the popup unless list-factory
is set.
§factory
the factory to use
sourcefn set_header_factory(&self, factory: Option<&impl IsA<ListItemFactory>>)
Available on crate feature v1_6
only.
fn set_header_factory(&self, factory: Option<&impl IsA<ListItemFactory>>)
v1_6
only.sourcefn set_list_factory(&self, factory: Option<&impl IsA<ListItemFactory>>)
fn set_list_factory(&self, factory: Option<&impl IsA<ListItemFactory>>)
sourcefn set_search_match_mode(&self, search_match_mode: StringFilterMatchMode)
Available on crate feature v1_6
only.
fn set_search_match_mode(&self, search_match_mode: StringFilterMatchMode)
v1_6
only.sourcefn set_selected(&self, position: u32)
fn set_selected(&self, position: u32)
Selects the item at the given position.
§position
the position of the item to select, or
Gtk::INVALID_LIST_POSITION
sourcefn set_use_subtitle(&self, use_subtitle: bool)
fn set_use_subtitle(&self, use_subtitle: bool)
Sets whether to use the current value as the subtitle.
If you use a custom list item factory, you will need to give the row a
name conversion expression with expression
.
If set to TRUE
, you should not access subtitle
.
The subtitle is interpreted as Pango markup if
use-markup
is set to TRUE
.
§use_subtitle
whether to use the current value as the subtitle
fn connect_enable_search_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v1_4
only.fn connect_expression_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_factory_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_header_factory_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v1_6
only.fn connect_list_factory_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_model_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_search_match_mode_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v1_6
only.