TreePathProtocol

public protocol TreePathProtocol

An opaque structure representing a path to a row in a model.

The TreePathProtocol protocol exposes the methods and properties of an underlying GtkTreePath 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 TreePath. Alternatively, use TreePathRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying GtkTreePath instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GtkTreePath instance.

    Default Implementation

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

    Declaration

    Swift

    var tree_path_ptr: UnsafeMutablePointer<GtkTreePath>! { get }
  • Required Initialiser for types conforming to TreePathProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

TreePath Record: TreePathProtocol extension (methods and fields)

  • append(index:) Extension method

    Appends a new index to a path.

    As a result, the depth of the path is increased.

    Declaration

    Swift

    @inlinable
    func append(index: Int)
  • compare(b:) Extension method

    Compares two paths.

    If a appears before b in a tree, then -1 is returned. If b appears before a, then 1 is returned. If the two nodes are equal, then 0 is returned.

    Declaration

    Swift

    @inlinable
    func compare<TreePathT>(b: TreePathT) -> Int where TreePathT : TreePathProtocol
  • copy() Extension method

    Creates a new GtkTreePath as a copy of path.

    Declaration

    Swift

    @inlinable
    func copy() -> TreePathRef!
  • down() Extension method

    Moves path to point to the first child of the current path.

    Declaration

    Swift

    @inlinable
    func down()
  • free() Extension method

    Frees path. If path is nil, it simply returns.

    Declaration

    Swift

    @inlinable
    func free()
  • getDepth() Extension method

    Returns the current depth of path.

    Declaration

    Swift

    @inlinable
    func getDepth() -> Int
  • getIndices() Extension method

    Returns the current indices of path.

    This is an array of integers, each representing a node in a tree. This value should not be freed.

    The length of the array can be obtained with gtk_tree_path_get_depth().

    Declaration

    Swift

    @inlinable
    func getIndices() -> UnsafeMutablePointer<gint>?
  • getIndicesWith(depth:) Extension method

    Returns the current indices of path.

    This is an array of integers, each representing a node in a tree. It also returns the number of elements in the array. The array should not be freed.

    Declaration

    Swift

    @inlinable
    func getIndicesWith(depth: UnsafeMutablePointer<gint>! = nil) -> UnsafeMutablePointer<CInt>!
  • isAncestor(descendant:) Extension method

    Returns true if descendant is a descendant of path.

    Declaration

    Swift

    @inlinable
    func isAncestor<TreePathT>(descendant: TreePathT) -> Bool where TreePathT : TreePathProtocol
  • isDescendant(ancestor:) Extension method

    Returns true if path is a descendant of ancestor.

    Declaration

    Swift

    @inlinable
    func isDescendant<TreePathT>(ancestor: TreePathT) -> Bool where TreePathT : TreePathProtocol
  • next() Extension method

    Moves the path to point to the next node at the current depth.

    Declaration

    Swift

    @inlinable
    func next()
  • prepend(index:) Extension method

    Prepends a new index to a path.

    As a result, the depth of the path is increased.

    Declaration

    Swift

    @inlinable
    func prepend(index: Int)
  • prev() Extension method

    Moves the path to point to the previous node at the current depth, if it exists.

    Declaration

    Swift

    @inlinable
    func prev() -> Bool
  • toString() Extension method

    Generates a string representation of the path.

    This string is a “:” separated list of numbers. For example, “4:10:0:3” would be an acceptable return value for this string. If the path has depth 0, nil is returned.

    Declaration

    Swift

    @inlinable
    func toString() -> String!
  • up() Extension method

    Moves the path to point to its parent node, if it has a parent.

    Declaration

    Swift

    @inlinable
    func up() -> Bool
  • Creates a content provider for dragging path from tree_model.

    Declaration

    Swift

    @inlinable
    func treeCreateRowDragContent<TreeModelT>(treeModel: TreeModelT) -> Gdk.ContentProviderRef! where TreeModelT : TreeModelProtocol
  • Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the row-deleted signal.

    Declaration

    Swift

    @inlinable
    func treeRowReferenceDeleted<ObjectT>(proxy: ObjectT) where ObjectT : ObjectProtocol
  • Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the row-inserted signal.

    Declaration

    Swift

    @inlinable
    func treeRowReferenceInserted<ObjectT>(proxy: ObjectT) where ObjectT : ObjectProtocol
  • Lets a set of row reference created by gtk_tree_row_reference_new_proxy() know that the model emitted the rows-reordered signal.

    Declaration

    Swift

    @inlinable
    func treeRowReferenceReordered<ObjectT, TreeIterT>(proxy: ObjectT, iter: TreeIterT, newOrder: UnsafeMutablePointer<CInt>!) where ObjectT : ObjectProtocol, TreeIterT : TreeIterProtocol
  • depth Extension method

    Returns the current depth of path.

    Declaration

    Swift

    @inlinable
    var depth: Int { get }
  • indices Extension method

    Returns the current indices of path.

    This is an array of integers, each representing a node in a tree. This value should not be freed.

    The length of the array can be obtained with gtk_tree_path_get_depth().

    Declaration

    Swift

    @inlinable
    var indices: UnsafeMutablePointer<gint>? { get }