00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00025
00026 #ifndef _WINDOW_H_
00027 #define _WINDOW_H_
00028
00029 #include <string>
00030 #include <vector>
00031 #include "MenuEntry.h"
00032 #include "MouseState.h"
00033
00034 namespace GlutWrapper
00035 {
00036
00037 class IRunner;
00038 class IMouseListener;
00039 class IKeyboardListener;
00040 class IMenuListener;
00041
00042 class Window
00043 {
00044 public:
00060 Window(int argc, char** argv, int positionX, int positionY,
00061 int width, int height, const std::string& windowName,
00062 IRunner* runner, const std::vector<MenuEntry>& menuEntries,
00063 IMenuListener* menuListener,
00064 IMouseListener* mouseListener,
00065 IKeyboardListener* keyboardListener, bool idleRunning);
00066
00068 ~Window(void);
00069
00070 private:
00072 static IRunner* m_runner;
00073
00075 static IMenuListener* m_menuListener;
00076
00078 static IKeyboardListener* m_keyboardListener;
00079
00081 static IMouseListener* m_mouseListener;
00082
00084 static MouseState m_mouseState;
00085
00086 static int m_lastElapsedTime;
00087
00089 Window(const Window&);
00090
00092 Window& operator=(const Window&);
00093
00105 void InitializeGlut(int argc, char** argv, int positionX, int positionY,
00106 int width, int height, const std::string& windowName,
00107 IRunner* runner, const std::vector<MenuEntry>& menuEntries,
00108 IMenuListener* menuListener,
00109 IMouseListener* mouseListener,
00110 IKeyboardListener* keyboardListener, bool idleRunning);
00111
00113 static void DisplayFunc(void);
00114
00118 static void ReshapeFunc(int width, int height);
00119
00122 static void ProcessMenuEvents(int option);
00123
00128 static void ProcessNormalKeys(unsigned char key, int x, int y);
00129
00135 static void ProcessMouse(int button, int state, int x, int y);
00136
00140 static void ProcessMouseMotion(int x, int y);
00141
00145 static void ProcessMousePassiveMotion(int x, int y);
00146 };
00147
00148 }
00149
00150 #endif