]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Add API declarations
[libs/gltk.git] / source / widget.h
index 7cbec37a5455e62957d7ad8e02ff0eda17f9fbad..19db87985780223df3a85b51e6f1b5eae77aac72 100644 (file)
@@ -6,6 +6,7 @@
 #include <msp/gl/renderer.h>
 #include "geometry.h"
 #include "inputmethod.h"
+#include "mspgltk_api.h"
 #include "partcache.h"
 #include "state.h"
 
@@ -20,7 +21,7 @@ class Style;
 /**
 Base class for all widgets.
 */
-class Widget
+class MSPGLTK_API Widget
 {
        friend class Container;
 
@@ -77,6 +78,7 @@ public:
        const Geometry &get_geometry() const { return geom; }
 
        void map_coords_to_ancestor(int &, int &, const Widget &) const;
+       void map_coords_to_root(int &, int &) const;
 
 protected:
        /** Sets the widget's parent Container.  The widget must be unparented when
@@ -118,9 +120,6 @@ public:
        void set_enabled(bool);
        bool is_enabled() const { return !(state&DISABLED); }
 
-       // Deprecated
-       void set_focusable(bool);
-
 protected:
        void set_state(State s) { set_state(s, s); }
        void clear_state(State s) { set_state(s, NORMAL); }
@@ -163,12 +162,9 @@ public:
        virtual bool navigate(Navigation) { return false; }
        virtual void animate(const Time::TimeDelta &) { }
 protected:
-       virtual void on_size_change() { on_geometry_change(); }
+       virtual void on_size_change() { }
        virtual void on_style_change() { }
        virtual void on_reparent() { }
-
-       // Deprecated
-       virtual void on_geometry_change() { }
 };
 
 } // namespace GLtk