TreeStore
open class TreeStore : GLibObject.Object, TreeStoreProtocol
A tree-like data structure that can be used with the GtkTreeView
The GtkTreeStore object is a list model for use with a GtkTreeView
widget. It implements the GtkTreeModel interface, and consequently,
can use all of the methods available there. It also implements the
GtkTreeSortable interface so it can be sorted by the view. Finally,
it also implements the tree
drag and drop
interfaces.
GtkTreeStore as GtkBuildable
The GtkTreeStore implementation of the GtkBuildable interface allows
to specify the model columns with a <columns> element that may contain
multiple <column> elements, each specifying one model column. The “type”
attribute specifies the data type for the column.
An example of a UI Definition fragment for a tree store:
<object class="GtkTreeStore">
<columns>
<column type="gchararray"/>
<column type="gchararray"/>
<column type="gint"/>
</columns>
</object>
The TreeStore type acts as a reference-counted owner of an underlying GtkTreeStore instance.
It provides the methods that can operate on this data type through TreeStoreProtocol conformance.
Use TreeStore as a strong reference or owner of a GtkTreeStore instance.
-
Designated initialiser from the underlying `C` data type.This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the
TreeStoreinstance.Declaration
Swift
@inlinable public init(_ op: UnsafeMutablePointer<GtkTreeStore>)Parameters
oppointer to the underlying object
-
Designated initialiser from a constant pointer to the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theTreeStoreinstance.Declaration
Swift
@inlinable public init(_ op: UnsafePointer<GtkTreeStore>)Parameters
oppointer to the underlying object
-
Optional initialiser from a non-mutating
gpointerto the underlyingCdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theTreeStoreinstance.Declaration
Swift
@inlinable override public init!(gpointer op: gpointer?)Parameters
opgpointer to the underlying object
-
Optional initialiser from a non-mutating
gconstpointerto the underlyingCdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theTreeStoreinstance.Declaration
Swift
@inlinable override public init!(gconstpointer op: gconstpointer?)Parameters
oppointer to the underlying object
-
Optional initialiser from a constant pointer to the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theTreeStoreinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafePointer<GtkTreeStore>?)Parameters
oppointer to the underlying object
-
Optional initialiser from the underlying
Cdata type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to theTreeStoreinstance.Declaration
Swift
@inlinable public init!(_ op: UnsafeMutablePointer<GtkTreeStore>?)Parameters
oppointer to the underlying object
-
Designated initialiser from the underlying
Cdata type. Will retainGtkTreeStore. i.e., ownership is transferred to theTreeStoreinstance.Declaration
Swift
@inlinable public init(retaining op: UnsafeMutablePointer<GtkTreeStore>)Parameters
oppointer to the underlying object
-
Reference intialiser for a related type that implements
TreeStoreProtocolWill retainGtkTreeStore.Declaration
Swift
@inlinable public init<T>(treeStore other: T) where T : TreeStoreProtocolParameters
otheran instance of a related type that implements
TreeStoreProtocol -
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeStoreProtocol.Declaration
Swift
@inlinable override public init<T>(cPointer p: UnsafeMutablePointer<T>)Parameters
cPointerpointer to the underlying object
-
Unsafe typed, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeStoreProtocol.Declaration
Swift
@inlinable override public init<T>(retainingCPointer cPointer: UnsafeMutablePointer<T>)Parameters
cPointerpointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeStoreProtocol.Declaration
Swift
@inlinable override public init(raw p: UnsafeRawPointer)Parameters
praw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeStoreProtocol.Declaration
Swift
@inlinable override public init(retainingRaw raw: UnsafeRawPointer) -
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeStoreProtocol.Declaration
Swift
@inlinable public required init(raw p: UnsafeMutableRawPointer)Parameters
pmutable raw pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeStoreProtocol.Declaration
Swift
@inlinable required public init(retainingRaw raw: UnsafeMutableRawPointer)Parameters
rawmutable raw pointer to the underlying object
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeStoreProtocol.Declaration
Swift
@inlinable override public init(opaquePointer p: OpaquePointer)Parameters
popaque pointer to the underlying object
-
Unsafe untyped, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
TreeStoreProtocol.Declaration
Swift
@inlinable override public init(retainingOpaquePointer p: OpaquePointer)Parameters
popaque pointer to the underlying object
-
Non vararg creation function. Used primarily by language bindings.
Declaration
Swift
@inlinable public init(nColumns: Int, types: UnsafeMutablePointer<GType>!) -
Non vararg creation function. Used primarily by language bindings.
Declaration
Swift
@inlinable public static func treeStoreNewv(nColumns: Int, types: UnsafeMutablePointer<GType>!) -> TreeStore! -
Return a tree model reference for the list store
Declaration
Swift
@inlinable var treeModel: TreeModelRef { get } -
Convenience constructor specifying the column types
Declaration
Swift
@inlinable convenience init(types: [GType])Parameters
typesarray of column types for this tree model
-
Convenience constructor specifying the column types
Declaration
Swift
@inlinable convenience init(_ types: GType...)Parameters
typescolumn types for this tree model
-
Set the given values for the current row
Declaration
Swift
@inlinable func set<I, V>(iter i: I, values: [V], startColumn: Int = 0) where I : TreeIterProtocol, V : ValueProtocolParameters
iiterator representing the current row
valuesarray of values to add
startColumncolumn to start from (defaults to
0) -
Append the given values to the next row
Declaration
Swift
@inlinable func append<I, V>(asNextRow i: I, parent p: I? = nil, values v: [V], startColumn s: Int = 0) where I : TreeIterProtocol, V : ValueProtocolParameters
iiterator representing the current row (updated to next row)
pparent iterator to append to
varray of values to add
startColumncolumn to start from (defaults to
0) -
Append the given values to the next row
Declaration
Swift
@inlinable func append<I>(asNextRow i: I, parent p: I? = nil, startColumn s: Int = 0, _ values: Value...) where I : TreeIterProtocolParameters
itree iterator representing the current row (updated to next row)
pparent iterator to append to
valuesarray of values to add
startColumncolumn to start from (defaults to
0)
View on GitHub
Install in Dash
TreeStore Class Reference