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 <boost/signals.hpp>
00036
00037
00038 #ifdef _MSC_VER
00039 # ifdef GIGI_OGRE_PLUGIN_EXPORTS
00040 # define GG_OGRE_PLUGIN_API __declspec(dllexport)
00041 # else
00042 # define GG_OGRE_PLUGIN_API __declspec(dllimport)
00043 # endif
00044 #else
00045 # define GG_OGRE_PLUGIN_API
00046 #endif
00047
00048 namespace Ogre { class RenderWindow; }
00049
00050 namespace GG {
00051
00060 class GG_OGRE_PLUGIN_API OgreGUIInputPlugin :
00061 public Ogre::Plugin
00062 {
00063 public:
00064 OgreGUIInputPlugin();
00065 virtual ~OgreGUIInputPlugin();
00066
00068 static void SetRenderWindow(Ogre::RenderWindow* window);
00069
00071 static Ogre::RenderWindow* GetRenderWindow();
00072
00073 protected:
00074 void ConnectHandlers();
00075 void DisconnectHandlers();
00076
00077 private:
00078 virtual void HandleSystemEvents() = 0;
00079 virtual void HandleWindowResize(int width, int height);
00080 virtual void HandleWindowClose();
00081
00082 boost::signals::connection m_handle_events_connection;
00083 boost::signals::connection m_resize_connection;
00084 boost::signals::connection m_close_connection;
00085
00086 static Ogre::RenderWindow* s_render_window;
00087 };
00088
00089 }
00090
00091 #endif // _GG_OgreGUIInputPlugin_h_