00001
00002
00003
00004
00005
00006
00007
00008 #ifndef GLUTWINDOW_H_
00009 #define GLUTWINDOW_H_
00010
00011 #include <WindowFV.h>
00012
00013 namespace FemViewer {
00014 namespace GlutGUI {
00015
00016 class FemvVieweApp;
00017
00018 class GlutWindow: public WindowFV
00019 {
00020 public:
00021 static void Init(int argc,char** argv);
00022 static GlutWindow& GetInstance(void);
00023 static void Run(void);
00025 GlutWindow(int posX,int posY,int width,int height,const char* title);
00026 virtual ~GlutWindow(void);
00027
00028 virtual void Refresh(void);
00029 virtual bool Show(bool show = true);
00030
00031 int MainLoop();
00032 private:
00033 friend class FemViewerApp;
00035 int _wndId;
00036
00038 GlutWindow(const GlutWindow&);
00039 GlutWindow& operator=(const GlutWindow&);
00040
00041 static void IdleFunc(void);
00042
00043 static void DisplayFunc(void);
00044
00045 static void ResizeFunc(int width,int height);
00046
00047 static void MouseFunc(int button,int state,int x,int y);
00048
00049 static void MouseMotionFunc(int x,int y);
00050
00051 static void MenuFunc(int option);
00052
00053
00054
00055
00056
00057
00058
00059 static void KeyboardFunc(unsigned char key,int x,int y);
00060
00061 };
00062
00063 }
00064 }
00065
00066 #endif