GG: OgreGUIInputPlugin.h Source File

GG

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List
- File Members

OgreGUIInputPlugin.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /* GG is a GUI for SDL and OpenGL.
3 Copyright (C) 2007 T. Zachary Laine
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public License
7 as published by the Free Software Foundation; either version 2.1
8 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public
16 License along with this library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA
19
20 If you do not wish to comply with the terms of the LGPL please
21 contact the author as other terms are available for a fee.
22
23 Zach Laine
24 whatwasthataddress@gmail.com */
25
30 #ifndef _GG_OgreGUIInputPlugin_h_
31 #define _GG_OgreGUIInputPlugin_h_
32
33 #include <OgrePlugin.h>
34
35 #include <GG/PtRect.h>
36
37 #include <boost/signals.hpp>
38
39
40 #ifdef _MSC_VER
41 # ifdef GiGiOgrePlugin_OIS_EXPORTS
42 # define GG_OGRE_PLUGIN_API __declspec(dllexport)
43 # else
44 # define GG_OGRE_PLUGIN_API __declspec(dllimport)
45 # endif
46 #else
47 # define GG_OGRE_PLUGIN_API
48 #endif
49
50 namespace Ogre { class RenderWindow; }
51
52 namespace GG {
53
64 class GG_OGRE_PLUGIN_API OgreGUIInputPlugin :
65 public Ogre::Plugin
66 {
67 public:
68 OgreGUIInputPlugin();
69 virtual ~OgreGUIInputPlugin();
70
72 static void SetRenderWindow(Ogre::RenderWindow* window);
73
75 static Ogre::RenderWindow* GetRenderWindow();
76
77 protected:
78 void ConnectHandlers();
79 void DisconnectHandlers();
80
81 private:
82 virtual void HandleSystemEvents() = 0;
83 virtual void HandleWindowResize(X width, Y height);
84 virtual void HandleWindowClose();
85
86 boost::signals::connection m_handle_events_connection;
87 boost::signals::connection m_resize_connection;
88 boost::signals::connection m_close_connection;
89
90 static Ogre::RenderWindow* s_render_window;
91 };
92
93 } // namespace GG
94
95 #endif