TreeStoreRef

public struct TreeStoreRef : TreeStoreProtocol, GWeakCapturing

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 TreeStoreRef type acts as a lightweight Swift reference to an underlying GtkTreeStore instance. It exposes methods that can operate on this data type through TreeStoreProtocol conformance. Use TreeStoreRef only as an unowned reference to an existing GtkTreeStore instance.

  • ptr
    Untyped pointer to the underlying `GtkTreeStore` instance.
    

    For type-safe access, use the generated, typed pointer tree_store_ptr property instead.

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!

TreeStore Class

  • Designated initialiser from the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafeMutablePointer<GtkTreeStore>)
  • Designated initialiser from a constant pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init(_ p: UnsafePointer<GtkTreeStore>)
  • Conditional initialiser from an optional pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafeMutablePointer<GtkTreeStore>?)
  • Conditional initialiser from an optional, non-mutable pointer to the underlying C data type

    Declaration

    Swift

    @inlinable
    init!(_ maybePointer: UnsafePointer<GtkTreeStore>?)
  • Conditional initialiser from an optional gpointer

    Declaration

    Swift

    @inlinable
    init!(gpointer g: gpointer?)
  • Conditional initialiser from an optional, non-mutable gconstpointer

    Declaration

    Swift

    @inlinable
    init!(gconstpointer g: gconstpointer?)
  • Reference intialiser for a related type that implements TreeStoreProtocol

    Declaration

    Swift

    @inlinable
    init<T>(_ other: T) where T : TreeStoreProtocol
  • This factory is syntactic sugar for setting weak pointers wrapped in GWeak<T>

    Declaration

    Swift

    @inlinable
    static func unowned<T>(_ other: T) -> TreeStoreRef where T : TreeStoreProtocol
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to TreeStoreProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(cPointer: UnsafeMutablePointer<T>)
  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to TreeStoreProtocol.

    Declaration

    Swift

    @inlinable
    init<T>(constPointer: UnsafePointer<T>)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to TreeStoreProtocol.

    Declaration

    Swift

    @inlinable
    init(mutating 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
    init(raw: UnsafeMutableRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to TreeStoreProtocol.

    Declaration

    Swift

    @inlinable
    init(opaquePointer: OpaquePointer)
  • Non vararg creation function. Used primarily by language bindings.

    Declaration

    Swift

    @inlinable
    init(nColumns: Int, types: UnsafeMutablePointer<GType>!)
  • Non vararg creation function. Used primarily by language bindings.

    Declaration

    Swift

    @inlinable
    static func treeStoreNewv(nColumns: Int, types: UnsafeMutablePointer<GType>!) -> TreeStoreRef!