TreeRowReference

open class TreeRowReference : TreeRowReferenceProtocol

A GtkTreeRowReference tracks model changes so that it always refers to the same row (a GtkTreePath refers to a position, not a fixed row). Create a new GtkTreeRowReference with gtk_tree_row_reference_new().

The TreeRowReference type acts as an owner of an underlying GtkTreeRowReference instance. It provides the methods that can operate on this data type through TreeRowReferenceProtocol conformance. Use TreeRowReference as a strong reference or owner of a GtkTreeRowReference instance.

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

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

    Declaration

    Swift

    public let ptr: UnsafeMutableRawPointer!
  • Designated initialiser from the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the TreeRowReference instance.

    Declaration

    Swift

    @inlinable
    public init(_ op: UnsafeMutablePointer<GtkTreeRowReference>)

    Parameters

    op

    pointer to the underlying object

  • Designated initialiser from a constant pointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the TreeRowReference instance.

    Declaration

    Swift

    @inlinable
    public init(_ op: UnsafePointer<GtkTreeRowReference>)

    Parameters

    op

    pointer to the underlying object

  • Optional initialiser from a non-mutating gpointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the TreeRowReference instance.

    Declaration

    Swift

    @inlinable
    public init!(gpointer op: gpointer?)

    Parameters

    op

    gpointer to the underlying object

  • Optional initialiser from a non-mutating gconstpointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the TreeRowReference instance.

    Declaration

    Swift

    @inlinable
    public init!(gconstpointer op: gconstpointer?)

    Parameters

    op

    pointer to the underlying object

  • Optional initialiser from a constant pointer to the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the TreeRowReference instance.

    Declaration

    Swift

    @inlinable
    public init!(_ op: UnsafePointer<GtkTreeRowReference>?)

    Parameters

    op

    pointer to the underlying object

  • Optional initialiser from the underlying C data type. This creates an instance without performing an unbalanced retain i.e., ownership is transferred to the TreeRowReference instance.

    Declaration

    Swift

    @inlinable
    public init!(_ op: UnsafeMutablePointer<GtkTreeRowReference>?)

    Parameters

    op

    pointer to the underlying object

  • Designated initialiser from the underlying C data type. GtkTreeRowReference does not allow reference counting, so despite the name no actual retaining will occur. i.e., ownership is transferred to the TreeRowReference instance.

    Declaration

    Swift

    @inlinable
    public init(retaining op: UnsafeMutablePointer<GtkTreeRowReference>)

    Parameters

    op

    pointer to the underlying object

  • Reference intialiser for a related type that implements TreeRowReferenceProtocol GtkTreeRowReference does not allow reference counting.

    Declaration

    Swift

    @inlinable
    public init<T>(_ other: T) where T : TreeRowReferenceProtocol

    Parameters

    other

    an instance of a related type that implements TreeRowReferenceProtocol

  • Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to TreeRowReferenceProtocol.

    Declaration

    Swift

    @inlinable
    public init<T>(cPointer p: UnsafeMutablePointer<T>)

    Parameters

    cPointer

    pointer to the underlying object

  • Unsafe typed, retaining initialiser. Do not use unless you know the underlying data type the pointer points to conforms to TreeRowReferenceProtocol.

    Declaration

    Swift

    @inlinable
    public init<T>(retainingCPointer cPointer: UnsafeMutablePointer<T>)

    Parameters

    cPointer

    pointer to the underlying object

  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to TreeRowReferenceProtocol.

    Declaration

    Swift

    @inlinable
    public init(raw p: UnsafeRawPointer)

    Parameters

    p

    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 TreeRowReferenceProtocol.

    Declaration

    Swift

    @inlinable
    public init(retainingRaw raw: UnsafeRawPointer)
  • Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to TreeRowReferenceProtocol.

    Declaration

    Swift

    @inlinable
    public required init(raw p: UnsafeMutableRawPointer)

    Parameters

    p

    mutable 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 TreeRowReferenceProtocol.

    Declaration

    Swift

    @inlinable
    public init(retainingRaw raw: UnsafeMutableRawPointer)

    Parameters

    raw

    mutable 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 TreeRowReferenceProtocol.

    Declaration

    Swift

    @inlinable
    public init(opaquePointer p: OpaquePointer)

    Parameters

    p

    opaque 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 TreeRowReferenceProtocol.

    Declaration

    Swift

    @inlinable
    public init(retainingOpaquePointer p: OpaquePointer)

    Parameters

    p

    opaque pointer to the underlying object

  • Creates a row reference based on path.

    This reference will keep pointing to the node pointed to by path, so long as it exists. Any changes that occur on model are propagated, and the path is updated appropriately. If path isn’t a valid path in model, then nil is returned.

    Declaration

    Swift

    @inlinable
    public init<TreeModelT, TreePathT>(model: TreeModelT, path: TreePathT) where TreeModelT : TreeModelProtocol, TreePathT : TreePathProtocol
  • You do not need to use this function.

    Creates a row reference based on path.

    This reference will keep pointing to the node pointed to by path, so long as it exists. If path isn’t a valid path in model, then nil is returned. However, unlike references created with gtk_tree_row_reference_new(), it does not listen to the model for changes. The creator of the row reference must do this explicitly using gtk_tree_row_reference_inserted(), gtk_tree_row_reference_deleted(), gtk_tree_row_reference_reordered().

    These functions must be called exactly once per proxy when the corresponding signal on the model is emitted. This single call updates all row references for that proxy. Since built-in GTK objects like GtkTreeView already use this mechanism internally, using them as the proxy object will produce unpredictable results. Further more, passing the same object as model and proxy doesn’t work for reasons of internal implementation.

    This type of row reference is primarily meant by structures that need to carefully monitor exactly when a row reference updates itself, and is not generally needed by most applications.

    Declaration

    Swift

    @inlinable
    public init<ObjectT, TreeModelT, TreePathT>(proxy: ObjectT, model: TreeModelT, path: TreePathT) where ObjectT : ObjectProtocol, TreeModelT : TreeModelProtocol, TreePathT : TreePathProtocol
  • You do not need to use this function.

    Creates a row reference based on path.

    This reference will keep pointing to the node pointed to by path, so long as it exists. If path isn’t a valid path in model, then nil is returned. However, unlike references created with gtk_tree_row_reference_new(), it does not listen to the model for changes. The creator of the row reference must do this explicitly using gtk_tree_row_reference_inserted(), gtk_tree_row_reference_deleted(), gtk_tree_row_reference_reordered().

    These functions must be called exactly once per proxy when the corresponding signal on the model is emitted. This single call updates all row references for that proxy. Since built-in GTK objects like GtkTreeView already use this mechanism internally, using them as the proxy object will produce unpredictable results. Further more, passing the same object as model and proxy doesn’t work for reasons of internal implementation.

    This type of row reference is primarily meant by structures that need to carefully monitor exactly when a row reference updates itself, and is not generally needed by most applications.

    Declaration

    Swift

    @inlinable
    public static func new<ObjectT, TreeModelT, TreePathT>(proxy: ObjectT, model: TreeModelT, path: TreePathT) -> TreeRowReference! where ObjectT : ObjectProtocol, TreeModelT : TreeModelProtocol, TreePathT : TreePathProtocol