TreeViewProtocol
public protocol TreeViewProtocol : ScrollableProtocol, WidgetProtocol
A widget for displaying both trees and lists
Widget that displays any object that implements the [ifaceGtk.TreeModel] interface.
Please refer to the tree widget conceptual overview for an overview of all the objects and data types related to the tree widget and how they work together.
Coordinate systems in GtkTreeView API
Several different coordinate systems are exposed in the GtkTreeView API.
These are:

Widget coordinates: Coordinates relative to the widget (usually
widget->window).Bin window coordinates: Coordinates relative to the window that GtkTreeView renders to.
Tree coordinates: Coordinates relative to the entire scrollable area of GtkTreeView. These coordinates start at (0, 0) for row 0 of the tree.
Several functions are available for converting between the different
coordinate systems. The most common translations are between widget and bin
window coordinates and between bin window and tree coordinates. For the
former you can use methodGtk.TreeView.convert_widget_to_bin_window_coords, for the latter methodGtk.TreeView.convert_bin_window_to_tree_coords.
GtkTreeView as GtkBuildable
The GtkTreeView implementation of the GtkBuildable interface accepts
[classGtk.TreeViewColumn] objects as <child> elements and exposes the
internal [classGtk.TreeSelection] in UI definitions.
An example of a UI definition fragment with GtkTreeView:
<object class="GtkTreeView" id="treeview">
<property name="model">liststore1</property>
<child>
<object class="GtkTreeViewColumn" id="test-column">
<property name="title">Test</property>
<child>
<object class="GtkCellRendererText" id="test-renderer"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child internal-child="selection">
<object class="GtkTreeSelection" id="selection">
<signal name="changed" handler="on_treeview_selection_changed"/>
</object>
</child>
</object>
CSS nodes
treeview.view
├── header
│ ├── button
│ │ ╰── [sort-indicator]
┊ ┊
│ ╰── button
│ ╰── [sort-indicator]
│
├── [rubberband]
╰── [dndtarget]
GtkTreeView has a main CSS node with name treeview and style class .view.
It has a subnode with name header, which is the parent for all the column
header widgets’ CSS nodes.
Each column header consists of a button, which among other content, has a
child with name sort-indicator, which carries the .ascending or .descending
style classes when the column header should show a sort indicator. The CSS
is expected to provide a suitable image using the -gtk-icon-source property.
For rubberband selection, a subnode with name rubberband is used.
For the drop target location during DND, a subnode with name dndtarget is used.
The TreeViewProtocol protocol exposes the methods and properties of an underlying GtkTreeView instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see TreeView.
Alternatively, use TreeViewRef as a lighweight, unowned reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkTreeViewinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
tree_view_ptrDefault implementationTyped pointer to the underlying
GtkTreeViewinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkTreeViewinstance.Declaration
Swift
var tree_view_ptr: UnsafeMutablePointer<GtkTreeView>! { get } -
Required Initialiser for types conforming to
TreeViewProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
bind(property:Extension methodto: _: flags: transformFrom: transformTo: ) Bind a
TreeViewPropertyNamesource property to a given target object.Declaration
Swift
@discardableResult @inlinable func bind<Q, T>(property source_property: TreeViewPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocolParameters
source_propertythe source property to bind
targetthe target object to bind to
target_propertythe target property to bind to
flagsthe flags to pass to the
Bindingtransform_fromValueTransformerto use for forward transformationtransform_toValueTransformerto use for backwards transformationReturn Value
binding reference or
nilin case of an error -
get(property:Extension method) Get the value of a TreeView property
Declaration
Swift
@inlinable func get(property: TreeViewPropertyName) -> GLibObject.ValueParameters
propertythe property to get the value for
Return Value
the value of the named property
-
set(property:Extension methodvalue: ) Set the value of a TreeView property. Note that this will only have an effect on properties that are writable and not construct-only!
Declaration
Swift
@inlinable func set(property: TreeViewPropertyName, value v: GLibObject.Value)Parameters
propertythe property to get the value for
Return Value
the value of the named property
-
connect(signal:Extension methodflags: handler: ) Connect a Swift signal handler to the given, typed
TreeViewSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: TreeViewSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatahandlerThe Swift signal handler (function or callback) to invoke on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
connect(signal:Extension methodflags: data: destroyData: signalHandler: ) Connect a C signal handler to the given, typed
TreeViewSignalNamesignalDeclaration
Swift
@discardableResult @inlinable func connect(signal s: TreeViewSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> IntParameters
signalThe signal to connect
flagsThe connection flags to use
dataA pointer to user data to provide to the callback
destroyDataA
GClosureNotifyC function to destroy the data pointed to byuserDatasignalHandlerThe C function to be called on the given signal
Return Value
The signal handler ID (always greater than 0 for successful connections)
-
onColumnsChanged(flags:Extension methodhandler: ) The number of columns of the treeview has changed.
Note
This represents the underlyingcolumns-changedsignalDeclaration
Swift
@discardableResult @inlinable func onColumnsChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
columnsChangedsignal is emitted -
columnsChangedSignalExtension methodTyped
columns-changedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var columnsChangedSignal: TreeViewSignalName { get } -
onCursorChanged(flags:Extension methodhandler: ) The position of the cursor (focused cell) has changed.
Note
This represents the underlyingcursor-changedsignalDeclaration
Swift
@discardableResult @inlinable func onCursorChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
cursorChangedsignal is emitted -
cursorChangedSignalExtension methodTyped
cursor-changedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var cursorChangedSignal: TreeViewSignalName { get } -
onExpandCollapseCursorRow(flags:Extension methodhandler: ) Note
This represents the underlyingexpand-collapse-cursor-rowsignalDeclaration
Swift
@discardableResult @inlinable func onExpandCollapseCursorRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ object: Bool, _ p0: Bool, _ p1: Bool) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
objectnone
p0none
p1none
handlerThe signal handler to call Run the given callback whenever the
expandCollapseCursorRowsignal is emitted -
expandCollapseCursorRowSignalExtension methodTyped
expand-collapse-cursor-rowsignal for using theconnect(signal:)methodsDeclaration
Swift
static var expandCollapseCursorRowSignal: TreeViewSignalName { get } -
onMoveCursor(flags:Extension methodhandler: ) The
GtkTreeViewmove-cursorsignal is a keybinding signal which gets emitted when the user presses one of the cursor keys.Applications should not connect to it, but may emit it with
g_signal_emit_by_name()if they need to control the cursor programmatically. In contrast togtk_tree_view_set_cursor()andgtk_tree_view_set_cursor_on_cell()when moving horizontallyGtkTreeViewmove-cursordoes not reset the current selection.Note
This represents the underlyingmove-cursorsignalDeclaration
Swift
@discardableResult @inlinable func onMoveCursor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ step: MovementStep, _ direction: Int, _ extend: Bool, _ modify: Bool) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
stepthe granularity of the move, as a
GtkMovementStep.GTK_MOVEMENT_LOGICAL_POSITIONS,GTK_MOVEMENT_VISUAL_POSITIONS,GTK_MOVEMENT_DISPLAY_LINES,GTK_MOVEMENT_PAGESandGTK_MOVEMENT_BUFFER_ENDSare supported.GTK_MOVEMENT_LOGICAL_POSITIONSandGTK_MOVEMENT_VISUAL_POSITIONSare treated identically.directionthe direction to move: +1 to move forwards; -1 to move backwards. The resulting movement is undefined for all other values.
extendwhether to extend the selection
modifywhether to modify the selection
handlertrueifstepis supported,falseotherwise. Run the given callback whenever themoveCursorsignal is emitted -
moveCursorSignalExtension methodTyped
move-cursorsignal for using theconnect(signal:)methodsDeclaration
Swift
static var moveCursorSignal: TreeViewSignalName { get } -
onRowActivated(flags:Extension methodhandler: ) The “row-activated” signal is emitted when the method
gtk_tree_view_row_activated()is called.This signal is emitted when the user double-clicks a treeview row with the [property
Gtk.TreeView:activate-on-single-click] property set tofalse, or when the user single-clicks a row when that property set totrue.This signal is also emitted when a non-editable row is selected and one of the keys: <kbd>Space</kbd>, <kbd>Shift</kbd>+<kbd>Space</kbd>, <kbd>Return</kbd> or <kbd>Enter</kbd> is pressed.
For selection handling refer to the tree widget conceptual overview as well as
GtkTreeSelection.Note
This represents the underlyingrow-activatedsignalDeclaration
Swift
@discardableResult @inlinable func onRowActivated(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ path: TreePathRef, _ column: TreeViewColumnRef?) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
paththe
GtkTreePathfor the activated rowcolumnthe
GtkTreeViewColumnin which the activation occurredhandlerThe signal handler to call Run the given callback whenever the
rowActivatedsignal is emitted -
rowActivatedSignalExtension methodTyped
row-activatedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var rowActivatedSignal: TreeViewSignalName { get } -
onRowCollapsed(flags:Extension methodhandler: ) The given row has been collapsed (child nodes are hidden).
Note
This represents the underlyingrow-collapsedsignalDeclaration
Swift
@discardableResult @inlinable func onRowCollapsed(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ iter: TreeIterRef, _ path: TreePathRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
iterthe tree iter of the collapsed row
patha tree path that points to the row
handlerThe signal handler to call Run the given callback whenever the
rowCollapsedsignal is emitted -
rowCollapsedSignalExtension methodTyped
row-collapsedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var rowCollapsedSignal: TreeViewSignalName { get } -
onRowExpanded(flags:Extension methodhandler: ) The given row has been expanded (child nodes are shown).
Note
This represents the underlyingrow-expandedsignalDeclaration
Swift
@discardableResult @inlinable func onRowExpanded(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ iter: TreeIterRef, _ path: TreePathRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
iterthe tree iter of the expanded row
patha tree path that points to the row
handlerThe signal handler to call Run the given callback whenever the
rowExpandedsignal is emitted -
rowExpandedSignalExtension methodTyped
row-expandedsignal for using theconnect(signal:)methodsDeclaration
Swift
static var rowExpandedSignal: TreeViewSignalName { get } -
onSelectAll(flags:Extension methodhandler: ) Note
This represents the underlyingselect-allsignalDeclaration
Swift
@discardableResult @inlinable func onSelectAll(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
selectAllsignal is emitted -
selectAllSignalExtension methodTyped
select-allsignal for using theconnect(signal:)methodsDeclaration
Swift
static var selectAllSignal: TreeViewSignalName { get } -
onSelectCursorParent(flags:Extension methodhandler: ) Note
This represents the underlyingselect-cursor-parentsignalDeclaration
Swift
@discardableResult @inlinable func onSelectCursorParent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
selectCursorParentsignal is emitted -
selectCursorParentSignalExtension methodTyped
select-cursor-parentsignal for using theconnect(signal:)methodsDeclaration
Swift
static var selectCursorParentSignal: TreeViewSignalName { get } -
onSelectCursorRow(flags:Extension methodhandler: ) Note
This represents the underlyingselect-cursor-rowsignalDeclaration
Swift
@discardableResult @inlinable func onSelectCursorRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ object: Bool) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
objectnone
handlerThe signal handler to call Run the given callback whenever the
selectCursorRowsignal is emitted -
selectCursorRowSignalExtension methodTyped
select-cursor-rowsignal for using theconnect(signal:)methodsDeclaration
Swift
static var selectCursorRowSignal: TreeViewSignalName { get } -
onStartInteractiveSearch(flags:Extension methodhandler: ) Note
This represents the underlyingstart-interactive-searchsignalDeclaration
Swift
@discardableResult @inlinable func onStartInteractiveSearch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
startInteractiveSearchsignal is emitted -
startInteractiveSearchSignalExtension methodTyped
start-interactive-searchsignal for using theconnect(signal:)methodsDeclaration
Swift
static var startInteractiveSearchSignal: TreeViewSignalName { get } -
onTestCollapseRow(flags:Extension methodhandler: ) The given row is about to be collapsed (hide its children nodes). Use this signal if you need to control the collapsibility of individual rows.
Note
This represents the underlyingtest-collapse-rowsignalDeclaration
Swift
@discardableResult @inlinable func onTestCollapseRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ iter: TreeIterRef, _ path: TreePathRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
iterthe tree iter of the row to collapse
patha tree path that points to the row
handlerfalseto allow collapsing,trueto reject Run the given callback whenever thetestCollapseRowsignal is emitted -
testCollapseRowSignalExtension methodTyped
test-collapse-rowsignal for using theconnect(signal:)methodsDeclaration
Swift
static var testCollapseRowSignal: TreeViewSignalName { get } -
onTestExpandRow(flags:Extension methodhandler: ) The given row is about to be expanded (show its children nodes). Use this signal if you need to control the expandability of individual rows.
Note
This represents the underlyingtest-expand-rowsignalDeclaration
Swift
@discardableResult @inlinable func onTestExpandRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ iter: TreeIterRef, _ path: TreePathRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
iterthe tree iter of the row to expand
patha tree path that points to the row
handlerfalseto allow expansion,trueto reject Run the given callback whenever thetestExpandRowsignal is emitted -
testExpandRowSignalExtension methodTyped
test-expand-rowsignal for using theconnect(signal:)methodsDeclaration
Swift
static var testExpandRowSignal: TreeViewSignalName { get } -
onToggleCursorRow(flags:Extension methodhandler: ) Note
This represents the underlyingtoggle-cursor-rowsignalDeclaration
Swift
@discardableResult @inlinable func onToggleCursorRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
toggleCursorRowsignal is emitted -
toggleCursorRowSignalExtension methodTyped
toggle-cursor-rowsignal for using theconnect(signal:)methodsDeclaration
Swift
static var toggleCursorRowSignal: TreeViewSignalName { get } -
onUnselectAll(flags:Extension methodhandler: ) Note
This represents the underlyingunselect-allsignalDeclaration
Swift
@discardableResult @inlinable func onUnselectAll(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
handlerThe signal handler to call Run the given callback whenever the
unselectAllsignal is emitted -
unselectAllSignalExtension methodTyped
unselect-allsignal for using theconnect(signal:)methodsDeclaration
Swift
static var unselectAllSignal: TreeViewSignalName { get } -
onNotifyActivateOnSingleClick(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::activate-on-single-clicksignalDeclaration
Swift
@discardableResult @inlinable func onNotifyActivateOnSingleClick(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyActivateOnSingleClicksignal is emitted -
notifyActivateOnSingleClickSignalExtension methodTyped
notify::activate-on-single-clicksignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyActivateOnSingleClickSignal: TreeViewSignalName { get } -
onNotifyEnableGridLines(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::enable-grid-linessignalDeclaration
Swift
@discardableResult @inlinable func onNotifyEnableGridLines(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyEnableGridLinessignal is emitted -
notifyEnableGridLinesSignalExtension methodTyped
notify::enable-grid-linessignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyEnableGridLinesSignal: TreeViewSignalName { get } -
onNotifyEnableSearch(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::enable-searchsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyEnableSearch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyEnableSearchsignal is emitted -
notifyEnableSearchSignalExtension methodTyped
notify::enable-searchsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyEnableSearchSignal: TreeViewSignalName { get } -
onNotifyEnableTreeLines(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::enable-tree-linessignalDeclaration
Swift
@discardableResult @inlinable func onNotifyEnableTreeLines(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyEnableTreeLinessignal is emitted -
notifyEnableTreeLinesSignalExtension methodTyped
notify::enable-tree-linessignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyEnableTreeLinesSignal: TreeViewSignalName { get } -
onNotifyExpanderColumn(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::expander-columnsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyExpanderColumn(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyExpanderColumnsignal is emitted -
notifyExpanderColumnSignalExtension methodTyped
notify::expander-columnsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyExpanderColumnSignal: TreeViewSignalName { get } -
onNotifyFixedHeightMode(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::fixed-height-modesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyFixedHeightMode(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyFixedHeightModesignal is emitted -
notifyFixedHeightModeSignalExtension methodTyped
notify::fixed-height-modesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyFixedHeightModeSignal: TreeViewSignalName { get } -
onNotifyHeadersClickable(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::headers-clickablesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHeadersClickable(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHeadersClickablesignal is emitted -
notifyHeadersClickableSignalExtension methodTyped
notify::headers-clickablesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHeadersClickableSignal: TreeViewSignalName { get } -
onNotifyHeadersVisible(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::headers-visiblesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHeadersVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHeadersVisiblesignal is emitted -
notifyHeadersVisibleSignalExtension methodTyped
notify::headers-visiblesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHeadersVisibleSignal: TreeViewSignalName { get } -
onNotifyHoverExpand(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::hover-expandsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHoverExpand(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHoverExpandsignal is emitted -
notifyHoverExpandSignalExtension methodTyped
notify::hover-expandsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHoverExpandSignal: TreeViewSignalName { get } -
onNotifyHoverSelection(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::hover-selectionsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyHoverSelection(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyHoverSelectionsignal is emitted -
notifyHoverSelectionSignalExtension methodTyped
notify::hover-selectionsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyHoverSelectionSignal: TreeViewSignalName { get } -
onNotifyLevelIndentation(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::level-indentationsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyLevelIndentation(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyLevelIndentationsignal is emitted -
notifyLevelIndentationSignalExtension methodTyped
notify::level-indentationsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyLevelIndentationSignal: TreeViewSignalName { get } -
onNotifyModel(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::modelsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyModel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyModelsignal is emitted -
notifyModelSignalExtension methodTyped
notify::modelsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyModelSignal: TreeViewSignalName { get } -
onNotifyReorderable(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::reorderablesignalDeclaration
Swift
@discardableResult @inlinable func onNotifyReorderable(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyReorderablesignal is emitted -
notifyReorderableSignalExtension methodTyped
notify::reorderablesignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyReorderableSignal: TreeViewSignalName { get } -
onNotifyRubberBanding(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::rubber-bandingsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyRubberBanding(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyRubberBandingsignal is emitted -
notifyRubberBandingSignalExtension methodTyped
notify::rubber-bandingsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyRubberBandingSignal: TreeViewSignalName { get } -
onNotifySearchColumn(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::search-columnsignalDeclaration
Swift
@discardableResult @inlinable func onNotifySearchColumn(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifySearchColumnsignal is emitted -
notifySearchColumnSignalExtension methodTyped
notify::search-columnsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifySearchColumnSignal: TreeViewSignalName { get } -
onNotifyShowExpanders(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::show-expanderssignalDeclaration
Swift
@discardableResult @inlinable func onNotifyShowExpanders(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyShowExpanderssignal is emitted -
notifyShowExpandersSignalExtension methodTyped
notify::show-expanderssignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyShowExpandersSignal: TreeViewSignalName { get } -
onNotifyTooltipColumn(flags:Extension methodhandler: ) The notify signal is emitted on an object when one of its properties has its value set through
g_object_set_property(),g_object_set(), et al.Note that getting this signal doesn’t itself guarantee that the value of the property has actually changed. When it is emitted is determined by the derived GObject class. If the implementor did not create the property with
G_PARAM_EXPLICIT_NOTIFY, then any call tog_object_set_property()results innotifybeing emitted, even if the new value is the same as the old. If they did passG_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly callg_object_notify()org_object_notify_by_pspec(), and common practice is to do that only when the value has actually changed.This signal is typically used to obtain change notification for a single property, by specifying the property name as a detail in the
g_signal_connect()call, like this:(C Language Example):
g_signal_connect (text_view->buffer, "notify::paste-target-list", G_CALLBACK (gtk_text_view_target_list_notify), text_view)It is important to note that you must use canonical parameter names as detail strings for the notify signal.
Note
This represents the underlyingnotify::tooltip-columnsignalDeclaration
Swift
@discardableResult @inlinable func onNotifyTooltipColumn(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> IntParameters
flagsFlags
unownedSelfReference to instance of self
pspecthe
GParamSpecof the property which changed.handlerThe signal handler to call Run the given callback whenever the
notifyTooltipColumnsignal is emitted -
notifyTooltipColumnSignalExtension methodTyped
notify::tooltip-columnsignal for using theconnect(signal:)methodsDeclaration
Swift
static var notifyTooltipColumnSignal: TreeViewSignalName { get }
-
append(column:Extension method) Appends
columnto the list of columns. Iftree_viewhas “fixed_height” mode enabled, thencolumnmust have its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.Declaration
Swift
@inlinable func append<TreeViewColumnT>(column: TreeViewColumnT) -> Int where TreeViewColumnT : TreeViewColumnProtocol -
collapseAll()Extension methodRecursively collapses all visible, expanded nodes in
tree_view.Declaration
Swift
@inlinable func collapseAll() -
collapseRow(path:Extension method) Collapses a row (hides its child rows, if they exist).
Declaration
Swift
@inlinable func collapseRow<TreePathT>(path: TreePathT) -> Bool where TreePathT : TreePathProtocol -
columnsAutosize()Extension methodResizes all columns to their optimal width. Only works after the treeview has been realized.
Declaration
Swift
@inlinable func columnsAutosize() -
convertBinWindowToTreeCoords(bx:Extension methodby: tx: ty: ) Converts bin_window coordinates to coordinates for the tree (the full scrollable area of the tree).
Declaration
Swift
@inlinable func convertBinWindowToTreeCoords(bx: Int, by: Int, tx: UnsafeMutablePointer<gint>!, ty: UnsafeMutablePointer<gint>!) -
convertBinWindowToWidgetCoords(bx:Extension methodby: wx: wy: ) Converts bin_window coordinates to widget relative coordinates.
Declaration
Swift
@inlinable func convertBinWindowToWidgetCoords(bx: Int, by: Int, wx: UnsafeMutablePointer<gint>!, wy: UnsafeMutablePointer<gint>!) -
convertTreeToBinWindowCoords(tx:Extension methodty: bx: by: ) Converts tree coordinates (coordinates in full scrollable area of the tree) to bin_window coordinates.
Declaration
Swift
@inlinable func convertTreeToBinWindowCoords(tx: Int, ty: Int, bx: UnsafeMutablePointer<gint>!, by: UnsafeMutablePointer<gint>!) -
convertTreeToWidgetCoords(tx:Extension methodty: wx: wy: ) Converts tree coordinates (coordinates in full scrollable area of the tree) to widget coordinates.
Declaration
Swift
@inlinable func convertTreeToWidgetCoords(tx: Int, ty: Int, wx: UnsafeMutablePointer<gint>!, wy: UnsafeMutablePointer<gint>!) -
convertWidgetToBinWindowCoords(wx:Extension methodwy: bx: by: ) Converts widget coordinates to coordinates for the bin_window.
Declaration
Swift
@inlinable func convertWidgetToBinWindowCoords(wx: Int, wy: Int, bx: UnsafeMutablePointer<gint>!, by: UnsafeMutablePointer<gint>!) -
convertWidgetToTreeCoords(wx:Extension methodwy: tx: ty: ) Converts widget coordinates to coordinates for the tree (the full scrollable area of the tree).
Declaration
Swift
@inlinable func convertWidgetToTreeCoords(wx: Int, wy: Int, tx: UnsafeMutablePointer<gint>!, ty: UnsafeMutablePointer<gint>!) -
createRowDragIcon(path:Extension method) Creates a
cairo_surface_trepresentation of the row atpath. This image is used for a drag icon.Declaration
Swift
@inlinable func createRowDragIcon<TreePathT>(path: TreePathT) -> Gdk.PaintableRef! where TreePathT : TreePathProtocol -
enableModelDragDest(formats:Extension methodactions: ) Turns
tree_viewinto a drop destination for automatic DND. Calling this method setsGtkTreeView:reorderable tofalse.Declaration
Swift
@inlinable func enableModelDragDest<ContentFormatsT>(formats: ContentFormatsT, actions: Gdk.DragAction) where ContentFormatsT : ContentFormatsProtocol -
enableModelDragSource(startButtonMask:Extension methodformats: actions: ) Turns
tree_viewinto a drag source for automatic DND. Calling this method setsGtkTreeView:reorderable tofalse.Declaration
Swift
@inlinable func enableModelDragSource<ContentFormatsT>(startButtonMask: Gdk.ModifierType, formats: ContentFormatsT, actions: Gdk.DragAction) where ContentFormatsT : ContentFormatsProtocol -
expandAll()Extension methodRecursively expands all nodes in the
tree_view.Declaration
Swift
@inlinable func expandAll() -
expandRow(path:Extension methodopenAll: ) Opens the row so its children are visible.
Declaration
Swift
@inlinable func expandRow<TreePathT>(path: TreePathT, openAll: Bool) -> Bool where TreePathT : TreePathProtocol -
expandTo(path:Extension method) Expands the row at
path. This will also expand all parent rows ofpathas necessary.Declaration
Swift
@inlinable func expandTo<TreePathT>(path: TreePathT) where TreePathT : TreePathProtocol -
getActivateOnSingleClick()Extension methodGets the setting set by
gtk_tree_view_set_activate_on_single_click().Declaration
Swift
@inlinable func getActivateOnSingleClick() -> Bool -
getBackgroundArea(path:Extension methodcolumn: rect: ) Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by
pathand the column specified bycolumn. Ifpathisnil, or points to a node not found in the tree, theyandheightfields of the rectangle will be filled with 0. Ifcolumnisnil, thexandwidthfields will be filled with 0. The returned rectangle is equivalent to thebackground_areapassed togtk_cell_renderer_render(). These background areas tile to cover the entire bin window. Contrast with thecell_area, returned bygtk_tree_view_get_cell_area(), which returns only the cell itself, excluding surrounding borders and the tree expander area.Declaration
Swift
@inlinable func getBackgroundArea<RectangleT>(path: TreePathRef? = nil, column: TreeViewColumnRef? = nil, rect: RectangleT) where RectangleT : RectangleProtocol -
getBackgroundArea(path:Extension methodcolumn: rect: ) Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by
pathand the column specified bycolumn. Ifpathisnil, or points to a node not found in the tree, theyandheightfields of the rectangle will be filled with 0. Ifcolumnisnil, thexandwidthfields will be filled with 0. The returned rectangle is equivalent to thebackground_areapassed togtk_cell_renderer_render(). These background areas tile to cover the entire bin window. Contrast with thecell_area, returned bygtk_tree_view_get_cell_area(), which returns only the cell itself, excluding surrounding borders and the tree expander area.Declaration
Swift
@inlinable func getBackgroundArea<RectangleT, TreePathT, TreeViewColumnT>(path: TreePathT?, column: TreeViewColumnT?, rect: RectangleT) where RectangleT : RectangleProtocol, TreePathT : TreePathProtocol, TreeViewColumnT : TreeViewColumnProtocol -
getCellArea(path:Extension methodcolumn: rect: ) Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by
pathand the column specified bycolumn. Ifpathisnil, or points to a path not currently displayed, theyandheightfields of the rectangle will be filled with 0. Ifcolumnisnil, thexandwidthfields will be filled with 0. The sum of all cell rects does not cover the entire tree; there are extra pixels in between rows, for example. The returned rectangle is equivalent to thecell_areapassed togtk_cell_renderer_render(). This function is only valid iftree_viewis realized.Declaration
Swift
@inlinable func getCellArea<RectangleT>(path: TreePathRef? = nil, column: TreeViewColumnRef? = nil, rect: RectangleT) where RectangleT : RectangleProtocol -
getCellArea(path:Extension methodcolumn: rect: ) Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by
pathand the column specified bycolumn. Ifpathisnil, or points to a path not currently displayed, theyandheightfields of the rectangle will be filled with 0. Ifcolumnisnil, thexandwidthfields will be filled with 0. The sum of all cell rects does not cover the entire tree; there are extra pixels in between rows, for example. The returned rectangle is equivalent to thecell_areapassed togtk_cell_renderer_render(). This function is only valid iftree_viewis realized.Declaration
Swift
@inlinable func getCellArea<RectangleT, TreePathT, TreeViewColumnT>(path: TreePathT?, column: TreeViewColumnT?, rect: RectangleT) where RectangleT : RectangleProtocol, TreePathT : TreePathProtocol, TreeViewColumnT : TreeViewColumnProtocol -
getColumn(n:Extension method) Gets the
GtkTreeViewColumnat the given position in thetree_view.Declaration
Swift
@inlinable func getColumn(n: Int) -> TreeViewColumnRef! -
getColumns()Extension methodReturns a
GListof all theGtkTreeViewColumns currently intree_view. The returned list must be freed with g_list_free ().Declaration
Swift
@inlinable func getColumns() -> GLib.ListRef! -
getCursor(path:Extension methodfocusColumn: ) Fills in
pathandfocus_columnwith the current path and focus column. If the cursor isn’t currently set, then *pathwill benil. If no column currently has focus, then *focus_columnwill benil.The returned
GtkTreePathmust be freed withgtk_tree_path_free()when you are done with it.Declaration
Swift
@inlinable func getCursor(path: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>? = nil, focusColumn: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreeViewColumn>?>? = nil) -
getDestRowAtPos(dragX:Extension methoddragY: path: pos: ) Determines the destination row for a given position.
drag_xanddrag_yare expected to be in widget coordinates. This function is only meaningful iftree_viewis realized. Therefore this function will always returnfalseiftree_viewis not realized or does not have a model.Declaration
Swift
@inlinable func getDestRowAtPos(dragX: Int, dragY: Int, path: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>? = nil, pos: UnsafeMutablePointer<GtkTreeViewDropPosition>! = nil) -> Bool -
getDragDestRow(path:Extension methodpos: ) Gets information about the row that is highlighted for feedback.
Declaration
Swift
@inlinable func getDragDestRow(path: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>? = nil, pos: UnsafeMutablePointer<GtkTreeViewDropPosition>! = nil) -
getEnableSearch()Extension methodReturns whether or not the tree allows to start interactive searching by typing in text.
Declaration
Swift
@inlinable func getEnableSearch() -> Bool -
getEnableTreeLines()Extension methodReturns whether or not tree lines are drawn in
tree_view.Declaration
Swift
@inlinable func getEnableTreeLines() -> Bool -
getExpanderColumn()Extension methodReturns the column that is the current expander column, or
nilif none has been set. This column has the expander arrow drawn next to it.Declaration
Swift
@inlinable func getExpanderColumn() -> TreeViewColumnRef! -
getFixedHeightMode()Extension methodReturns whether fixed height mode is turned on for
tree_view.Declaration
Swift
@inlinable func getFixedHeightMode() -> Bool -
getGridLines()Extension methodReturns which grid lines are enabled in
tree_view.Declaration
Swift
@inlinable func getGridLines() -> GtkTreeViewGridLines -
getHeadersClickable()Extension methodReturns whether all header columns are clickable.
Declaration
Swift
@inlinable func getHeadersClickable() -> Bool -
getHeadersVisible()Extension methodReturns
trueif the headers on thetree_vieware visible.Declaration
Swift
@inlinable func getHeadersVisible() -> Bool -
getHoverExpand()Extension methodReturns whether hover expansion mode is turned on for
tree_view.Declaration
Swift
@inlinable func getHoverExpand() -> Bool -
getHoverSelection()Extension methodReturns whether hover selection mode is turned on for
tree_view.Declaration
Swift
@inlinable func getHoverSelection() -> Bool -
getLevelIndentation()Extension methodReturns the amount, in pixels, of extra indentation for child levels in
tree_view.Declaration
Swift
@inlinable func getLevelIndentation() -> Int -
getModel()Extension methodReturns the model the
GtkTreeViewis based on. Returnsnilif the model is unset.Declaration
Swift
@inlinable func getModel() -> TreeModelRef! -
getNColumns()Extension methodQueries the number of columns in the given
tree_view.Declaration
Swift
@inlinable func getNColumns() -> Int -
getPathAtPos(x:Extension methody: path: column: cellX: cellY: ) Finds the path at the point (
x,y), relative to bin_window coordinates. That is,xandyare relative to an events coordinates. Widget-relative coordinates must be converted usinggtk_tree_view_convert_widget_to_bin_window_coords(). It is primarily for things like popup menus. Ifpathis non-nil, then it will be filled with theGtkTreePathat that point. This path should be freed withgtk_tree_path_free(). Ifcolumnis non-nil, then it will be filled with the column at that point.cell_xandcell_yreturn the coordinates relative to the cell background (i.e. thebackground_areapassed togtk_cell_renderer_render()). This function is only meaningful iftree_viewis realized. Therefore this function will always returnfalseiftree_viewis not realized or does not have a model.For converting widget coordinates (eg. the ones you get from GtkWidget
query-tooltip), please seegtk_tree_view_convert_widget_to_bin_window_coords().Declaration
Swift
@inlinable func getPathAtPos(x: Int, y: Int, path: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>? = nil, column: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreeViewColumn>?>? = nil, cellX: UnsafeMutablePointer<gint>! = nil, cellY: UnsafeMutablePointer<gint>! = nil) -> Bool -
getReorderable()Extension methodRetrieves whether the user can reorder the tree via drag-and-drop. See
gtk_tree_view_set_reorderable().Declaration
Swift
@inlinable func getReorderable() -> Bool -
getRowSeparatorFunc()Extension methodReturns the current row separator function.
Declaration
Swift
@inlinable func getRowSeparatorFunc() -> GtkTreeViewRowSeparatorFunc! -
getRubberBanding()Extension methodReturns whether rubber banding is turned on for
tree_view. If the selection mode isGTK_SELECTION_MULTIPLE, rubber banding will allow the user to select multiple rows by dragging the mouse.Declaration
Swift
@inlinable func getRubberBanding() -> Bool -
getSearchColumn()Extension methodGets the column searched on by the interactive search code.
Declaration
Swift
@inlinable func getSearchColumn() -> Int -
getSearchEntry()Extension methodReturns the
GtkEntrywhich is currently in use as interactive search entry fortree_view. In case the built-in entry is being used,nilwill be returned.Declaration
Swift
@inlinable func getSearchEntry() -> EditableRef! -
getSearchEqualFunc()Extension methodReturns the compare function currently in use.
Declaration
Swift
@inlinable func getSearchEqualFunc() -> GtkTreeViewSearchEqualFunc! -
getSelection()Extension methodGets the
GtkTreeSelectionassociated withtree_view.Declaration
Swift
@inlinable func getSelection() -> TreeSelectionRef! -
getShowExpanders()Extension methodReturns whether or not expanders are drawn in
tree_view.Declaration
Swift
@inlinable func getShowExpanders() -> Bool -
getTooltipColumn()Extension methodReturns the column of
tree_view’s model which is being used for displaying tooltips ontree_view’s rows.Declaration
Swift
@inlinable func getTooltipColumn() -> Int -
getTooltipContext(x:Extension methody: keyboardTip: model: path: iter: ) This function is supposed to be used in a
query-tooltipsignal handler forGtkTreeView. Thex,yandkeyboard_tipvalues which are received in the signal handler, should be passed to this function without modification.The return value indicates whether there is a tree view row at the given coordinates (
true) or not (false) for mouse tooltips. For keyboard tooltips the row returned will be the cursor row. Whentrue, then any ofmodel,pathanditerwhich have been provided will be set to point to that row and the corresponding model.xandywill always be converted to be relative totree_view’s bin_window ifkeyboard_tooltipisfalse.Declaration
Swift
@inlinable func getTooltipContext(x: Int, y: Int, keyboardTip: Bool, model: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreeModel>?>? = nil, path: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>! = nil, iter: TreeIterRef? = nil) -> Bool -
getTooltipContext(x:Extension methody: keyboardTip: model: path: iter: ) This function is supposed to be used in a
query-tooltipsignal handler forGtkTreeView. Thex,yandkeyboard_tipvalues which are received in the signal handler, should be passed to this function without modification.The return value indicates whether there is a tree view row at the given coordinates (
true) or not (false) for mouse tooltips. For keyboard tooltips the row returned will be the cursor row. Whentrue, then any ofmodel,pathanditerwhich have been provided will be set to point to that row and the corresponding model.xandywill always be converted to be relative totree_view’s bin_window ifkeyboard_tooltipisfalse.Declaration
Swift
@inlinable func getTooltipContext<TreeIterT>(x: Int, y: Int, keyboardTip: Bool, model: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreeModel>?>? = nil, path: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>! = nil, iter: TreeIterT?) -> Bool where TreeIterT : TreeIterProtocol -
getVisibleRange(startPath:Extension methodendPath: ) Sets
start_pathandend_pathto be the first and last visible path. Note that there may be invisible paths in between.The paths should be freed with
gtk_tree_path_free()after use.Declaration
Swift
@inlinable func getVisibleRange(startPath: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>! = nil, endPath: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>! = nil) -> Bool -
get(visibleRect:Extension method) Fills
visible_rectwith the currently-visible region of the buffer, in tree coordinates. Convert to bin_window coordinates withgtk_tree_view_convert_tree_to_bin_window_coords(). Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire scrollable area of the tree.Declaration
Swift
@inlinable func get<RectangleT>(visibleRect: RectangleT) where RectangleT : RectangleProtocol -
insert(column:Extension methodposition: ) This inserts the
columninto thetree_viewatposition. Ifpositionis -1, then the column is inserted at the end. Iftree_viewhas “fixed_height” mode enabled, thencolumnmust have its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.Declaration
Swift
@inlinable func insert<TreeViewColumnT>(column: TreeViewColumnT, position: Int) -> Int where TreeViewColumnT : TreeViewColumnProtocol -
insertColumnWithDataFunc(position:Extension methodtitle: cell: func: data: dnotify: ) Convenience function that inserts a new column into the
GtkTreeViewwith the given cell renderer and aGtkTreeCellDataFuncto set cell renderer attributes (normally using data from the model). See alsogtk_tree_view_column_set_cell_data_func(),gtk_tree_view_column_pack_start(). Iftree_viewhas “fixed_height” mode enabled, then the new column will have its “sizing” property set to be GTK_TREE_VIEW_COLUMN_FIXED.Declaration
Swift
@inlinable func insertColumnWithDataFunc<CellRendererT>(position: Int, title: UnsafePointer<CChar>!, cell: CellRendererT, func: GtkTreeCellDataFunc?, data: gpointer! = nil, dnotify: GDestroyNotify?) -> Int where CellRendererT : CellRendererProtocol -
isBlankAtPos(x:Extension methody: path: column: cellX: cellY: ) Determine whether the point (
x,y) intree_viewis blank, that is no cell content nor an expander arrow is drawn at the location. If so, the location can be considered as the background. You might wish to take special action on clicks on the background, such as clearing a current selection, having a custom context menu or starting rubber banding.The
xandycoordinate that are provided must be relative to bin_window coordinates. Widget-relative coordinates must be converted usinggtk_tree_view_convert_widget_to_bin_window_coords().For converting widget coordinates (eg. the ones you get from GtkWidget
query-tooltip), please seegtk_tree_view_convert_widget_to_bin_window_coords().The
path,column,cell_xandcell_yarguments will be filled in likewise as forgtk_tree_view_get_path_at_pos(). Please seegtk_tree_view_get_path_at_pos()for more information.Declaration
Swift
@inlinable func isBlankAtPos(x: Int, y: Int, path: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>? = nil, column: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreeViewColumn>?>? = nil, cellX: UnsafeMutablePointer<gint>! = nil, cellY: UnsafeMutablePointer<gint>! = nil) -> Bool -
mapExpandedRows(func:Extension methoddata: ) Calls
funcon all expanded rows.Declaration
Swift
@inlinable func mapExpandedRows(func: GtkTreeViewMappingFunc?, data: gpointer! = nil) -
moveColumnAfter(column:Extension methodbaseColumn: ) Moves
columnto be after tobase_column. Ifbase_columnisnil, thencolumnis placed in the first position.Declaration
Swift
@inlinable func moveColumnAfter<TreeViewColumnT>(column: TreeViewColumnT, baseColumn: TreeViewColumnT?) where TreeViewColumnT : TreeViewColumnProtocol -
remove(column:Extension method) Removes
columnfromtree_view.Declaration
Swift
@inlinable func remove<TreeViewColumnT>(column: TreeViewColumnT) -> Int where TreeViewColumnT : TreeViewColumnProtocol -
rowActivated(path:Extension methodcolumn: ) Activates the cell determined by
pathandcolumn.Declaration
Swift
@inlinable func rowActivated<TreePathT>(path: TreePathT, column: TreeViewColumnRef? = nil) where TreePathT : TreePathProtocol -
rowActivated(path:Extension methodcolumn: ) Activates the cell determined by
pathandcolumn.Declaration
Swift
@inlinable func rowActivated<TreePathT, TreeViewColumnT>(path: TreePathT, column: TreeViewColumnT?) where TreePathT : TreePathProtocol, TreeViewColumnT : TreeViewColumnProtocol -
rowExpanded(path:Extension method) Returns
trueif the node pointed to bypathis expanded intree_view.Declaration
Swift
@inlinable func rowExpanded<TreePathT>(path: TreePathT) -> Bool where TreePathT : TreePathProtocol -
scrollToCell(path:Extension methodcolumn: useAlign: rowAlign: colAlign: ) Moves the alignments of
tree_viewto the position specified bycolumnandpath. Ifcolumnisnil, then no horizontal scrolling occurs. Likewise, ifpathisnilno vertical scrolling occurs. At a minimum, one ofcolumnorpathneed to be non-nil.row_aligndetermines where the row is placed, andcol_aligndetermines wherecolumnis placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.If
use_alignisfalse, then the alignment arguments are ignored, and the tree does the minimum amount of work to scroll the cell onto the screen. This means that the cell will be scrolled to the edge closest to its current position. If the cell is currently visible on the screen, nothing is done.This function only works if the model is set, and
pathis a valid row on the model. If the model changes before thetree_viewis realized, the centered path will be modified to reflect this change.Declaration
Swift
@inlinable func scrollToCell(path: TreePathRef? = nil, column: TreeViewColumnRef? = nil, useAlign: Bool, rowAlign: CFloat, colAlign: CFloat) -
scrollToCell(path:Extension methodcolumn: useAlign: rowAlign: colAlign: ) Moves the alignments of
tree_viewto the position specified bycolumnandpath. Ifcolumnisnil, then no horizontal scrolling occurs. Likewise, ifpathisnilno vertical scrolling occurs. At a minimum, one ofcolumnorpathneed to be non-nil.row_aligndetermines where the row is placed, andcol_aligndetermines wherecolumnis placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top alignment, 1.0 means right/bottom alignment, 0.5 means center.If
use_alignisfalse, then the alignment arguments are ignored, and the tree does the minimum amount of work to scroll the cell onto the screen. This means that the cell will be scrolled to the edge closest to its current position. If the cell is currently visible on the screen, nothing is done.This function only works if the model is set, and
pathis a valid row on the model. If the model changes before thetree_viewis realized, the centered path will be modified to reflect this change.Declaration
Swift
@inlinable func scrollToCell<TreePathT, TreeViewColumnT>(path: TreePathT?, column: TreeViewColumnT?, useAlign: Bool, rowAlign: CFloat, colAlign: CFloat) where TreePathT : TreePathProtocol, TreeViewColumnT : TreeViewColumnProtocol -
scrollToPoint(treeX:Extension methodtreeY: ) Scrolls the tree view such that the top-left corner of the visible area is
tree_x,tree_y, wheretree_xandtree_yare specified in tree coordinates. Thetree_viewmust be realized before this function is called. If it isn’t, you probably want to be usinggtk_tree_view_scroll_to_cell().If either
tree_xortree_yare -1, then that direction isn’t scrolled.Declaration
Swift
@inlinable func scrollToPoint(treeX: Int, treeY: Int) -
setActivateOnSingleClick(single:Extension method) Cause the
GtkTreeViewrow-activatedsignal to be emitted on a single click instead of a double click.Declaration
Swift
@inlinable func setActivateOnSingleClick(single: Bool) -
setColumnDragFunction(func:Extension methoduserData: destroy: ) Sets a user function for determining where a column may be dropped when dragged. This function is called on every column pair in turn at the beginning of a column drag to determine where a drop can take place. The arguments passed to
funcare: thetree_view, theGtkTreeViewColumnbeing dragged, the twoGtkTreeViewColumns determining the drop spot, anduser_data. If either of theGtkTreeViewColumnarguments for the drop spot arenil, then they indicate an edge. Iffuncis set to benil, thentree_viewreverts to the default behavior of allowing all columns to be dropped everywhere.Declaration
Swift
@inlinable func setColumnDragFunction(func: GtkTreeViewColumnDropFunc? = nil, userData: gpointer! = nil, destroy: GDestroyNotify? = nil) -
setCursor(path:Extension methodfocusColumn: startEditing: ) Sets the current keyboard focus to be at
path, and selects it. This is useful when you want to focus the user’s attention on a particular row. Iffocus_columnis notnil, then focus is given to the column specified by it. Additionally, iffocus_columnis specified, andstart_editingistrue, then editing should be started in the specified cell. This function is often followed bygtk_widget_grab_focus(tree_view) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.If
pathis invalid formodel, the current cursor (if any) will be unset and the function will return without failing.Declaration
Swift
@inlinable func setCursor<TreePathT>(path: TreePathT, focusColumn: TreeViewColumnRef? = nil, startEditing: Bool) where TreePathT : TreePathProtocol -
setCursor(path:Extension methodfocusColumn: startEditing: ) Sets the current keyboard focus to be at
path, and selects it. This is useful when you want to focus the user’s attention on a particular row. Iffocus_columnis notnil, then focus is given to the column specified by it. Additionally, iffocus_columnis specified, andstart_editingistrue, then editing should be started in the specified cell. This function is often followed bygtk_widget_grab_focus(tree_view) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.If
pathis invalid formodel, the current cursor (if any) will be unset and the function will return without failing.Declaration
Swift
@inlinable func setCursor<TreePathT, TreeViewColumnT>(path: TreePathT, focusColumn: TreeViewColumnT?, startEditing: Bool) where TreePathT : TreePathProtocol, TreeViewColumnT : TreeViewColumnProtocol -
setCursorOnCell(path:Extension methodfocusColumn: focusCell: startEditing: ) Sets the current keyboard focus to be at
path, and selects it. This is useful when you want to focus the user’s attention on a particular row. Iffocus_columnis notnil, then focus is given to the column specified by it. Iffocus_columnandfocus_cellare notnil, andfocus_columncontains 2 or more editable or activatable cells, then focus is given to the cell specified byfocus_cell. Additionally, iffocus_columnis specified, andstart_editingistrue, then editing should be started in the specified cell. This function is often followed bygtk_widget_grab_focus(tree_view) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.If
pathis invalid formodel, the current cursor (if any) will be unset and the function will return without failing.Declaration
Swift
@inlinable func setCursorOnCell<TreePathT>(path: TreePathT, focusColumn: TreeViewColumnRef? = nil, focusCell: CellRendererRef? = nil, startEditing: Bool) where TreePathT : TreePathProtocol -
setCursorOnCell(path:Extension methodfocusColumn: focusCell: startEditing: ) Sets the current keyboard focus to be at
path, and selects it. This is useful when you want to focus the user’s attention on a particular row. Iffocus_columnis notnil, then focus is given to the column specified by it. Iffocus_columnandfocus_cellare notnil, andfocus_columncontains 2 or more editable or activatable cells, then focus is given to the cell specified byfocus_cell. Additionally, iffocus_columnis specified, andstart_editingistrue, then editing should be started in the specified cell. This function is often followed bygtk_widget_grab_focus(tree_view) in order to give keyboard focus to the widget. Please note that editing can only happen when the widget is realized.If
pathis invalid formodel, the current cursor (if any) will be unset and the function will return without failing.Declaration
Swift
@inlinable func setCursorOnCell<CellRendererT, TreePathT, TreeViewColumnT>(path: TreePathT, focusColumn: TreeViewColumnT?, focusCell: CellRendererT?, startEditing: Bool) where CellRendererT : CellRendererProtocol, TreePathT : TreePathProtocol, TreeViewColumnT : TreeViewColumnProtocol -
setDragDestRow(path:Extension methodpos: ) Sets the row that is highlighted for feedback. If
pathisnil, an existing highlight is removed.Declaration
Swift
@inlinable func setDragDestRow(path: TreePathRef? = nil, pos: GtkTreeViewDropPosition) -
setDragDestRow(path:Extension methodpos: ) Sets the row that is highlighted for feedback. If
pathisnil, an existing highlight is removed.Declaration
Swift
@inlinable func setDragDestRow<TreePathT>(path: TreePathT?, pos: GtkTreeViewDropPosition) where TreePathT : TreePathProtocol -
set(enableSearch:Extension method) If
enable_searchis set, then the user can type in text to search through the tree interactively (this is sometimes called “typeahead find”).Note that even if this is
false, the user can still initiate a search using the “start-interactive-search” key binding.Declaration
Swift
@inlinable func set(enableSearch: Bool) -
setEnableTreeLines(enabled:Extension method) Sets whether to draw lines interconnecting the expanders in
tree_view. This does not have any visible effects for lists.Declaration
Swift
@inlinable func setEnableTreeLines(enabled: Bool) -
setExpander(column:Extension method) Sets the column to draw the expander arrow at. It must be in
tree_view. Ifcolumnisnil, then the expander arrow is always at the first visible column.If you do not want expander arrow to appear in your tree, set the expander column to a hidden column.
Declaration
Swift
@inlinable func setExpander(column: TreeViewColumnRef? = nil) -
setExpander(column:Extension method) Sets the column to draw the expander arrow at. It must be in
tree_view. Ifcolumnisnil, then the expander arrow is always at the first visible column.If you do not want expander arrow to appear in your tree, set the expander column to a hidden column.
Declaration
Swift
@inlinable func setExpander<TreeViewColumnT>(column: TreeViewColumnT?) where TreeViewColumnT : TreeViewColumnProtocol -
setFixedHeightMode(enable:Extension method) Enables or disables the fixed height mode of
tree_view. Fixed height mode speeds upGtkTreeViewby assuming that all rows have the same height. Only enable this option if all rows are the same height and all columns are of typeGTK_TREE_VIEW_COLUMN_FIXED.Declaration
Swift
@inlinable func setFixedHeightMode(enable: Bool) -
set(gridLines:Extension method) Sets which grid lines to draw in
tree_view.Declaration
Swift
@inlinable func set(gridLines: GtkTreeViewGridLines) -
setHeadersClickable(setting:Extension method) Allow the column title buttons to be clicked.
Declaration
Swift
@inlinable func setHeadersClickable(setting: Bool) -
set(headersVisible:Extension method) Sets the visibility state of the headers.
Declaration
Swift
@inlinable func set(headersVisible: Bool) -
setHover(expand:Extension method) Enables or disables the hover expansion mode of
tree_view. Hover expansion makes rows expand or collapse if the pointer moves over them.Declaration
Swift
@inlinable func setHover(expand: Bool) -
setHoverSelection(hover:Extension method) Enables or disables the hover selection mode of
tree_view. Hover selection makes the selected row follow the pointer. Currently, this works only for the selection modesGTK_SELECTION_SINGLEandGTK_SELECTION_BROWSE.Declaration
Swift
@inlinable func setHoverSelection(hover: Bool) -
setLevel(indentation:Extension method) Sets the amount of extra indentation for child levels to use in
tree_viewin addition to the default indentation. The value should be specified in pixels, a value of 0 disables this feature and in this case only the default indentation will be used. This does not have any visible effects for lists.Declaration
Swift
@inlinable func setLevel(indentation: Int) -
set(model:Extension method) Sets the model for a
GtkTreeView. If thetree_viewalready has a model set, it will remove it before setting the new model. Ifmodelisnil, then it will unset the old model.Declaration
Swift
@inlinable func set(model: TreeModelRef? = nil) -
set(model:Extension method) Sets the model for a
GtkTreeView. If thetree_viewalready has a model set, it will remove it before setting the new model. Ifmodelisnil, then it will unset the old model.Declaration
Swift
@inlinable func set<TreeModelT>(model: TreeModelT?) where TreeModelT : TreeModelProtocol -
set(reorderable:Extension method) This function is a convenience function to allow you to reorder models that support the
GtkTreeDragSourceIfaceand theGtkTreeDragDestIface. BothGtkTreeStoreandGtkListStoresupport these. Ifreorderableistrue, then the user can reorder the model by dragging and dropping rows. The developer can listen to these changes by connecting to the model’sGtkTreeModelrow-insertedand `GtkTreeModel`row-deletedsignals. The reordering is implemented by setting up the tree view as a drag source and destination. Therefore, drag and drop can not be used in a reorderable view for any other purpose.This function does not give you any degree of control over the order – any reordering is allowed. If more control is needed, you should probably handle drag and drop manually.
Declaration
Swift
@inlinable func set(reorderable: Bool) -
setRowSeparatorFunc(func:Extension methoddata: destroy: ) Sets the row separator function, which is used to determine whether a row should be drawn as a separator. If the row separator function is
nil, no separators are drawn. This is the default value.Declaration
Swift
@inlinable func setRowSeparatorFunc(func: GtkTreeViewRowSeparatorFunc? = nil, data: gpointer! = nil, destroy: GDestroyNotify? = nil) -
setRubberBanding(enable:Extension method) Enables or disables rubber banding in
tree_view. If the selection mode isGTK_SELECTION_MULTIPLE, rubber banding will allow the user to select multiple rows by dragging the mouse.Declaration
Swift
@inlinable func setRubberBanding(enable: Bool) -
setSearch(column:Extension method) Sets
columnas the column where the interactive search code should search in for the current model.If the search column is set, users can use the “start-interactive-search” key binding to bring up search popup. The enable-search property controls whether simply typing text will also start an interactive search.
Note that
columnrefers to a column of the current model. The search column is reset to -1 when the model is changed.Declaration
Swift
@inlinable func setSearch(column: Int) -
setSearch(entry:Extension method) Sets the entry which the interactive search code will use for this
tree_view. This is useful when you want to provide a search entry in our interface at all time at a fixed position. Passingnilforentrywill make the interactive search code use the built-in popup entry again.Declaration
Swift
@inlinable func setSearch(entry: EditableRef? = nil) -
setSearch(entry:Extension method) Sets the entry which the interactive search code will use for this
tree_view. This is useful when you want to provide a search entry in our interface at all time at a fixed position. Passingnilforentrywill make the interactive search code use the built-in popup entry again.Declaration
Swift
@inlinable func setSearch<EditableT>(entry: EditableT?) where EditableT : EditableProtocol -
set(searchEqualFunc:Extension methodsearchUserData: searchDestroy: ) Sets the compare function for the interactive search capabilities; note that somewhat like
strcmp()returning 0 for equalityGtkTreeViewSearchEqualFunc returnsfalseon matches.Declaration
Swift
@inlinable func set(searchEqualFunc: GtkTreeViewSearchEqualFunc?, searchUserData: gpointer! = nil, searchDestroy: GDestroyNotify? = nil) -
setShowExpanders(enabled:Extension method) Sets whether to draw and enable expanders and indent child rows in
tree_view. When disabled there will be no expanders visible in trees and there will be no way to expand and collapse rows by default. Also note that hiding the expanders will disable the default indentation. You can set a custom indentation in this case usinggtk_tree_view_set_level_indentation(). This does not have any visible effects for lists.Declaration
Swift
@inlinable func setShowExpanders(enabled: Bool) -
setTooltipCell(tooltip:Extension methodpath: column: cell: ) Sets the tip area of
tooltipto the areapath,columnandcellhave in common. For example ifpathisnilandcolumnis set, the tip area will be set to the full area covered bycolumn. See alsogtk_tooltip_set_tip_area().Note that if
pathis not specified andcellis set and part of a column containing the expander, the tooltip might not show and hide at the correct position. In such casespathmust be set to the current node under the mouse cursor for this function to operate correctly.See also
gtk_tree_view_set_tooltip_column()for a simpler alternative.Declaration
Swift
@inlinable func setTooltipCell<TooltipT>(tooltip: TooltipT, path: TreePathRef? = nil, column: TreeViewColumnRef? = nil, cell: CellRendererRef? = nil) where TooltipT : TooltipProtocol -
setTooltipCell(tooltip:Extension methodpath: column: cell: ) Sets the tip area of
tooltipto the areapath,columnandcellhave in common. For example ifpathisnilandcolumnis set, the tip area will be set to the full area covered bycolumn. See alsogtk_tooltip_set_tip_area().Note that if
pathis not specified andcellis set and part of a column containing the expander, the tooltip might not show and hide at the correct position. In such casespathmust be set to the current node under the mouse cursor for this function to operate correctly.See also
gtk_tree_view_set_tooltip_column()for a simpler alternative.Declaration
Swift
@inlinable func setTooltipCell<CellRendererT, TooltipT, TreePathT, TreeViewColumnT>(tooltip: TooltipT, path: TreePathT?, column: TreeViewColumnT?, cell: CellRendererT?) where CellRendererT : CellRendererProtocol, TooltipT : TooltipProtocol, TreePathT : TreePathProtocol, TreeViewColumnT : TreeViewColumnProtocol -
setTooltip(column:Extension method) If you only plan to have simple (text-only) tooltips on full rows, you can use this function to have
GtkTreeViewhandle these automatically for you.columnshould be set to the column intree_view’s model containing the tooltip texts, or -1 to disable this feature.When enabled,
GtkWidget:has-tooltipwill be set totrueandtree_viewwill connect aGtkWidgetquery-tooltip`` signal handler.Note that the signal handler sets the text with
gtk_tooltip_set_markup(), so &, <, etc have to be escaped in the text.Declaration
Swift
@inlinable func setTooltip(column: Int) -
setTooltipRow(tooltip:Extension methodpath: ) Sets the tip area of
tooltipto be the area covered by the row atpath. See alsogtk_tree_view_set_tooltip_column()for a simpler alternative. See alsogtk_tooltip_set_tip_area().Declaration
Swift
@inlinable func setTooltipRow<TooltipT, TreePathT>(tooltip: TooltipT, path: TreePathT) where TooltipT : TooltipProtocol, TreePathT : TreePathProtocol -
unsetRowsDragDest()Extension methodUndoes the effect of
gtk_tree_view_enable_model_drag_dest(). Calling this method setsGtkTreeView:reorderable tofalse.Declaration
Swift
@inlinable func unsetRowsDragDest() -
unsetRowsDragSource()Extension methodUndoes the effect of
gtk_tree_view_enable_model_drag_source(). Calling this method setsGtkTreeView:reorderable tofalse.Declaration
Swift
@inlinable func unsetRowsDragSource() -
activateOnSingleClickExtension methodGets the setting set by
gtk_tree_view_set_activate_on_single_click().Declaration
Swift
@inlinable var activateOnSingleClick: Bool { get nonmutating set } -
columnsExtension methodReturns a
GListof all theGtkTreeViewColumns currently intree_view. The returned list must be freed with g_list_free ().Declaration
Swift
@inlinable var columns: GLib.ListRef! { get } -
enableSearchExtension methodReturns whether or not the tree allows to start interactive searching by typing in text.
Declaration
Swift
@inlinable var enableSearch: Bool { get nonmutating set } -
enableTreeLinesExtension methodReturns whether or not tree lines are drawn in
tree_view.Declaration
Swift
@inlinable var enableTreeLines: Bool { get nonmutating set } -
expanderColumnExtension methodReturns the column that is the current expander column, or
nilif none has been set. This column has the expander arrow drawn next to it.Declaration
Swift
@inlinable var expanderColumn: TreeViewColumnRef! { get nonmutating set } -
fixedHeightModeExtension methodReturns whether fixed height mode is turned on for
tree_view.Declaration
Swift
@inlinable var fixedHeightMode: Bool { get nonmutating set } -
gridLinesExtension methodReturns which grid lines are enabled in
tree_view.Declaration
Swift
@inlinable var gridLines: GtkTreeViewGridLines { get nonmutating set } -
headersClickableExtension methodReturns whether all header columns are clickable.
Declaration
Swift
@inlinable var headersClickable: Bool { get nonmutating set } -
headersVisibleExtension methodReturns
trueif the headers on thetree_vieware visible.Declaration
Swift
@inlinable var headersVisible: Bool { get nonmutating set } -
hoverExpandExtension methodReturns whether hover expansion mode is turned on for
tree_view.Declaration
Swift
@inlinable var hoverExpand: Bool { get nonmutating set } -
hoverSelectionExtension methodReturns whether hover selection mode is turned on for
tree_view.Declaration
Swift
@inlinable var hoverSelection: Bool { get nonmutating set } -
isRubberBandingActiveExtension methodReturns whether a rubber banding operation is currently being done in
tree_view.Declaration
Swift
@inlinable var isRubberBandingActive: Bool { get } -
levelIndentationExtension methodReturns the amount, in pixels, of extra indentation for child levels in
tree_view.Declaration
Swift
@inlinable var levelIndentation: Int { get nonmutating set } -
modelExtension methodUndocumented
Declaration
Swift
@inlinable var model: TreeModelRef! { get nonmutating set } -
nColumnsExtension methodQueries the number of columns in the given
tree_view.Declaration
Swift
@inlinable var nColumns: Int { get } -
reorderableExtension methodUndocumented
Declaration
Swift
@inlinable var reorderable: Bool { get nonmutating set } -
rowSeparatorFuncExtension methodReturns the current row separator function.
Declaration
Swift
@inlinable var rowSeparatorFunc: GtkTreeViewRowSeparatorFunc! { get } -
rubberBandingExtension methodReturns whether rubber banding is turned on for
tree_view. If the selection mode isGTK_SELECTION_MULTIPLE, rubber banding will allow the user to select multiple rows by dragging the mouse.Declaration
Swift
@inlinable var rubberBanding: Bool { get nonmutating set } -
searchColumnExtension methodGets the column searched on by the interactive search code.
Declaration
Swift
@inlinable var searchColumn: Int { get nonmutating set } -
searchEntryExtension methodReturns the
GtkEntrywhich is currently in use as interactive search entry fortree_view. In case the built-in entry is being used,nilwill be returned.Declaration
Swift
@inlinable var searchEntry: EditableRef! { get nonmutating set } -
searchEqualFuncExtension methodReturns the compare function currently in use.
Declaration
Swift
@inlinable var searchEqualFunc: GtkTreeViewSearchEqualFunc! { get } -
selectionExtension methodGets the
GtkTreeSelectionassociated withtree_view.Declaration
Swift
@inlinable var selection: TreeSelectionRef! { get } -
showExpandersExtension methodReturns whether or not expanders are drawn in
tree_view.Declaration
Swift
@inlinable var showExpanders: Bool { get nonmutating set } -
tooltipColumnExtension methodReturns the column of
tree_view’s model which is being used for displaying tooltips ontree_view’s rows.Declaration
Swift
@inlinable var tooltipColumn: Int { get nonmutating set } -
parentInstanceExtension methodUndocumented
Declaration
Swift
@inlinable var parentInstance: GtkWidget { get }
View on GitHub
Install in Dash
TreeViewProtocol Protocol Reference