demos/GuiWrapper.h

Go to the documentation of this file.
00001 #ifndef _GUI_WRAPPER_H
00002 #define _GUI_WRAPPER_H
00003 
00004 // Forward declare GLWX objects
00005 class GUIEventListener;
00006 class GUILabel;
00007 class GUIFrame;
00008 
00009 
00010 class GuiWrapper {
00011 
00012 public:
00013 
00014 
00015         GuiWrapper(GUIEventListener * eventHandler);
00016         ~GuiWrapper();
00017 
00018         bool MouseClicked(int button, bool isDown, int x, int y) ;
00019         bool MouseMoved(int x, int y);
00020         bool AsciiKeyDown(unsigned char key);
00021         bool SpecialKeyDown(int key);
00022         bool Init(const char * dataPath);
00023         void SetDimensions(int width, int height);
00024         void RenderScene();
00025         void Update(double dt);
00026         bool IsActive();
00027         void SetActive( bool active );
00028 
00029 private:
00030 
00031         void Enter2DMode(int width, int height);
00032         void Exit2DMode();
00033 
00034         GUIEventListener *handler;
00035         GUILabel     *fpsDisplay;
00036         GUIFrame      *guiFrame;
00037 
00038         bool isActive;
00039         double dt;
00040         double elapsed;
00041         double fps;
00042         int frames;
00043 
00044 };
00045 
00046 
00047 
00048 #endif

Generated on Wed Dec 5 20:32:03 2007 for GLWX by  doxygen 1.5.3