+#ifndef MSP_GLTK_DRAGHANDLE_H_
+#define MSP_GLTK_DRAGHANDLE_H_
+
+#include "widget.h"
+
+namespace Msp {
+namespace GLtk {
+
+/**
+Moves its parent widget when dragged. This allows turning a Panel or Dialog
+into a movable window.
+*/
+class DragHandle: public Widget
+{
+private:
+ bool dragging;
+ int drag_x;
+ int drag_y;
+
+public:
+ DragHandle();
+
+ virtual const char *get_class() const { return "draghandle"; }
+
+ virtual void button_press(int, int, unsigned);
+ virtual void button_release(int, int, unsigned);
+ virtual void pointer_motion(int, int);
+private:
+ virtual void on_reparent();
+};
+
+} // namespace GLtk
+} // namespace Msp
+
+#endif