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.
-
Untyped pointer to the underlying
GtkTreeDragDest
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
tree_drag_dest_ptr
Default implementationTyped 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)
-
dragDataReceived(dest:
Extension methodvalue: ) Asks the
GtkTreeDragDest
to insert a row before the pathdest
, deriving the contents of the row fromvalue
. Ifdest
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 adest
no longer found in the model!Declaration
Swift
@inlinable func dragDataReceived<TreePathT, ValueT>(dest: TreePathT, value: ValueT) -> Bool where TreePathT : TreePathProtocol, ValueT : ValueProtocol
-
rowDropPossible(destPath:
Extension methodvalue: ) Determines whether a drop is possible before the given
dest_path
, at the same depth asdest_path
. i.e., can we drop the data invalue
at that location.dest_path
does not have to exist; the return value will almost certainly befalse
if the parent ofdest_path
doesn’t exist, though.Declaration
Swift
@inlinable func rowDropPossible<TreePathT, ValueT>(destPath: TreePathT, value: ValueT) -> Bool where TreePathT : TreePathProtocol, ValueT : ValueProtocol