Class: Gtk::TreeListModel
- Inherits:
-
Object
- Object
- Gtk::TreeListModel
- Defined in:
- (unknown)
Instance Method Summary collapse
-
#autoexpand ⇒ Boolean
Gets whether the model is set to automatically expand new rows that get added.
-
#autoexpand=(autoexpand) ⇒ Boolean
If all rows should be expanded by default.
-
#autoexpand? ⇒ Boolean
If all rows should be expanded by default.
-
#get_child_row(position) ⇒ Gtk::TreeListRow
Gets the row item corresponding to the child at index position for self's root model.
-
#get_row(position) ⇒ Gtk::TreeListRow
Gets the row object for the given row.
-
#initialize(root, passthrough, autoexpand, create_func, user_data, user_destroy) ⇒ Gtk::TreeListModel
constructor
Creates a new empty
GtkTreeListModeldisplaying root with all rows collapsed. -
#item_type ⇒ GLib::Type
The type of items.
-
#item_type=(item_type) ⇒ GLib::Type
The type of items.
-
#model ⇒ Gio::ListModel
The root model displayed.
-
#model=(model) ⇒ Gio::ListModel
The root model displayed.
-
#n_items ⇒ Integer
The number of items.
-
#n_items=(n_items) ⇒ Integer
The number of items.
-
#passthrough ⇒ Boolean
Gets whether the model is passing through original row items.
-
#passthrough=(passthrough) ⇒ Boolean
Gets whether the model is in passthrough mode.
-
#passthrough? ⇒ Boolean
Gets whether the model is in passthrough mode.
Constructor Details
#initialize(root, passthrough, autoexpand, create_func, user_data, user_destroy) ⇒ Gtk::TreeListModel
Creates a new empty GtkTreeListModel displaying root
with all rows collapsed.
Instance Method Details
#autoexpand ⇒ Boolean
Gets whether the model is set to automatically expand new rows that get added.
This can be either rows added by changes to the underlying models or via [methodGtk.TreeListRow.set_expanded].
#autoexpand=(autoexpand) ⇒ Boolean
If all rows should be expanded by default.
#autoexpand? ⇒ Boolean
If all rows should be expanded by default.
#get_child_row(position) ⇒ Gtk::TreeListRow
Gets the row item corresponding to the child at index position for self's root model.
If position is greater than the number of children in the root model, nil is returned.
Do not confuse this function with [methodGtk.TreeListModel.get_row].
#get_row(position) ⇒ Gtk::TreeListRow
Gets the row object for the given row.
If position is greater than the number of items in self, nil is returned.
The row object can be used to expand and collapse rows as well as to inspect its position in the tree. See its documentation for details.
This row object is persistent and will refer to the current item as long as the row is present in self, independent of other rows being added or removed.
If self is set to not be passthrough, this function is equivalent to calling g_list_model_get_item().
Do not confuse this function with [methodGtk.TreeListModel.get_child_row].
#item_type ⇒ GLib::Type
The type of items. See [methodGio.ListModel.get_item_type].
#item_type=(item_type) ⇒ GLib::Type
The type of items. See [methodGio.ListModel.get_item_type].
#model ⇒ Gio::ListModel
The root model displayed.
#model=(model) ⇒ Gio::ListModel
The root model displayed.
#n_items ⇒ Integer
The number of items. See [methodGio.ListModel.get_n_items].
#n_items=(n_items) ⇒ Integer
The number of items. See [methodGio.ListModel.get_n_items].
#passthrough ⇒ Boolean
Gets whether the model is passing through original row items.
If this function returns false, the GListModel functions for self
return custom GtkTreeListRow objects. You need to call
[methodGtk.TreeListRow.get_item] on these objects to get the original
item.
If true, the values of the child models are passed through in their
original state. You then need to call [methodGtk.TreeListModel.get_row]
to get the custom GtkTreeListRows.
#passthrough=(passthrough) ⇒ Boolean
Gets whether the model is in passthrough mode.
If false, the GListModel functions for this object return custom
[classGtk.TreeListRow] objects. If true, the values of the child
models are pass through unmodified.
#passthrough? ⇒ Boolean
Gets whether the model is in passthrough mode.
If false, the GListModel functions for this object return custom
[classGtk.TreeListRow] objects. If true, the values of the child
models are pass through unmodified.