TreePathProtocol
public protocol TreePathProtocol
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.
-
Untyped pointer to the underlying
GtkTreePathinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
tree_path_ptrDefault implementationTyped pointer to the underlying
GtkTreePathinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkTreePathinstance.Declaration
Swift
var tree_path_ptr: UnsafeMutablePointer<GtkTreePath>! { get } -
Required Initialiser for types conforming to
TreePathProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
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
aappears beforebin a tree, then -1 is returned. Ifbappears beforea, 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 methodCreates a new
GtkTreePath-structas a copy ofpath.Declaration
Swift
@inlinable func copy() -> TreePathRef! -
down()Extension methodMoves
pathto point to the first child of the current path.Declaration
Swift
@inlinable func down() -
free()Extension methodFrees
path. Ifpathisnil, it simply returns.Declaration
Swift
@inlinable func free() -
getDepth()Extension methodReturns the current depth of
path.Declaration
Swift
@inlinable func getDepth() -> Int -
getIndices()Extension methodReturns 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<gint>! -
isAncestor(descendant:Extension method) Returns
trueifdescendantis a descendant ofpath.Declaration
Swift
@inlinable func isAncestor<TreePathT>(descendant: TreePathT) -> Bool where TreePathT : TreePathProtocol -
isDescendant(ancestor:Extension method) Returns
trueifpathis a descendant ofancestor.Declaration
Swift
@inlinable func isDescendant<TreePathT>(ancestor: TreePathT) -> Bool where TreePathT : TreePathProtocol -
next()Extension methodMoves the
pathto 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 methodMoves the
pathto point to the previous node at the current depth, if it exists.Declaration
Swift
@inlinable func prev() -> Bool -
toString()Extension methodGenerates 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.
Declaration
Swift
@inlinable func toString() -> String! -
up()Extension methodMoves the
pathto point to its parent node, if it has a parent.Declaration
Swift
@inlinable func up() -> Bool -
treeRowReferenceDeleted(proxy:Extension method) Lets a set of row reference created by
gtk_tree_row_reference_new_proxy()know that the model emitted theGtkTreeModel::row-deletedsignal.Declaration
Swift
@inlinable func treeRowReferenceDeleted<ObjectT>(proxy: ObjectT) where ObjectT : ObjectProtocol -
treeRowReferenceInserted(proxy:Extension method) Lets a set of row reference created by
gtk_tree_row_reference_new_proxy()know that the model emitted theGtkTreeModel::row-insertedsignal.Declaration
Swift
@inlinable func treeRowReferenceInserted<ObjectT>(proxy: ObjectT) where ObjectT : ObjectProtocol -
treeRowReferenceReordered(proxy:Extension methoditer: newOrder: ) Lets a set of row reference created by
gtk_tree_row_reference_new_proxy()know that the model emitted theGtkTreeModel::rows-reorderedsignal.Declaration
Swift
@inlinable func treeRowReferenceReordered<ObjectT, TreeIterT>(proxy: ObjectT, iter: TreeIterT, newOrder: UnsafeMutablePointer<gint>!) where ObjectT : ObjectProtocol, TreeIterT : TreeIterProtocol -
treeSetRowDragData(selectionData:Extension methodtreeModel: ) Sets selection data of target type
GTK_TREE_MODEL_ROW. Normally used in a drag_data_get handler.Declaration
Swift
@inlinable func treeSetRowDragData<SelectionDataT, TreeModelT>(selectionData: SelectionDataT, treeModel: TreeModelT) -> Bool where SelectionDataT : SelectionDataProtocol, TreeModelT : TreeModelProtocol -
depthExtension methodReturns the current depth of
path.Declaration
Swift
@inlinable var depth: Int { get } -
indicesExtension methodReturns 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 }
View on GitHub
Install in Dash
TreePathProtocol Protocol Reference