gtk-0.12.2: Binding to the Gtk+ graphical user interface library.

Portabilityportable (depends on GHC)




Interfaces for drag-and-drop support in Graphics.UI.Gtk.ModelView.TreeView.



Graphics.UI.Gtk.ModelView.TreeViews provide special support for Drag-and-Drop such as hover-to-open-rows or autoscrolling. This module implements two utility functions that set and get a path and a model in a Graphics.UI.Gtk.General.Selection.Selection structure. These functions are thus useful to implement drag-and-drop functionality in a Graphics.UI.Gtk.ModelView.TreeModel. In fact, they are used as part of the default drag-and-drop interfaces of Graphics.UI.Gtk.ModelView.ListStore and Graphics.UI.Gtk.ModelView.TreeStore that allows to permute rows and move them between hierarchy levels.

DND information for exchanging a model and a path.

targetTreeModelRow :: TargetTagSource

The SelectionTag, TargetTag and SelectionTypeTag of the DND mechanism of Graphics.UI.Gtk.ModelView.ListStore and Graphics.UI.Gtk.ModelView.TreeStore. This tag is used by treeGetRowDragData and treeSetRowDragData to store a store and a TreePath in a SelectionDataM. This target should be added to a Graphics.UI.Gtk.General.Selection.TargetList using Graphics.UI.Gtk.General.Seleciton.TargetSameWidget flag and an Graphics.UI.Gtk.General.Selection.InfoId of 0.

treeGetRowDragData :: SelectionDataM (Maybe (TreeModel, TreePath))Source

Obtains a TreeModel and a path from SelectionDataM whenever the target is targetTreeModelRow. Normally called from a treeDragDestDragDataReceived handler.

treeSetRowDragData :: TreeModelClass treeModel => treeModel -> TreePath -> SelectionDataM BoolSource

Sets selection data with the target targetTreeModelRow, consisting of a TreeModel and a TreePath. Normally used in a treeDragSourceDragDataGet handler.

  • Returns True if setting the data was successful.