TreeSortable

The interface for sortable models used by GtkTreeView

GtkTreeSortable is an interface to be implemented by tree models which support sorting. The GtkTreeView uses the methods provided by this interface to sort the model.

Skipped during bindings generation

  • parameter sort_column_id: sort_column_id: Out parameter is not supported

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val gtkTreeModelPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
abstract val gtkTreeSortablePointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun connectRowChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (path: TreePath, iter: TreeIter) -> Unit): <Error class: unknown class>

This signal is emitted when a row in the model has changed.

Link copied to clipboard
open fun connectRowDeleted(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (path: TreePath) -> Unit): <Error class: unknown class>

This signal is emitted when a row has been deleted.

Link copied to clipboard
open fun connectRowHasChildToggled(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (path: TreePath, iter: TreeIter) -> Unit): <Error class: unknown class>

This signal is emitted when a row has gotten the first child row or lost its last child row.

Link copied to clipboard
open fun connectRowInserted(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (path: TreePath, iter: TreeIter) -> Unit): <Error class: unknown class>

This signal is emitted when a new row has been inserted in the model.

Link copied to clipboard
open fun connectSortColumnChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>

The ::sort-column-changed signal is emitted when the sort column or sort order of @sortable is changed. The signal is emitted before the contents of @sortable are resorted.

Link copied to clipboard
open fun filterNew(root: TreePath? = null): TreeModel

Creates a new GtkTreeModel, with @child_model as the child_model and @root as the virtual root.

Link copied to clipboard

Calls @func on each node in model in a depth-first fashion.

Link copied to clipboard
open fun getColumnType(index: Int): <Error class: unknown class>

Returns the type of the column.

Link copied to clipboard

Returns a set of flags supported by this interface.

Link copied to clipboard
open fun getIter(iter: TreeIter, path: TreePath): Boolean

Sets @iter to a valid iterator pointing to @path.

Link copied to clipboard
open fun getIterFirst(iter: TreeIter): Boolean

Initializes @iter with the first iterator in the tree (the one at the path "0").

Link copied to clipboard
open fun getIterFromString(iter: TreeIter, pathString: String): Boolean

Sets @iter to a valid iterator pointing to @path_string, if it exists.

Link copied to clipboard
open fun getNColumns(): Int

Returns the number of columns supported by @tree_model.

Link copied to clipboard
open fun getPath(iter: TreeIter): TreePath

Returns a newly-created GtkTreePath referenced by @iter.

Link copied to clipboard

Generates a string representation of the iter.

Link copied to clipboard
open fun getValue(iter: TreeIter, column: Int, value: <Error class: unknown class>)

Initializes and sets @value to that at @column.

Link copied to clipboard

Returns true if the model has a default sort function. This is used primarily by GtkTreeViewColumns in order to determine if a model can go back to the default state, or not.

Link copied to clipboard
open fun iterChildren(iter: TreeIter, parent: TreeIter? = null): Boolean

Sets @iter to point to the first child of @parent.

Link copied to clipboard
open fun iterHasChild(iter: TreeIter): Boolean

Returns true if @iter has children, false otherwise.

Link copied to clipboard
open fun iterNChildren(iter: TreeIter? = null): Int

Returns the number of children that @iter has.

Link copied to clipboard
open fun iterNext(iter: TreeIter): Boolean

Sets @iter to point to the node following it at the current level.

Link copied to clipboard
open fun iterNthChild(iter: TreeIter, parent: TreeIter? = null, n: Int): Boolean

Sets @iter to be the child of @parent, using the given index.

Link copied to clipboard
open fun iterParent(iter: TreeIter, child: TreeIter): Boolean

Sets @iter to be the parent of @child.

Link copied to clipboard
open fun iterPrevious(iter: TreeIter): Boolean

Sets @iter to point to the previous node at the current level.

Link copied to clipboard
open fun refNode(iter: TreeIter)

Lets the tree ref the node.

Link copied to clipboard
open fun rowChanged(path: TreePath, iter: TreeIter)

Emits the ::row-changed signal on @tree_model.

Link copied to clipboard
open fun rowDeleted(path: TreePath)

Emits the ::row-deleted signal on @tree_model.

Link copied to clipboard
open fun rowHasChildToggled(path: TreePath, iter: TreeIter)

Emits the ::row-has-child-toggled signal on @tree_model.

Link copied to clipboard
open fun rowInserted(path: TreePath, iter: TreeIter)

Emits the ::row-inserted signal on @tree_model.

Link copied to clipboard

Sets the default comparison function used when sorting to be @sort_func. If the current sort column id of @sortable is %GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the model will sort using this function.

Link copied to clipboard
open fun setSortColumnId(sortColumnId: Int, order: SortType)

Sets the current sort column to be @sort_column_id. The @sortable will resort itself to reflect this change, after emitting a GtkTreeSortable::sort-column-changed signal. @sort_column_id may either be a regular column id, or one of the following special values:

Link copied to clipboard
open fun setSortFunc(sortColumnId: Int, sortFunc: TreeIterCompareFunc)

Sets the comparison function used when sorting to be @sort_func. If the current sort column id of @sortable is the same as @sort_column_id, then the model will sort using this function.

Link copied to clipboard

Emits a GtkTreeSortable::sort-column-changed signal on @sortable.

Link copied to clipboard
open fun unrefNode(iter: TreeIter)

Lets the tree unref the node.