]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/root.h
Use a Camera rather than direct matrix manipulation
[libs/gltk.git] / source / root.h
index 64829e767899fac2bcf32c8465777f724f68d9f4..b79bca367d3e22c51ca3c86ad61bf6683728337e 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GLTK_ROOT_H_
 
 #include <sigc++/trackable.h>
+#include <msp/gl/camera.h>
 #include <msp/graphics/window.h>
 #include <msp/input/keyboard.h>
 #include <msp/input/mouse.h>
@@ -32,6 +33,7 @@ private:
        int pointer_y;
        Time::TimeStamp tooltip_timeout;
        Widget *tooltip_target;
+       Msp::GL::Camera camera;
 
 public:
        /** Creates a Root widget for a window.  The geometry is set to match the
@@ -64,6 +66,10 @@ private:
        bool character_event(StringCodec::unichar);
 
        void get_pointer(int &, int &);
+       void update_camera();
+
+       virtual void on_geometry_change();
+       virtual void on_child_added(Widget &);
 };
 
 } // namespace GLtk