Basics
Guides
API Reference
Basics
Guides
API Reference
[447:14] static extends: object
Generated metadata helpers for TreeSelection class surfaces.
properties ()
Returns property metadata for
TreeSelection.
A list.signals ()
Returns signal metadata for
TreeSelection.
A list.[32:7] extends: object
The selection object for GtkTreeView The GtkTreeSelection object is a
helper object to manage the selection for a GtkTreeView widget. The
GtkTreeSelection object is automatically created when a new GtkTreeView
widget is created, and cannot exist independently of this widget. The primary
reason the GtkTreeSelection objects exists is for cleanliness of code and
API. That is, there is no conceptual reason all these functions could not be
methods on the GtkTreeView widget instead of a separate function. The
GtkTreeSelection object is gotten from a GtkTreeView by calling
gtk_tree_view_get_selection(). It can be manipulated to check the selection
status of the tree, as well as select and deselect individual rows. Selection
is done completely view side. As a result, multiple views of the same model
can have completely different selections. Additionally, you cannot change the
selection of a row on the model that is not currently displayed by the view
without expanding its parents first. One of the important things to remember
when monitoring the selection of a view is that the
GtkTreeSelection::changed signal is mostly a hint. That is, it may only
emit one signal when a range of rows is selected. Additionally, it may on
occasion emit a GtkTreeSelection::changed signal when nothing has happened
(mostly as a result of programmers calling select_row on an already selected
row).
TreeSelection (Handle = null)
Creates a new
TreeSelectionby 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.connectSignal (string Name, CallbackObj)
Connects one generated callback wrapper to a named signal.
Name is the signal name.CallbackObj is the generated callback wrapper to connect.The connected handler id.disconnectSignalHandler (int HandlerId)
Disconnects one retained signal handler id.
HandlerId is the signal handler id to disconnect.None.setOnChanged (callback Fn, UserData = null)
Emitted whenever the selection has (possibly) changed. Please note that this signal is mostly a hint. It may only be emitted once when a range of rows are selected, and it may occasionally be emitted when nothing has happened.
Fn is the Aussom callback.Fn is called with (TreeSelection Self).UserData is retained and passed through to the generated callback wrapper when provided.The connected handler id.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setMode (string Value)
Selection mode. See gtk_tree_selection_set_mode() for more information on this property.
Value is the new property value.None.count_selected_rows ()
Returns the number of rows that have been selected in @tree.
get_mode ()
Gets the selection mode for @selection. See gtk_tree_selection_set_mode().
get_tree_view ()
Returns the tree view associated with @selection.
get_user_data ()
Returns the user data for the selection function.
iter_is_selected (iter)
Returns %TRUE if the row at @iter is currently selected.
iter is A valid GtkTreeIter.path_is_selected (object path)
Returns %TRUE if the row pointed to by @path is currently selected. If
does not point to a valid location, %FALSE is returnedpath is A GtkTreePath to check selection on..select_all ()
Selects all the nodes. @selection must be set to %GTK_SELECTION_MULTIPLE mode.
None.select_iter (iter)
Selects the specified iterator.
iter is The GtkTreeIter to be selected..None.select_path (object path)
Select the row at @path.
path is The GtkTreePath to be selected..None.select_range (object start_path, object end_path)
Selects a range of nodes, determined by @start_path and @end_path inclusive. @selection must be set to %GTK_SELECTION_MULTIPLE mode.
start_path is The initial node of the range..end_path is The final node of the range..None.set_mode (string type)
Sets the selection mode of the @selection. If the previous type was %GTK_SELECTION_MULTIPLE, then the anchor is kept selected, if it was previously selected.
type is The selection mode.None.unselect_all ()
Unselects all the nodes.
None.unselect_iter (iter)
Unselects the specified iterator.
iter is The GtkTreeIter to be unselected..None.unselect_path (object path)
Unselects the row at @path.
path is The GtkTreePath to be unselected..None.unselect_range (object start_path, object end_path)
Unselects a range of nodes, determined by @start_path and @end_path inclusive.
start_path is The initial node of the range..end_path is The initial node of the range..None.selected_rows ()
Returns
get_selected_rowsas an Aussom list of wrapper objects. This companion method materializes the full collection up front; useget_selected_rows()when lazy or change-notify access is required.
An Aussom list of elements.[377:7] extends: object
Generated low-level callback wrapper for GIR callback changed.
TreeSelectionChangedCallback (callback Fn, UserData = null)
Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking
Fn.
Fn is the Aussom callback implementation.UserData is retained and passed through to Fn on each invocation when provided.trampoline (nativeSelf, nativeUserData)
Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.
callback ()
Returns the wrapped NativeCallback.
handle ()
Returns the callback as a NativeHandle.
close ()
Closes the underlying NativeCallback.
isClosed ()
Returns true when the callback has been closed.

Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.