TreeDragDestProtocol

public protocol TreeDragDestProtocol

Interface for Drag-and-Drop destinations in GtkTreeView.

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

  • ptr

    Untyped pointer to the underlying GtkTreeDragDest instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GtkTreeDragDest instance.

    Default Implementation

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

    Declaration

    Swift

    var tree_drag_dest_ptr: UnsafeMutablePointer<GtkTreeDragDest>! { get }
  • Required Initialiser for types conforming to TreeDragDestProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

TreeDragDest Interface: TreeDragDestProtocol extension (methods and fields)

  • Asks the GtkTreeDragDest to insert a row before the path dest, deriving the contents of the row from value. If dest is outside the tree so that inserting before it is impossible, false will be returned. Also, false may be returned if the new row is not created for some model-specific reason. Should robustly handle a dest no longer found in the model!

    Declaration

    Swift

    @inlinable
    func dragDataReceived<TreePathT, ValueT>(dest: TreePathT, value: ValueT) -> Bool where TreePathT : TreePathProtocol, ValueT : ValueProtocol
  • Determines whether a drop is possible before the given dest_path, at the same depth as dest_path. i.e., can we drop the data in value at that location. dest_path does not have to exist; the return value will almost certainly be false if the parent of dest_path doesn’t exist, though.

    Declaration

    Swift

    @inlinable
    func rowDropPossible<TreePathT, ValueT>(destPath: TreePathT, value: ValueT) -> Bool where TreePathT : TreePathProtocol, ValueT : ValueProtocol