MachineIntelligenceCore:Visualization
Window.hpp
Go to the documentation of this file.
1 
23 #ifndef SRC_VISUALIZATION_OPENGL_WINDOW_HPP_
24 #define SRC_VISUALIZATION_OPENGL_WINDOW_HPP_
25 
26 #include <application/KeyHandlerRegistry.hpp>
28 
29 
30 namespace mic {
31 
37 namespace opengl {
38 
44 namespace visualization {
45 
46 
51 class Window : public mic::application::KeyHandlerRegistry, public mic::opengl::visualization::DrawingUtils {
52 public:
53 
62  Window(std::string name_ = "OpenGlWindow",
63  unsigned int position_x_ = 0, unsigned int position_y_ = 0,
64  unsigned int width_ = 512, unsigned int height_ = 512);
65 
69  virtual ~Window();
70 
75  unsigned int getId() const;
76 
81  std::string getName() const;
82 
83 
87  virtual void displayHandler(void) = 0;
88 
92  virtual void mouseHandler(int button, int state, int x, int y) { };
93 
99  virtual void reshapeHandler(int width_, int height_);
100 
101 protected:
105  std::string name;
106 
110  unsigned int position_x;
111 
115  unsigned int position_y;
116 
120  unsigned int width;
121 
125  unsigned int height;
126 
130  unsigned int previous_width;
131 
135  unsigned int previous_height;
136 
140  unsigned int id;
141 
146 
150  void keyhandlerFullscreen(void);
151 
152 
153 };
154 
155 
156 } /* namespace opengl */
157 } /* namespace visualization */
158 } /* namespace mic */
159 
160 #endif /* SRC_VISUALIZATION_OPENGL_WINDOW_HPP_ */
Window(std::string name_="OpenGlWindow", unsigned int position_x_=0, unsigned int position_y_=0, unsigned int width_=512, unsigned int height_=512)
Definition: Window.cpp:30
Declaration of a class encapsulating methods for drawing in OpenGL windows.
Class offering methods for drawing in OpenGL windows.
unsigned int getId() const
Definition: Window.cpp:77
virtual void mouseHandler(int button, int state, int x, int y)
Definition: Window.hpp:92
std::string getName() const
Definition: Window.cpp:81
virtual void reshapeHandler(int width_, int height_)
Definition: Window.cpp:85
Parent class of all OpenGL-based windows (abstract).
Definition: Window.hpp:51
virtual void displayHandler(void)=0