OgreGUIInputPlugin.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00030 #ifndef _GG_OgreGUIInputPlugin_h_
00031 #define _GG_OgreGUIInputPlugin_h_
00032
00033 #include <OgrePlugin.h>
00034
00035 #include <GG/PtRect.h>
00036
00037 #include <boost/signals.hpp>
00038
00039
00040 #ifdef _MSC_VER
00041 # ifdef GiGiOgrePlugin_OIS_EXPORTS
00042 # define GG_OGRE_PLUGIN_API __declspec(dllexport)
00043 # else
00044 # define GG_OGRE_PLUGIN_API __declspec(dllimport)
00045 # endif
00046 #else
00047 # define GG_OGRE_PLUGIN_API
00048 #endif
00049
00050 namespace Ogre { class RenderWindow; }
00051
00052 namespace GG {
00053
00064 class GG_OGRE_PLUGIN_API OgreGUIInputPlugin :
00065 public Ogre::Plugin
00066 {
00067 public:
00068 OgreGUIInputPlugin();
00069 virtual ~OgreGUIInputPlugin();
00070
00072 static void SetRenderWindow(Ogre::RenderWindow* window);
00073
00075 static Ogre::RenderWindow* GetRenderWindow();
00076
00077 protected:
00078 void ConnectHandlers();
00079 void DisconnectHandlers();
00080
00081 private:
00082 virtual void HandleSystemEvents() = 0;
00083 virtual void HandleWindowResize(X width, Y height);
00084 virtual void HandleWindowClose();
00085
00086 boost::signals::connection m_handle_events_connection;
00087 boost::signals::connection m_resize_connection;
00088 boost::signals::connection m_close_connection;
00089
00090 static Ogre::RenderWindow* s_render_window;
00091 };
00092
00093 }
00094
00095 #endif // _GG_OgreGUIInputPlugin_h_