Basics
Guides
API Reference
Basics
Guides
API Reference
[12:7] extends: object
A list model that can create child models on demand.
TreeListModel (Handle = null)
Creates a new
TreeListModelby wrapping a native handle or another wrapper.
Handle is the native handle or another wrapper whose handle to adopt.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asObject ()
Wraps this handle as
Object.
A Object object.asListModel ()
Wraps this handle as
ListModel.
A ListModel object.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setAutoexpand (bool Value)
If all rows should be expanded by default.
Value is the new property value.None.get_autoexpand ()
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 [method@Gtk.TreeListRow.set_expanded].
get_child_row (int position)
Gets the row item corresponding to the child at index @position for
root model. If @position is greater than the number of children in the root model, %NULL is returned. Do not confuse this function with [method@Gtk.TreeListModel.get_row].position is position of the child to get.get_model ()
Gets the root model that @self was created with.
get_passthrough ()
Gets whether the model is passing through original row items. If this function returns %FALSE, the
GListModelfunctions for @self return customGtkTreeListRowobjects. You need to call [method@Gtk.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 [method@Gtk.TreeListModel.get_row] to get the customGtkTreeListRows.
get_row (int position)
Gets the row object for the given row. If @position is greater than the number of items in @self, %NULL 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
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 [method@Gtk.TreeListModel.get_child_row].position is the position of the row to fetch.set_autoexpand (bool autoexpand)
Sets whether the model should autoexpand. If set to %TRUE, the model will recursively expand all rows that get added to the model. This can be either rows added by changes to the underlying models or via [method@Gtk.TreeListRow.set_expanded].
autoexpand is %TRUE to make the model autoexpand its rows.None.model ()
Returns
get_modelas an Aussom list of wrapper objects. This companion method materializes the full collection up front; useget_model()when lazy or change-notify access is required.
An Aussom list of elements.[244:14] static extends: object
Generated metadata helpers for TreeListModel class surfaces.
properties ()
Returns property metadata for
TreeListModel.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.