]> git.tdb.fi Git - libs/gl.git/blob - source/windowview.h
Appease the compiler with some extra copy-ctor's and operator='s
[libs/gl.git] / source / windowview.h
1 #ifndef MSP_GL_WINDOWVIEW_H_
2 #define MSP_GL_WINDOWVIEW_H_
3
4 #include <sigc++/trackable.h>
5 #include <msp/graphics/glcontext.h>
6 #include <msp/graphics/window.h>
7 #include "view.h"
8
9 namespace Msp {
10 namespace GL {
11
12 class WindowView: public View
13 {
14 private:
15         Graphics::Window &window;
16         Graphics::GLContext &context;
17
18 public:
19         WindowView(Graphics::Window &, Graphics::GLContext &);
20
21         Graphics::Window &get_window() { return window; }
22         Graphics::GLContext &get_context() { return context; }
23         virtual unsigned get_width() const { return window.get_width(); }
24         virtual unsigned get_height() const { return window.get_height(); }
25
26         virtual void render();
27
28 private:
29         void window_resized(unsigned, unsigned);
30 };
31
32 } // namespace GL
33 } // namespace Msp
34
35 #endif