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
00033 namespace GlutWrapper
00034 {
00035
00036 class IRunner;
00037 class IMouseListener;
00038 class IKeyboardListener;
00039 class IMenuListener;
00040
00041 class Window
00042 {
00043 public:
00059 Window(int argc, char** argv, int positionX, int positionY,
00060 int width, int height, const std::string& windowName,
00061 IRunner* runner, const std::vector<MenuEntry>& menuEntries,
00062 IMenuListener* menuListener,
00063 IMouseListener* mouseListener,
00064 IKeyboardListener* keyboardListener, bool idleRunning);
00065
00067 ~Window(void);
00068
00069 private:
00071 static IRunner* m_runner;
00072
00074 static IMenuListener* m_menuListener;
00075
00077 static IKeyboardListener* m_keyboardListener;
00078
00080 Window(const Window&);
00081
00083 Window& operator=(const Window&);
00084
00096 void InitializeGlut(int argc, char** argv, int positionX, int positionY,
00097 int width, int height, const std::string& windowName,
00098 IRunner* runner, const std::vector<MenuEntry>& menuEntries,
00099 IMenuListener* menuListener,
00100 IMouseListener* mouseListener,
00101 IKeyboardListener* keyboardListener, bool idleRunning);
00102
00104 static void DisplayFunc(void);
00105
00109 static void ReshapeFunc(int width, int height);
00110
00113 static void ProcessMenuEvents(int option);
00114
00119 static void ProcessNormalKeys(unsigned char key, int x, int y);
00120
00121 };
00122
00123 }
00124
00125 #endif