pub trait ListItemExt: IsA<ListItem> + 'static {
Show 24 methods
// Provided methods
fn accessible_description(&self) -> GString { ... }
fn accessible_label(&self) -> GString { ... }
fn is_activatable(&self) -> bool { ... }
fn child(&self) -> Option<Widget> { ... }
fn is_focusable(&self) -> bool { ... }
fn item(&self) -> Option<Object> { ... }
fn position(&self) -> u32 { ... }
fn is_selectable(&self) -> bool { ... }
fn is_selected(&self) -> bool { ... }
fn set_accessible_description(&self, description: &str) { ... }
fn set_accessible_label(&self, label: &str) { ... }
fn set_activatable(&self, activatable: bool) { ... }
fn set_child(&self, child: Option<&impl IsA<Widget>>) { ... }
fn set_focusable(&self, focusable: bool) { ... }
fn set_selectable(&self, selectable: bool) { ... }
fn connect_accessible_description_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_accessible_label_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_activatable_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_child_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_focusable_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_item_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_position_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_selectable_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_selected_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}
Expand description
Provided Methods§
Sourcefn accessible_description(&self) -> GString
Available on crate feature v4_12
only.
fn accessible_description(&self) -> GString
v4_12
only.Sourcefn accessible_label(&self) -> GString
Available on crate feature v4_12
only.
fn accessible_label(&self) -> GString
v4_12
only.Sourcefn is_activatable(&self) -> bool
fn is_activatable(&self) -> bool
Sourcefn is_focusable(&self) -> bool
Available on crate feature v4_12
only.
fn is_focusable(&self) -> bool
v4_12
only.Sourcefn position(&self) -> u32
fn position(&self) -> u32
Gets the position in the model that @self currently displays.
If @self is unbound, GTK_INVALID_LIST_POSITION
is returned.
§Returns
The position of this item
Sourcefn is_selectable(&self) -> bool
fn is_selectable(&self) -> bool
Checks if a list item has been set to be selectable via gtk_list_item_set_selectable().
Do not confuse this function with is_selected()
.
§Returns
true
if the item is selectable
Sourcefn is_selected(&self) -> bool
fn is_selected(&self) -> bool
Sourcefn set_accessible_description(&self, description: &str)
Available on crate feature v4_12
only.
fn set_accessible_description(&self, description: &str)
v4_12
only.Sets the accessible description for the list item, which may be used by e.g. screen readers.
§description
the description
Sourcefn set_accessible_label(&self, label: &str)
Available on crate feature v4_12
only.
fn set_accessible_label(&self, label: &str)
v4_12
only.Sets the accessible label for the list item, which may be used by e.g. screen readers.
§label
the label
Sourcefn set_activatable(&self, activatable: bool)
fn set_activatable(&self, activatable: bool)
Sets @self to be activatable.
If an item is activatable, double-clicking on the item, using
the Return key or calling gtk_widget_activate() will activate
the item. Activating instructs the containing view to handle
activation. ListView
for example will be emitting the
activate
signal.
By default, list items are activatable.
§activatable
if the item should be activatable
Sourcefn set_focusable(&self, focusable: bool)
Available on crate feature v4_12
only.
fn set_focusable(&self, focusable: bool)
v4_12
only.Sets @self to be focusable.
If an item is focusable, it can be focused using the keyboard.
This works similar to WidgetExt::set_focusable()
.
Note that if items are not focusable, the keyboard cannot be used to activate them and selecting only works if one of the listitem’s children is focusable.
By default, list items are focusable.
§focusable
if the item should be focusable
Sourcefn set_selectable(&self, selectable: bool)
fn set_selectable(&self, selectable: bool)
Sets @self to be selectable.
If an item is selectable, clicking on the item or using the keyboard will try to select or unselect the item. If this succeeds is up to the model to determine, as it is managing the selected state.
Note that this means that making an item non-selectable has no influence on the selected state at all. A non-selectable item may still be selected.
By default, list items are selectable. When rebinding them to a new item, they will also be reset to be selectable by GTK.
§selectable
if the item should be selectable
fn connect_accessible_description_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v4_12
only.fn connect_accessible_label_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v4_12
only.fn connect_activatable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_child_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_focusable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
v4_12
only.fn connect_item_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_position_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_selectable_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_selected_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
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.