OgreGUIInputPlugin.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /* GG is a GUI for SDL and OpenGL.
00003    Copyright (C) 2007 T. Zachary Laine
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public License
00007    as published by the Free Software Foundation; either version 2.1
00008    of the License, or (at your option) any later version.
00009    
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Lesser General Public License for more details.
00014     
00015    You should have received a copy of the GNU Lesser General Public
00016    License along with this library; if not, write to the Free
00017    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
00018    02111-1307 USA
00019 
00020    If you do not wish to comply with the terms of the LGPL please
00021    contact the author as other terms are available for a fee.
00022     
00023    Zach Laine
00024    whatwasthataddress@hotmail.com */
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 } // namespace GG
00090 
00091 #endif // _GG_OgreGUIInputPlugin_h_

Generated on Wed Mar 26 14:35:42 2008 for GG by  doxygen 1.5.2