Gtk.EnumList¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/co |
|||
r |
|||
r |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gtk.EnumList(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A [iface`Gio`.ListModel] representing values of a given enum.
GtkEnumListcontains objects of type [class`Gtk`.EnumListItem].A simple way to use a
GtkEnumListis to populate a [class`Gtk`.DropDown] widget using the short name (or “nick”) of the values of an enumeration type:``c choices = gtk_drop_down_new (G_LIST_MODEL (gtk_enum_list_new (type)),
- gtk_property_expression_new (GTK_TYPE_ENUM_LIST_ITEM,
NULL, “nick”));
Added in version 4.24.
- classmethod new(enum_type)[source]¶
- Parameters:
enum_type (
GObject.GType) – the type of the enum to construct the model from- Returns:
the newly created
GtkEnumList- Return type:
Creates a new
GtkEnumListfor enum_type.Added in version 4.24.
- find(value)[source]¶
-
Finds the position of a given enum value in self.
If the value is not found, [const`Gtk`.INVALID_LIST_POSITION] is returned.
Added in version 4.24.
Property Details¶
- Gtk.EnumList.props.enum_type¶
- Name:
enum-type- Type:
- Default Value:
<GType GEnum>- Flags:
The type of the enum represented by the model.
Added in version 4.24.
- Gtk.EnumList.props.item_type¶
- Name:
item-type- Type:
- Default Value:
<GType GtkEnumListItem>- Flags:
The type of the items. See [method`Gio`.ListModel.get_item_type].
Added in version 4.24.