---------------------------------------------------------------------------- -- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet -- Copyright (C) 2000-2022, AdaCore -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, or (at your option) any later -- version. This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- As a special exception under Section 7 of GPL version 3, you are granted -- additional permissions described in the GCC Runtime Library Exception, -- version 3.1, as published by the Free Software Foundation. -- -- You should have received a copy of the GNU General Public License and -- a copy of the GCC Runtime Library Exception along with this program; -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- <http://www.gnu.org/licenses/>. -- -- ----------------------------------------------------------------------------
function "+" (W : Gtk_Tree_Drag_Source) return Gtk_Tree_Drag_Source
function Drag_Data_Delete
(Self : Gtk_Tree_Drag_Source;
Path : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean
Asks the Gtk.Tree_Drag_Source.Gtk_Tree_Drag_Source to delete the row at Path, because it was moved somewhere else via drag-and-drop. Returns False if the deletion fails because Path no longer exists, or for some model-specific reason. Should robustly handle a Path no longer found in the model!
row that was being dragged
True if the row was successfully deleted
function Drag_Data_Get
(Self : Gtk_Tree_Drag_Source;
Path : Gtk.Tree_Model.Gtk_Tree_Path;
Selection_Data : Gtk.Selection_Data.Gtk_Selection_Data)
return Boolean
Asks the Gtk.Tree_Drag_Source.Gtk_Tree_Drag_Source to fill in Selection_Data with a representation of the row at Path. Selection_Data->target gives the required type of the data. Should robustly handle a Path no longer found in the model!
row that was dragged
a Gtk.Selection_Data.Gtk_Selection_Data to fill with data from the dragged row
True if data of the required type was provided
procedure Get_Row_Drag_Data
(Selection_Data : Gtk.Selection_Data.Gtk_Selection_Data;
Tree_Model : out Gtk.Tree_Model.Gtk_Tree_Model;
Path : out Gtk.Tree_Model.Gtk_Tree_Path;
Success : out Boolean)
Obtains a Tree_Model and Path from selection data of target type GTK_TREE_MODEL_ROW. Normally called from a drag_data_received handler. This function can only be used if Selection_Data originates from the same process that's calling this function, because a pointer to the tree model is being passed around. If you aren't in the same process, then you'll get memory corruption. In the Gtk.Tree_Drag_Dest.Gtk_Tree_Drag_Dest drag_data_received handler, you can assume that selection data of type GTK_TREE_MODEL_ROW is in from the current process. The returned path must be freed with Gtk.Tree_Model.Path_Free.
a Gtk.Selection_Data.Gtk_Selection_Data
a Gtk.Tree_Model.Gtk_Tree_Model
row in Tree_Model @return True if Selection_Data had target type GTK_TREE_MODEL_ROW and is otherwise valid
function Get_Type return Glib.GType
type Gtk_Tree_Drag_Source is new Glib.Types.GType_Interface;
Null_Gtk_Tree_Drag_Source : constant Gtk_Tree_Drag_Source;
function Row_Draggable
(Self : Gtk_Tree_Drag_Source;
Path : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean
Asks the Gtk.Tree_Drag_Source.Gtk_Tree_Drag_Source whether a particular row can be used as the source of a DND operation. If the source doesn't implement this interface, the row is assumed draggable.
row on which user is initiating a drag
True if the row can be dragged
procedure Set_Drag_Data_Delete
(Self : Tree_Drag_Source_Interface_Descr;
Handler : Virtual_Drag_Data_Delete)
procedure Set_Drag_Data_Get
(Self : Tree_Drag_Source_Interface_Descr;
Handler : Virtual_Drag_Data_Get)
function Set_Row_Drag_Data
(Selection_Data : Gtk.Selection_Data.Gtk_Selection_Data;
Tree_Model : Gtk.Tree_Model.Gtk_Tree_Model;
Path : Gtk.Tree_Model.Gtk_Tree_Path) return Boolean
Sets selection data of target type GTK_TREE_MODEL_ROW. Normally used in a drag_data_get handler.
some Gtk.Selection_Data.Gtk_Selection_Data
a Gtk.Tree_Model.Gtk_Tree_Model
a row in Tree_Model
True if the Gtk.Selection_Data.Gtk_Selection_Data had the proper target type to allow us to set a tree row
procedure Set_Row_Draggable
(Self : Tree_Drag_Source_Interface_Descr;
Handler : Virtual_Row_Draggable)
See Glib.Object.Add_Interface
subtype Tree_Drag_Source_Interface_Descr is Glib.Object.Interface_Description;
type Virtual_Drag_Data_Delete is access function
(Self : Gtk_Tree_Drag_Source;
Path : System.Address) return Glib.Gboolean;
Asks the Gtk.Tree_Drag_Source.Gtk_Tree_Drag_Source to delete the row at Path, because it was moved somewhere else via drag-and-drop. Returns False if the deletion fails because Path no longer exists, or for some model-specific reason. Should robustly handle a Path no longer found in the model!
row that was being dragged
True if the row was successfully deleted
type Virtual_Drag_Data_Get is access function
(Self : Gtk_Tree_Drag_Source;
Path : System.Address;
Selection_Data : System.Address) return Glib.Gboolean;
Asks the Gtk.Tree_Drag_Source.Gtk_Tree_Drag_Source to fill in Selection_Data with a representation of the row at Path. Selection_Data->target gives the required type of the data. Should robustly handle a Path no longer found in the model!
row that was dragged
a Gtk.Selection_Data.Gtk_Selection_Data to fill with data from the dragged row
True if data of the required type was provided
type Virtual_Row_Draggable is access function
(Self : Gtk_Tree_Drag_Source;
Path : System.Address) return Glib.Gboolean;
Asks the Gtk.Tree_Drag_Source.Gtk_Tree_Drag_Source whether a particular row can be used as the source of a DND operation. If the source doesn't implement this interface, the row is assumed draggable.
row on which user is initiating a drag
True if the row can be dragged