]> git.tdb.fi Git - libs/gl.git/blobdiff - source/view.h
Inherit View from sigc::trackable
[libs/gl.git] / source / view.h
index 93eb49d7d64c82d8223a21c406bea9aaf49675f4..81d7e051de0ec22d4757d61fcb31160cd269cd3c 100644 (file)
@@ -2,6 +2,7 @@
 #define MSP_GL_VIEW_H_
 
 #include <list>
+#include <sigc++/trackable.h>
 #include <msp/graphics/glcontext.h>
 #include <msp/graphics/window.h>
 
@@ -15,7 +16,7 @@ class Renderable;
 /**
 Manages the presentation of rendering results on the screen.
 */
-class View
+class View: public sigc::trackable
 {
 private:
        Graphics::Window &window;
@@ -27,6 +28,11 @@ private:
 public:
        View(Graphics::Window &, Graphics::GLContext &);
 
+       Graphics::Window &get_window() { return window; }
+       Graphics::GLContext &get_context() { return context; }
+       unsigned get_width() const { return window.get_width(); }
+       unsigned get_height() const { return window.get_height(); }
+
        void set_content(const Renderable *);
        void synchronize_camera_aspect(Camera &);