]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/draghandle.h
Rework how widget ownership works in Container
[libs/gltk.git] / source / draghandle.h
index 0aae73231877a819cecff1aff7ed733d9d4f6d17..68381feba520b4b0be7e0d3bc4e2dda96cb51cc5 100644 (file)
@@ -14,20 +14,18 @@ into a movable window.
 class MSPGLTK_API DragHandle: public Widget
 {
 private:
-       bool dragging;
-       int drag_x;
-       int drag_y;
+       bool dragging = false;
+       int drag_x = 0;
+       int drag_y = 0;
 
 public:
-       DragHandle();
+       const char *get_class() const override { return "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);
+       void button_press(int, int, unsigned) override;
+       void button_release(int, int, unsigned) override;
+       void pointer_motion(int, int) override;
 private:
-       virtual void on_reparent();
+       void on_reparent() override;
 };
 
 } // namespace GLtk