Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TreeListRowMeta

[268:14] static extends: object

Generated metadata helpers for TreeListRow class surfaces.

Methods

  • properties ()

    Returns property metadata for TreeListRow.

    • @r A list.

class: TreeListRow

[19:7] extends: object

The type of item used by GtkTreeListModel. It allows navigating the model as a tree and modify the state of rows. GtkTreeListRow instances are created by a GtkTreeListModel only when the [property@Gtk.TreeListModel:passthrough] property is not set. There are various support objects that can make use of GtkTreeListRow objects, such as the [class@Gtk.TreeExpander] widget that allows displaying an icon to expand or collapse a row or [class@Gtk.TreeListRowSorter] that makes it possible to sort trees properly.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • TreeListRow (Handle = null)

    Creates a new TreeListRow 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.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setExpanded (bool Value)

    If this row is currently expanded.

    • @p Value is the new property value.
    • @r None.
  • get_child_row (int position)

    If @self is not expanded or @position is greater than the number of children, %NULL is returned.

    • @p position is position of the child to get.
  • get_children ()

    If the row is expanded, gets the model holding the children of @self. This model is the model created by the [callback@Gtk.TreeListModelCreateModelFunc] and contains the original items, no matter what value [property@Gtk.TreeListModel:passthrough] is set to.

  • get_depth ()

    Gets the depth of this row. Rows that correspond to items in the root model have a depth of zero, rows corresponding to items of models of direct children of the root model have a depth of 1 and so on. The depth of a row never changes until the row is removed from its model at which point it will forever return 0.

  • get_expanded ()

    Gets if a row is currently expanded.

  • get_item ()

    Gets the item corresponding to this row,

  • get_parent ()

    Gets the row representing the parent for @self. That is the row that would need to be collapsed to make this row disappear. If @self is a row corresponding to the root model, %NULL is returned. The value returned by this function never changes until the row is removed from its model at which point it will forever return %NULL.

  • get_position ()

    Returns the position in the GtkTreeListModel that @self occupies at the moment.

  • is_expandable ()

    Checks if a row can be expanded. This does not mean that the row is actually expanded, this can be checked with [method@Gtk.TreeListRow.get_expanded]. If a row is expandable never changes until the row is removed from its model at which point it will forever return %FALSE.

  • set_expanded (bool expanded)

    Expands or collapses a row. If a row is expanded, the model of calling the [callback@Gtk.TreeListModelCreateModelFunc] for the row's item will be inserted after this row. If a row is collapsed, those items will be removed from the model. If the row is not expandable, this function does nothing.

    • @p expanded is %TRUE if the row should be expanded.
    • @r None.
  • children ()

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

    • @r An Aussom list of elements.