00001 /* Crown and Cutlass 00002 * Gui Helper Function header 00003 */ 00004 00005 #if !defined ( _GUI_H_ ) 00006 #define _GUI_H_ 00007 00008 #include <guichan.hpp> 00009 #include <guichan/sdl.hpp> 00010 #include <guichan/opengl.hpp> 00011 #include <string> 00012 #include "SDL.h" 00013 #include "../GLee.h" 00014 00015 class CCFont; 00016 class CCButton; 00017 class cCallback; 00018 00019 class CCGui { 00020 public: 00021 CCGui(int width, int height); 00022 00023 ~CCGui(); 00024 00025 void UpdateGui(); 00026 00027 static bool CreateGui(int width, int height); 00028 static bool DestroyGui(); 00029 00030 void SetTopContainer(gcn::Widget* top); 00031 gcn::Widget* GetTopContainer(); 00032 00033 // Returns true if the widget is the top container 00034 bool IsTopContainer(gcn::Widget* top); 00035 00036 static CCGui *s_CCGui; 00037 00038 void SetTargetPlane(int width, int height); 00039 00040 //gcn::Input* globalInput; 00041 gcn::SDLInput* m_input; 00042 00043 private: 00044 // Guichan Menu Globals 00045 gcn::OpenGLGraphics* m_graphics; 00046 gcn::OpenGLImageLoader* m_imageLoader; 00047 gcn::SDLImageLoader* m_hostImageLoader; 00048 00049 gcn::Gui* m_gui; 00050 00051 std::auto_ptr<CCFont> m_globalFont; 00052 00053 int m_width; 00054 int m_height; 00055 00056 void CheckInputGlobal(); 00057 }; 00058 00059 #endif
1.4.7