]> git.tdb.fi Git - libs/gl.git/blob - source/render/windowview.h
Use default member initializers for simple types
[libs/gl.git] / source / render / windowview.h
1 #ifndef MSP_GL_WINDOWVIEW_H_
2 #define MSP_GL_WINDOWVIEW_H_
3
4 #include <msp/graphics/glcontext.h>
5 #include <msp/graphics/window.h>
6 #include "view.h"
7
8 namespace Msp {
9 namespace GL {
10
11 class WindowView: public View
12 {
13 private:
14         Graphics::Window &window;
15         Graphics::GLContext &context;
16
17 public:
18         WindowView(Graphics::Window &, Graphics::GLContext &);
19
20         Graphics::Window &get_window() { return window; }
21         Graphics::GLContext &get_context() { return context; }
22         virtual unsigned get_width() const { return window.get_width(); }
23         virtual unsigned get_height() const { return window.get_height(); }
24
25         using View::render;
26         virtual void render(Renderer &);
27
28 private:
29         void window_resized(unsigned, unsigned);
30 };
31
32 } // namespace GL
33 } // namespace Msp
34
35 #endif