Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TreeListModel

[12:7] extends: object

A list model that can create child models on demand.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • TreeListModel (Handle = null)

    Creates a new TreeListModel by wrapping a native handle or another wrapper.

    • @p 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 exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • asListModel ()

    Wraps this handle as ListModel.

    • @r 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.

    • @p Value is the new property value.
    • @r 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

    • @self's 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].
    • @p 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 GListModel functions for @self return custom GtkTreeListRow objects. 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 custom GtkTreeListRows.

  • 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

    • @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 [method@Gtk.TreeListModel.get_child_row].
    • @p 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].

    • @p autoexpand is %TRUE to make the model autoexpand its rows.
    • @r None.
  • model ()

    Returns get_model as an Aussom list of wrapper objects. This companion method materializes the full collection up front; use get_model() when lazy or change-notify access is required.

    • @r An Aussom list of elements.

class: TreeListModelMeta

[244:14] static extends: object

Generated metadata helpers for TreeListModel class surfaces.

Methods

  • properties ()

    Returns property metadata for TreeListModel.

    • @r A list.