type Gtk_Tree_Drag_Source is new Glib.Types.GType_Interface;
type Gtk_Tree_Drag_Dest is new Glib.Types.GType_Interface;
function Drag_Dest_Get_Type return GType;
function Drag_Source_Get_Type return GType;
function Drag_Dest_Drag_Data_Received
( | Drag_Dest | : Gtk_Tree_Drag_Dest; |
Dest | : Gtk.Tree_Model.Gtk_Tree_Path; | |
Selection_Data | : Gtk.Selection.Selection_Data) return Boolean; |
function Drag_Dest_Row_Drop_Possible
( | Drag_Dest | : Gtk_Tree_Drag_Dest; |
Dest_Path | : Gtk.Tree_Model.Gtk_Tree_Path; | |
Selection_Data | : Gtk.Selection.Selection_Data) return Boolean; |
function Drag_Source_Drag_Data_Delete
( | Drag_Source | : Gtk_Tree_Drag_Source; |
Path | : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean; |
function Drag_Source_Drag_Data_Get
( | Drag_Source | : Gtk_Tree_Drag_Source; |
Path | : Gtk.Tree_Model.Gtk_Tree_Path; | |
Selection_Data | : Gtk.Selection.Selection_Data) return Boolean; |
function Drag_Source_Row_Draggable
( | Drag_Source | : Gtk_Tree_Drag_Source; |
Path | : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean; |
procedure Get_Row_Drag_Data
( | Selection_Data | : Gtk.Selection.Selection_Data; |
Tree_Model | : out Gtk.Tree_Model.Gtk_Tree_Model; | |
Path | : out Gtk.Tree_Model.Gtk_Tree_Path; | |
Success | : out Boolean); |
function Set_Row_Drag_Data
( | Selection_Data | : Gtk.Selection.Selection_Data; |
Tree_Model | : access Gtk.Tree_Model.Gtk_Tree_Model_Record'Class; | |
Path | : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean; |
GTK+ supports Drag-and-Drop in tree views with a high-level and a low-level API.
The low-level API consists of the GTK+ DND API, augmented by some treeview utility functions: Gtk.Tree_View.Set_Drag_Dest_Row, Gtk.Tree_View.Get_Drag_Dest_Row, Gtk.Tree_View.Get_Dest_Row_At_Pos, Gtk.Tree_View.Create_Row_Drag_Icon, Set_Row_Drag_Data and Get_Row_Drag_Data. This API leaves a lot of flexibility, but nothing is done automatically, and implementing advanced features like hover-to-open-rows or autoscrolling on top of this API is a lot of work.
On the other hand, if you write to the high-level API, then all the bookkeeping of rows is done for you, as well as things like hover-to-open and auto-scroll, but your models have to implement the Gtk_Tree_Drag_Source and Gtk_Tree_Drag_Dest interfaces.
Binding from C File version 2.8.17