Drag'n'drop with files

Tabla de contenidos

About this tutorial
The application frame
Receiving drops
The text/uri-list format
Dragging files to other applications
The final program
Further ideas

This tutorial will show you how to use the drag'n'drop functions of PHP-Gtk and go deep into the topic "Files and DnD", as this is not as trivial as it might look.

In the tutorial we will exemplarily build an application which has only one widget, a tree. This tree can be filled with branches and leaves by dropping files over it. You will be able to drag those files back to different programs, at least if you are not on Windows. Short: We build a bookmark manager for files.