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.

  • ptr

    Untyped pointer to the underlying GtkTreeView instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • tree_view_ptr Default implementation

    Typed pointer to the underlying GtkTreeView instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GtkTreeView instance.

    Declaration

    Swift

    var tree_view_ptr: UnsafeMutablePointer<GtkTreeView>! { get }
  • Required Initialiser for types conforming to TreeViewProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

TreeView Class

  • Bind a TreeViewPropertyName source 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 : ObjectProtocol

    Parameters

    source_property

    the source property to bind

    target

    the target object to bind to

    target_property

    the target property to bind to

    flags

    the flags to pass to the Binding

    transform_from

    ValueTransformer to use for forward transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return Value

    binding reference or nil in case of an error

  • get(property:) Extension method

    Get the value of a TreeView property

    Declaration

    Swift

    @inlinable
    func get(property: TreeViewPropertyName) -> GLibObject.Value

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

  • set(property:value:) Extension method

    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

    property

    the property to get the value for

    Return Value

    the value of the named property

TreeView signals

  • Connect a Swift signal handler to the given, typed TreeViewSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: TreeViewSignalName, flags f: ConnectFlags = ConnectFlags(0), handler h: @escaping SignalHandler) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    handler

    The 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 a C signal handler to the given, typed TreeViewSignalName signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func connect(signal s: TreeViewSignalName, flags f: ConnectFlags = ConnectFlags(0), data userData: gpointer!, destroyData destructor: GClosureNotify? = nil, signalHandler h: @escaping GCallback) -> Int

    Parameters

    signal

    The signal to connect

    flags

    The connection flags to use

    data

    A pointer to user data to provide to the callback

    destroyData

    A GClosureNotify C function to destroy the data pointed to by userData

    signalHandler

    The C function to be called on the given signal

    Return Value

    The signal handler ID (always greater than 0 for successful connections)

  • The number of columns of the treeview has changed.

    Note

    This represents the underlying columns-changed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onColumnsChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the columnsChanged signal is emitted

  • columnsChangedSignal Extension method

    Typed columns-changed signal for using the connect(signal:) methods

    Declaration

    Swift

    static var columnsChangedSignal: TreeViewSignalName { get }
  • The position of the cursor (focused cell) has changed.

    Note

    This represents the underlying cursor-changed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onCursorChanged(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the cursorChanged signal is emitted

  • cursorChangedSignal Extension method

    Typed cursor-changed signal for using the connect(signal:) methods

    Declaration

    Swift

    static var cursorChangedSignal: TreeViewSignalName { get }
  • Note

    This represents the underlying expand-collapse-cursor-row signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onExpandCollapseCursorRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ object: Bool, _ p0: Bool, _ p1: Bool) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    object

    none

    p0

    none

    p1

    none

    handler

    The signal handler to call Run the given callback whenever the expandCollapseCursorRow signal is emitted

  • Typed expand-collapse-cursor-row signal for using the connect(signal:) methods

    Declaration

    Swift

    static var expandCollapseCursorRowSignal: TreeViewSignalName { get }
  • onMoveCursor(flags:handler:) Extension method

    The GtkTreeViewmove-cursor signal 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 to gtk_tree_view_set_cursor() and gtk_tree_view_set_cursor_on_cell() when moving horizontally GtkTreeViewmove-cursor does not reset the current selection.

    Note

    This represents the underlying move-cursor signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onMoveCursor(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ step: MovementStep, _ direction: Int, _ extend: Bool, _ modify: Bool) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    step

    the granularity of the move, as a GtkMovementStep. GTK_MOVEMENT_LOGICAL_POSITIONS, GTK_MOVEMENT_VISUAL_POSITIONS, GTK_MOVEMENT_DISPLAY_LINES, GTK_MOVEMENT_PAGES and GTK_MOVEMENT_BUFFER_ENDS are supported. GTK_MOVEMENT_LOGICAL_POSITIONS and GTK_MOVEMENT_VISUAL_POSITIONS are treated identically.

    direction

    the direction to move: +1 to move forwards; -1 to move backwards. The resulting movement is undefined for all other values.

    extend

    whether to extend the selection

    modify

    whether to modify the selection

    handler

    true if step is supported, false otherwise. Run the given callback whenever the moveCursor signal is emitted

  • moveCursorSignal Extension method

    Typed move-cursor signal for using the connect(signal:) methods

    Declaration

    Swift

    static var moveCursorSignal: TreeViewSignalName { get }
  • 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 [propertyGtk.TreeView:activate-on-single-click] property set to false, or when the user single-clicks a row when that property set to true.

    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 underlying row-activated signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onRowActivated(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ path: TreePathRef, _ column: TreeViewColumnRef?) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    path

    the GtkTreePath for the activated row

    column

    the GtkTreeViewColumn in which the activation occurred

    handler

    The signal handler to call Run the given callback whenever the rowActivated signal is emitted

  • rowActivatedSignal Extension method

    Typed row-activated signal for using the connect(signal:) methods

    Declaration

    Swift

    static var rowActivatedSignal: TreeViewSignalName { get }
  • The given row has been collapsed (child nodes are hidden).

    Note

    This represents the underlying row-collapsed signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onRowCollapsed(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ iter: TreeIterRef, _ path: TreePathRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    iter

    the tree iter of the collapsed row

    path

    a tree path that points to the row

    handler

    The signal handler to call Run the given callback whenever the rowCollapsed signal is emitted

  • rowCollapsedSignal Extension method

    Typed row-collapsed signal for using the connect(signal:) methods

    Declaration

    Swift

    static var rowCollapsedSignal: TreeViewSignalName { get }
  • The given row has been expanded (child nodes are shown).

    Note

    This represents the underlying row-expanded signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onRowExpanded(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ iter: TreeIterRef, _ path: TreePathRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    iter

    the tree iter of the expanded row

    path

    a tree path that points to the row

    handler

    The signal handler to call Run the given callback whenever the rowExpanded signal is emitted

  • rowExpandedSignal Extension method

    Typed row-expanded signal for using the connect(signal:) methods

    Declaration

    Swift

    static var rowExpandedSignal: TreeViewSignalName { get }
  • onSelectAll(flags:handler:) Extension method

    Note

    This represents the underlying select-all signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onSelectAll(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the selectAll signal is emitted

  • selectAllSignal Extension method

    Typed select-all signal for using the connect(signal:) methods

    Declaration

    Swift

    static var selectAllSignal: TreeViewSignalName { get }
  • Note

    This represents the underlying select-cursor-parent signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onSelectCursorParent(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the selectCursorParent signal is emitted

  • selectCursorParentSignal Extension method

    Typed select-cursor-parent signal for using the connect(signal:) methods

    Declaration

    Swift

    static var selectCursorParentSignal: TreeViewSignalName { get }
  • Note

    This represents the underlying select-cursor-row signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onSelectCursorRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ object: Bool) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    object

    none

    handler

    The signal handler to call Run the given callback whenever the selectCursorRow signal is emitted

  • selectCursorRowSignal Extension method

    Typed select-cursor-row signal for using the connect(signal:) methods

    Declaration

    Swift

    static var selectCursorRowSignal: TreeViewSignalName { get }
  • Note

    This represents the underlying start-interactive-search signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onStartInteractiveSearch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the startInteractiveSearch signal is emitted

  • startInteractiveSearchSignal Extension method

    Typed start-interactive-search signal for using the connect(signal:) methods

    Declaration

    Swift

    static var startInteractiveSearchSignal: TreeViewSignalName { get }
  • 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 underlying test-collapse-row signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onTestCollapseRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ iter: TreeIterRef, _ path: TreePathRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    iter

    the tree iter of the row to collapse

    path

    a tree path that points to the row

    handler

    false to allow collapsing, true to reject Run the given callback whenever the testCollapseRow signal is emitted

  • testCollapseRowSignal Extension method

    Typed test-collapse-row signal for using the connect(signal:) methods

    Declaration

    Swift

    static var testCollapseRowSignal: TreeViewSignalName { get }
  • 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 underlying test-expand-row signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onTestExpandRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ iter: TreeIterRef, _ path: TreePathRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    iter

    the tree iter of the row to expand

    path

    a tree path that points to the row

    handler

    false to allow expansion, true to reject Run the given callback whenever the testExpandRow signal is emitted

  • testExpandRowSignal Extension method

    Typed test-expand-row signal for using the connect(signal:) methods

    Declaration

    Swift

    static var testExpandRowSignal: TreeViewSignalName { get }
  • Note

    This represents the underlying toggle-cursor-row signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onToggleCursorRow(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the toggleCursorRow signal is emitted

  • toggleCursorRowSignal Extension method

    Typed toggle-cursor-row signal for using the connect(signal:) methods

    Declaration

    Swift

    static var toggleCursorRowSignal: TreeViewSignalName { get }
  • Note

    This represents the underlying unselect-all signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onUnselectAll(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef) -> Bool) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    handler

    The signal handler to call Run the given callback whenever the unselectAll signal is emitted

  • unselectAllSignal Extension method

    Typed unselect-all signal for using the connect(signal:) methods

    Declaration

    Swift

    static var unselectAllSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::activate-on-single-click signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyActivateOnSingleClick(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyActivateOnSingleClick signal is emitted

  • Typed notify::activate-on-single-click signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyActivateOnSingleClickSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::enable-grid-lines signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyEnableGridLines(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyEnableGridLines signal is emitted

  • notifyEnableGridLinesSignal Extension method

    Typed notify::enable-grid-lines signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyEnableGridLinesSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::enable-search signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyEnableSearch(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyEnableSearch signal is emitted

  • notifyEnableSearchSignal Extension method

    Typed notify::enable-search signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyEnableSearchSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::enable-tree-lines signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyEnableTreeLines(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyEnableTreeLines signal is emitted

  • notifyEnableTreeLinesSignal Extension method

    Typed notify::enable-tree-lines signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyEnableTreeLinesSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::expander-column signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyExpanderColumn(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyExpanderColumn signal is emitted

  • notifyExpanderColumnSignal Extension method

    Typed notify::expander-column signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyExpanderColumnSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::fixed-height-mode signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyFixedHeightMode(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyFixedHeightMode signal is emitted

  • notifyFixedHeightModeSignal Extension method

    Typed notify::fixed-height-mode signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyFixedHeightModeSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::headers-clickable signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyHeadersClickable(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyHeadersClickable signal is emitted

  • notifyHeadersClickableSignal Extension method

    Typed notify::headers-clickable signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyHeadersClickableSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::headers-visible signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyHeadersVisible(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyHeadersVisible signal is emitted

  • notifyHeadersVisibleSignal Extension method

    Typed notify::headers-visible signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyHeadersVisibleSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::hover-expand signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyHoverExpand(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyHoverExpand signal is emitted

  • notifyHoverExpandSignal Extension method

    Typed notify::hover-expand signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyHoverExpandSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::hover-selection signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyHoverSelection(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyHoverSelection signal is emitted

  • notifyHoverSelectionSignal Extension method

    Typed notify::hover-selection signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyHoverSelectionSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::level-indentation signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyLevelIndentation(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyLevelIndentation signal is emitted

  • notifyLevelIndentationSignal Extension method

    Typed notify::level-indentation signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyLevelIndentationSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::model signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyModel(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyModel signal is emitted

  • notifyModelSignal Extension method

    Typed notify::model signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyModelSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::reorderable signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyReorderable(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyReorderable signal is emitted

  • notifyReorderableSignal Extension method

    Typed notify::reorderable signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyReorderableSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::rubber-banding signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyRubberBanding(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyRubberBanding signal is emitted

  • notifyRubberBandingSignal Extension method

    Typed notify::rubber-banding signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyRubberBandingSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::search-column signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifySearchColumn(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifySearchColumn signal is emitted

  • notifySearchColumnSignal Extension method

    Typed notify::search-column signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifySearchColumnSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::show-expanders signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyShowExpanders(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyShowExpanders signal is emitted

  • notifyShowExpandersSignal Extension method

    Typed notify::show-expanders signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyShowExpandersSignal: TreeViewSignalName { get }
  • 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 to g_object_set_property() results in notify being emitted, even if the new value is the same as the old. If they did pass G_PARAM_EXPLICIT_NOTIFY, then this signal is emitted only when they explicitly call g_object_notify() or g_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 underlying notify::tooltip-column signal

    Declaration

    Swift

    @discardableResult
    @inlinable
    func onNotifyTooltipColumn(flags: ConnectFlags = ConnectFlags(0), handler: @escaping (_ unownedSelf: TreeViewRef, _ pspec: ParamSpecRef) -> Void) -> Int

    Parameters

    flags

    Flags

    unownedSelf

    Reference to instance of self

    pspec

    the GParamSpec of the property which changed.

    handler

    The signal handler to call Run the given callback whenever the notifyTooltipColumn signal is emitted

  • notifyTooltipColumnSignal Extension method

    Typed notify::tooltip-column signal for using the connect(signal:) methods

    Declaration

    Swift

    static var notifyTooltipColumnSignal: TreeViewSignalName { get }

TreeView Class: TreeViewProtocol extension (methods and fields)

  • append(column:) Extension method

    Appends column to the list of columns. If tree_view has “fixed_height” mode enabled, then column must 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 method

    Recursively 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 method

    Resizes all columns to their optimal width. Only works after the treeview has been realized.

    Declaration

    Swift

    @inlinable
    func columnsAutosize()
  • 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>!)
  • Converts bin_window coordinates to widget relative coordinates.

    Declaration

    Swift

    @inlinable
    func convertBinWindowToWidgetCoords(bx: Int, by: Int, wx: UnsafeMutablePointer<gint>!, wy: UnsafeMutablePointer<gint>!)
  • 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>!)
  • 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>!)
  • Converts widget coordinates to coordinates for the bin_window.

    Declaration

    Swift

    @inlinable
    func convertWidgetToBinWindowCoords(wx: Int, wy: Int, bx: UnsafeMutablePointer<gint>!, by: UnsafeMutablePointer<gint>!)
  • 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_t representation of the row at path. This image is used for a drag icon.

    Declaration

    Swift

    @inlinable
    func createRowDragIcon<TreePathT>(path: TreePathT) -> Gdk.PaintableRef! where TreePathT : TreePathProtocol
  • Turns tree_view into a drop destination for automatic DND. Calling this method sets GtkTreeView:reorderable to false.

    Declaration

    Swift

    @inlinable
    func enableModelDragDest<ContentFormatsT>(formats: ContentFormatsT, actions: Gdk.DragAction) where ContentFormatsT : ContentFormatsProtocol
  • Turns tree_view into a drag source for automatic DND. Calling this method sets GtkTreeView:reorderable to false.

    Declaration

    Swift

    @inlinable
    func enableModelDragSource<ContentFormatsT>(startButtonMask: Gdk.ModifierType, formats: ContentFormatsT, actions: Gdk.DragAction) where ContentFormatsT : ContentFormatsProtocol
  • expandAll() Extension method

    Recursively expands all nodes in the tree_view.

    Declaration

    Swift

    @inlinable
    func expandAll()
  • expandRow(path:openAll:) Extension method

    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 of path as necessary.

    Declaration

    Swift

    @inlinable
    func expandTo<TreePathT>(path: TreePathT) where TreePathT : TreePathProtocol
  • getActivateOnSingleClick() Extension method

    Gets the setting set by gtk_tree_view_set_activate_on_single_click().

    Declaration

    Swift

    @inlinable
    func getActivateOnSingleClick() -> Bool
  • Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a node not found in the tree, the y and height fields of the rectangle will be filled with 0. If column is nil, the x and width fields will be filled with 0. The returned rectangle is equivalent to the background_area passed to gtk_cell_renderer_render(). These background areas tile to cover the entire bin window. Contrast with the cell_area, returned by gtk_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
  • Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a node not found in the tree, the y and height fields of the rectangle will be filled with 0. If column is nil, the x and width fields will be filled with 0. The returned rectangle is equivalent to the background_area passed to gtk_cell_renderer_render(). These background areas tile to cover the entire bin window. Contrast with the cell_area, returned by gtk_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
  • Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a path not currently displayed, the y and height fields of the rectangle will be filled with 0. If column is nil, the x and width fields 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 the cell_area passed to gtk_cell_renderer_render(). This function is only valid if tree_view is realized.

    Declaration

    Swift

    @inlinable
    func getCellArea<RectangleT>(path: TreePathRef? = nil, column: TreeViewColumnRef? = nil, rect: RectangleT) where RectangleT : RectangleProtocol
  • Fills the bounding rectangle in bin_window coordinates for the cell at the row specified by path and the column specified by column. If path is nil, or points to a path not currently displayed, the y and height fields of the rectangle will be filled with 0. If column is nil, the x and width fields 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 the cell_area passed to gtk_cell_renderer_render(). This function is only valid if tree_view is 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 GtkTreeViewColumn at the given position in the tree_view.

    Declaration

    Swift

    @inlinable
    func getColumn(n: Int) -> TreeViewColumnRef!
  • getColumns() Extension method

    Returns a GList of all the GtkTreeViewColumns currently in tree_view. The returned list must be freed with g_list_free ().

    Declaration

    Swift

    @inlinable
    func getColumns() -> GLib.ListRef!
  • getCursor(path:focusColumn:) Extension method

    Fills in path and focus_column with the current path and focus column. If the cursor isn’t currently set, then *path will be nil. If no column currently has focus, then *focus_column will be nil.

    The returned GtkTreePath must be freed with gtk_tree_path_free() when you are done with it.

    Declaration

    Swift

    @inlinable
    func getCursor(path: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreePath>?>? = nil, focusColumn: UnsafeMutablePointer<UnsafeMutablePointer<GtkTreeViewColumn>?>? = nil)
  • Determines the destination row for a given position. drag_x and drag_y are expected to be in widget coordinates. This function is only meaningful if tree_view is realized. Therefore this function will always return false if tree_view is 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:pos:) Extension method

    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 method

    Returns whether or not the tree allows to start interactive searching by typing in text.

    Declaration

    Swift

    @inlinable
    func getEnableSearch() -> Bool
  • getEnableTreeLines() Extension method

    Returns whether or not tree lines are drawn in tree_view.

    Declaration

    Swift

    @inlinable
    func getEnableTreeLines() -> Bool
  • getExpanderColumn() Extension method

    Returns the column that is the current expander column, or nil if none has been set. This column has the expander arrow drawn next to it.

    Declaration

    Swift

    @inlinable
    func getExpanderColumn() -> TreeViewColumnRef!
  • getFixedHeightMode() Extension method

    Returns whether fixed height mode is turned on for tree_view.

    Declaration

    Swift

    @inlinable
    func getFixedHeightMode() -> Bool
  • getGridLines() Extension method

    Returns which grid lines are enabled in tree_view.

    Declaration

    Swift

    @inlinable
    func getGridLines() -> GtkTreeViewGridLines
  • getHeadersClickable() Extension method

    Returns whether all header columns are clickable.

    Declaration

    Swift

    @inlinable
    func getHeadersClickable() -> Bool
  • getHeadersVisible() Extension method

    Returns true if the headers on the tree_view are visible.

    Declaration

    Swift

    @inlinable
    func getHeadersVisible() -> Bool
  • getHoverExpand() Extension method

    Returns whether hover expansion mode is turned on for tree_view.

    Declaration

    Swift

    @inlinable
    func getHoverExpand() -> Bool
  • getHoverSelection() Extension method

    Returns whether hover selection mode is turned on for tree_view.

    Declaration

    Swift

    @inlinable
    func getHoverSelection() -> Bool
  • getLevelIndentation() Extension method

    Returns the amount, in pixels, of extra indentation for child levels in tree_view.

    Declaration

    Swift

    @inlinable
    func getLevelIndentation() -> Int
  • getModel() Extension method

    Returns the model the GtkTreeView is based on. Returns nil if the model is unset.

    Declaration

    Swift

    @inlinable
    func getModel() -> TreeModelRef!
  • getNColumns() Extension method

    Queries the number of columns in the given tree_view.

    Declaration

    Swift

    @inlinable
    func getNColumns() -> Int
  • Finds the path at the point (x, y), relative to bin_window coordinates. That is, x and y are relative to an events coordinates. Widget-relative coordinates must be converted using gtk_tree_view_convert_widget_to_bin_window_coords(). It is primarily for things like popup menus. If path is non-nil, then it will be filled with the GtkTreePath at that point. This path should be freed with gtk_tree_path_free(). If column is non-nil, then it will be filled with the column at that point. cell_x and cell_y return the coordinates relative to the cell background (i.e. the background_area passed to gtk_cell_renderer_render()). This function is only meaningful if tree_view is realized. Therefore this function will always return false if tree_view is not realized or does not have a model.

    For converting widget coordinates (eg. the ones you get from GtkWidgetquery-tooltip), please see gtk_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 method

    Retrieves 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 method

    Returns the current row separator function.

    Declaration

    Swift

    @inlinable
    func getRowSeparatorFunc() -> GtkTreeViewRowSeparatorFunc!
  • getRubberBanding() Extension method

    Returns whether rubber banding is turned on for tree_view. If the selection mode is GTK_SELECTION_MULTIPLE, rubber banding will allow the user to select multiple rows by dragging the mouse.

    Declaration

    Swift

    @inlinable
    func getRubberBanding() -> Bool
  • getSearchColumn() Extension method

    Gets the column searched on by the interactive search code.

    Declaration

    Swift

    @inlinable
    func getSearchColumn() -> Int
  • getSearchEntry() Extension method

    Returns the GtkEntry which is currently in use as interactive search entry for tree_view. In case the built-in entry is being used, nil will be returned.

    Declaration

    Swift

    @inlinable
    func getSearchEntry() -> EditableRef!
  • getSearchEqualFunc() Extension method

    Returns the compare function currently in use.

    Declaration

    Swift

    @inlinable
    func getSearchEqualFunc() -> GtkTreeViewSearchEqualFunc!
  • getSelection() Extension method

    Gets the GtkTreeSelection associated with tree_view.

    Declaration

    Swift

    @inlinable
    func getSelection() -> TreeSelectionRef!
  • getShowExpanders() Extension method

    Returns whether or not expanders are drawn in tree_view.

    Declaration

    Swift

    @inlinable
    func getShowExpanders() -> Bool
  • getTooltipColumn() Extension method

    Returns the column of tree_view’s model which is being used for displaying tooltips on tree_view’s rows.

    Declaration

    Swift

    @inlinable
    func getTooltipColumn() -> Int
  • This function is supposed to be used in a query-tooltip signal handler for GtkTreeView. The x, y and keyboard_tip values 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. When true, then any of model, path and iter which have been provided will be set to point to that row and the corresponding model. x and y will always be converted to be relative to tree_view’s bin_window if keyboard_tooltip is false.

    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
  • This function is supposed to be used in a query-tooltip signal handler for GtkTreeView. The x, y and keyboard_tip values 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. When true, then any of model, path and iter which have been provided will be set to point to that row and the corresponding model. x and y will always be converted to be relative to tree_view’s bin_window if keyboard_tooltip is false.

    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
  • Sets start_path and end_path to 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_rect with the currently-visible region of the buffer, in tree coordinates. Convert to bin_window coordinates with gtk_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:position:) Extension method

    This inserts the column into the tree_view at position. If position is -1, then the column is inserted at the end. If tree_view has “fixed_height” mode enabled, then column must 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
  • Convenience function that inserts a new column into the GtkTreeView with the given cell renderer and a GtkTreeCellDataFunc to set cell renderer attributes (normally using data from the model). See also gtk_tree_view_column_set_cell_data_func(), gtk_tree_view_column_pack_start(). If tree_view has “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
  • Determine whether the point (x, y) in tree_view is 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 x and y coordinate that are provided must be relative to bin_window coordinates. Widget-relative coordinates must be converted using gtk_tree_view_convert_widget_to_bin_window_coords().

    For converting widget coordinates (eg. the ones you get from GtkWidgetquery-tooltip), please see gtk_tree_view_convert_widget_to_bin_window_coords().

    The path, column, cell_x and cell_y arguments will be filled in likewise as for gtk_tree_view_get_path_at_pos(). Please see gtk_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:data:) Extension method

    Calls func on all expanded rows.

    Declaration

    Swift

    @inlinable
    func mapExpandedRows(func: GtkTreeViewMappingFunc?, data: gpointer! = nil)
  • Moves column to be after to base_column. If base_column is nil, then column is placed in the first position.

    Declaration

    Swift

    @inlinable
    func moveColumnAfter<TreeViewColumnT>(column: TreeViewColumnT, baseColumn: TreeViewColumnT?) where TreeViewColumnT : TreeViewColumnProtocol
  • remove(column:) Extension method

    Removes column from tree_view.

    Declaration

    Swift

    @inlinable
    func remove<TreeViewColumnT>(column: TreeViewColumnT) -> Int where TreeViewColumnT : TreeViewColumnProtocol
  • rowActivated(path:column:) Extension method

    Activates the cell determined by path and column.

    Declaration

    Swift

    @inlinable
    func rowActivated<TreePathT>(path: TreePathT, column: TreeViewColumnRef? = nil) where TreePathT : TreePathProtocol
  • rowActivated(path:column:) Extension method

    Activates the cell determined by path and column.

    Declaration

    Swift

    @inlinable
    func rowActivated<TreePathT, TreeViewColumnT>(path: TreePathT, column: TreeViewColumnT?) where TreePathT : TreePathProtocol, TreeViewColumnT : TreeViewColumnProtocol
  • rowExpanded(path:) Extension method

    Returns true if the node pointed to by path is expanded in tree_view.

    Declaration

    Swift

    @inlinable
    func rowExpanded<TreePathT>(path: TreePathT) -> Bool where TreePathT : TreePathProtocol
  • Moves the alignments of tree_view to the position specified by column and path. If column is nil, then no horizontal scrolling occurs. Likewise, if path is nil no vertical scrolling occurs. At a minimum, one of column or path need to be non-nil. row_align determines where the row is placed, and col_align determines where column is 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_align is false, 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 path is a valid row on the model. If the model changes before the tree_view is 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)
  • Moves the alignments of tree_view to the position specified by column and path. If column is nil, then no horizontal scrolling occurs. Likewise, if path is nil no vertical scrolling occurs. At a minimum, one of column or path need to be non-nil. row_align determines where the row is placed, and col_align determines where column is 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_align is false, 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 path is a valid row on the model. If the model changes before the tree_view is 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:treeY:) Extension method

    Scrolls the tree view such that the top-left corner of the visible area is tree_x, tree_y, where tree_x and tree_y are specified in tree coordinates. The tree_view must be realized before this function is called. If it isn’t, you probably want to be using gtk_tree_view_scroll_to_cell().

    If either tree_x or tree_y are -1, then that direction isn’t scrolled.

    Declaration

    Swift

    @inlinable
    func scrollToPoint(treeX: Int, treeY: Int)
  • Cause the GtkTreeViewrow-activated signal to be emitted on a single click instead of a double click.

    Declaration

    Swift

    @inlinable
    func setActivateOnSingleClick(single: Bool)
  • 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 func are: the tree_view, the GtkTreeViewColumn being dragged, the two GtkTreeViewColumns determining the drop spot, and user_data. If either of the GtkTreeViewColumn arguments for the drop spot are nil, then they indicate an edge. If func is set to be nil, then tree_view reverts 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)
  • 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. If focus_column is not nil, then focus is given to the column specified by it. Additionally, if focus_column is specified, and start_editing is true, then editing should be started in the specified cell. This function is often followed by gtk_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 path is invalid for model, 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
  • 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. If focus_column is not nil, then focus is given to the column specified by it. Additionally, if focus_column is specified, and start_editing is true, then editing should be started in the specified cell. This function is often followed by gtk_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 path is invalid for model, 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
  • 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. If focus_column is not nil, then focus is given to the column specified by it. If focus_column and focus_cell are not nil, and focus_column contains 2 or more editable or activatable cells, then focus is given to the cell specified by focus_cell. Additionally, if focus_column is specified, and start_editing is true, then editing should be started in the specified cell. This function is often followed by gtk_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 path is invalid for model, 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
  • 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. If focus_column is not nil, then focus is given to the column specified by it. If focus_column and focus_cell are not nil, and focus_column contains 2 or more editable or activatable cells, then focus is given to the cell specified by focus_cell. Additionally, if focus_column is specified, and start_editing is true, then editing should be started in the specified cell. This function is often followed by gtk_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 path is invalid for model, 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:pos:) Extension method

    Sets the row that is highlighted for feedback. If path is nil, an existing highlight is removed.

    Declaration

    Swift

    @inlinable
    func setDragDestRow(path: TreePathRef? = nil, pos: GtkTreeViewDropPosition)
  • setDragDestRow(path:pos:) Extension method

    Sets the row that is highlighted for feedback. If path is nil, an existing highlight is removed.

    Declaration

    Swift

    @inlinable
    func setDragDestRow<TreePathT>(path: TreePathT?, pos: GtkTreeViewDropPosition) where TreePathT : TreePathProtocol
  • set(enableSearch:) Extension method

    If enable_search is 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. If column is nil, 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. If column is nil, 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 up GtkTreeView by assuming that all rows have the same height. Only enable this option if all rows are the same height and all columns are of type GTK_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)
  • 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 modes GTK_SELECTION_SINGLE and GTK_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_view in 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 the tree_view already has a model set, it will remove it before setting the new model. If model is nil, 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 the tree_view already has a model set, it will remove it before setting the new model. If model is nil, 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 GtkTreeDragSourceIface and the GtkTreeDragDestIface. Both GtkTreeStore and GtkListStore support these. If reorderable is true, then the user can reorder the model by dragging and dropping rows. The developer can listen to these changes by connecting to the model’s GtkTreeModelrow-inserted and `GtkTreeModel`row-deleted signals. 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)
  • 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 is GTK_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 column as 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 column refers 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. Passing nil for entry will 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. Passing nil for entry will make the interactive search code use the built-in popup entry again.

    Declaration

    Swift

    @inlinable
    func setSearch<EditableT>(entry: EditableT?) where EditableT : EditableProtocol
  • Sets the compare function for the interactive search capabilities; note that somewhat like strcmp() returning 0 for equality GtkTreeViewSearchEqualFunc returns false on 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 using gtk_tree_view_set_level_indentation(). This does not have any visible effects for lists.

    Declaration

    Swift

    @inlinable
    func setShowExpanders(enabled: Bool)
  • Sets the tip area of tooltip to the area path, column and cell have in common. For example if path is nil and column is set, the tip area will be set to the full area covered by column. See also gtk_tooltip_set_tip_area().

    Note that if path is not specified and cell is set and part of a column containing the expander, the tooltip might not show and hide at the correct position. In such cases path must 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
  • Sets the tip area of tooltip to the area path, column and cell have in common. For example if path is nil and column is set, the tip area will be set to the full area covered by column. See also gtk_tooltip_set_tip_area().

    Note that if path is not specified and cell is set and part of a column containing the expander, the tooltip might not show and hide at the correct position. In such cases path must 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 GtkTreeView handle these automatically for you. column should be set to the column in tree_view’s model containing the tooltip texts, or -1 to disable this feature.

    When enabled, GtkWidget:has-tooltip will be set to true and tree_view will connect a GtkWidgetquery-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:path:) Extension method

    Sets the tip area of tooltip to be the area covered by the row at path. See also gtk_tree_view_set_tooltip_column() for a simpler alternative. See also gtk_tooltip_set_tip_area().

    Declaration

    Swift

    @inlinable
    func setTooltipRow<TooltipT, TreePathT>(tooltip: TooltipT, path: TreePathT) where TooltipT : TooltipProtocol, TreePathT : TreePathProtocol
  • unsetRowsDragDest() Extension method

    Undoes the effect of gtk_tree_view_enable_model_drag_dest(). Calling this method sets GtkTreeView:reorderable to false.

    Declaration

    Swift

    @inlinable
    func unsetRowsDragDest()
  • unsetRowsDragSource() Extension method

    Undoes the effect of gtk_tree_view_enable_model_drag_source(). Calling this method sets GtkTreeView:reorderable to false.

    Declaration

    Swift

    @inlinable
    func unsetRowsDragSource()
  • activateOnSingleClick Extension method

    Gets the setting set by gtk_tree_view_set_activate_on_single_click().

    Declaration

    Swift

    @inlinable
    var activateOnSingleClick: Bool { get nonmutating set }
  • columns Extension method

    Returns a GList of all the GtkTreeViewColumns currently in tree_view. The returned list must be freed with g_list_free ().

    Declaration

    Swift

    @inlinable
    var columns: GLib.ListRef! { get }
  • enableSearch Extension method

    Returns whether or not the tree allows to start interactive searching by typing in text.

    Declaration

    Swift

    @inlinable
    var enableSearch: Bool { get nonmutating set }
  • enableTreeLines Extension method

    Returns whether or not tree lines are drawn in tree_view.

    Declaration

    Swift

    @inlinable
    var enableTreeLines: Bool { get nonmutating set }
  • expanderColumn Extension method

    Returns the column that is the current expander column, or nil if none has been set. This column has the expander arrow drawn next to it.

    Declaration

    Swift

    @inlinable
    var expanderColumn: TreeViewColumnRef! { get nonmutating set }
  • fixedHeightMode Extension method

    Returns whether fixed height mode is turned on for tree_view.

    Declaration

    Swift

    @inlinable
    var fixedHeightMode: Bool { get nonmutating set }
  • gridLines Extension method

    Returns which grid lines are enabled in tree_view.

    Declaration

    Swift

    @inlinable
    var gridLines: GtkTreeViewGridLines { get nonmutating set }
  • headersClickable Extension method

    Returns whether all header columns are clickable.

    Declaration

    Swift

    @inlinable
    var headersClickable: Bool { get nonmutating set }
  • headersVisible Extension method

    Returns true if the headers on the tree_view are visible.

    Declaration

    Swift

    @inlinable
    var headersVisible: Bool { get nonmutating set }
  • hoverExpand Extension method

    Returns whether hover expansion mode is turned on for tree_view.

    Declaration

    Swift

    @inlinable
    var hoverExpand: Bool { get nonmutating set }
  • hoverSelection Extension method

    Returns whether hover selection mode is turned on for tree_view.

    Declaration

    Swift

    @inlinable
    var hoverSelection: Bool { get nonmutating set }
  • isRubberBandingActive Extension method

    Returns whether a rubber banding operation is currently being done in tree_view.

    Declaration

    Swift

    @inlinable
    var isRubberBandingActive: Bool { get }
  • levelIndentation Extension method

    Returns the amount, in pixels, of extra indentation for child levels in tree_view.

    Declaration

    Swift

    @inlinable
    var levelIndentation: Int { get nonmutating set }
  • model Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var model: TreeModelRef! { get nonmutating set }
  • nColumns Extension method

    Queries the number of columns in the given tree_view.

    Declaration

    Swift

    @inlinable
    var nColumns: Int { get }
  • reorderable Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var reorderable: Bool { get nonmutating set }
  • rowSeparatorFunc Extension method

    Returns the current row separator function.

    Declaration

    Swift

    @inlinable
    var rowSeparatorFunc: GtkTreeViewRowSeparatorFunc! { get }
  • rubberBanding Extension method

    Returns whether rubber banding is turned on for tree_view. If the selection mode is GTK_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 }
  • searchColumn Extension method

    Gets the column searched on by the interactive search code.

    Declaration

    Swift

    @inlinable
    var searchColumn: Int { get nonmutating set }
  • searchEntry Extension method

    Returns the GtkEntry which is currently in use as interactive search entry for tree_view. In case the built-in entry is being used, nil will be returned.

    Declaration

    Swift

    @inlinable
    var searchEntry: EditableRef! { get nonmutating set }
  • searchEqualFunc Extension method

    Returns the compare function currently in use.

    Declaration

    Swift

    @inlinable
    var searchEqualFunc: GtkTreeViewSearchEqualFunc! { get }
  • selection Extension method

    Gets the GtkTreeSelection associated with tree_view.

    Declaration

    Swift

    @inlinable
    var selection: TreeSelectionRef! { get }
  • showExpanders Extension method

    Returns whether or not expanders are drawn in tree_view.

    Declaration

    Swift

    @inlinable
    var showExpanders: Bool { get nonmutating set }
  • tooltipColumn Extension method

    Returns the column of tree_view’s model which is being used for displaying tooltips on tree_view’s rows.

    Declaration

    Swift

    @inlinable
    var tooltipColumn: Int { get nonmutating set }
  • parentInstance Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parentInstance: GtkWidget { get }