29 #ifndef _GG_OgreGUI_h_
30 #define _GG_OgreGUI_h_
37 #undef TCP_NOTIFY_THRESHOLD
38 #undef TCP_ABORT_THRESHOLD
39 #undef TCP_CONN_NOTIFY_THRESHOLD
40 #undef TCP_CONN_ABORT_THRESHOLD
42 #undef TCP_URGENT_PTR_TYPE
44 #define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0 // workaround by Apple to avoid conflicting macro names, fixes compile error
45 #include <Carbon/Carbon.h>
48 #include <OgreDataStream.h>
49 #include <OgreRenderTargetListener.h>
50 #include <OgreSharedPtr.h>
51 #include <OgreTimer.h>
52 #include <OgreWindowEventUtilities.h>
56 #include <boost/filesystem/path.hpp>
59 # ifdef GiGiOgre_EXPORTS
60 # define GG_OGRE_API __declspec(dllexport)
62 # define GG_OGRE_API __declspec(dllimport)
127 public Ogre::RenderTargetListener,
128 public Ogre::WindowEventListener
134 explicit OgreGUI(Ogre::RenderWindow* window,
135 const boost::filesystem::path& config_file_path = boost::filesystem::path());
141 virtual boost::shared_ptr<ModalEventPump> CreateModalEventPump(
bool& done);
143 virtual unsigned int Ticks()
const;
144 virtual X AppWidth()
const;
145 virtual Y AppHeight()
const;
150 const Ogre::SharedPtr<Ogre::DataStream>& ConfigFileStream()
const;
152 Ogre::RenderWindow* GetRenderWindow()
const {
return m_window; }
154 virtual void Exit(
int code);
182 virtual void RenderBegin();
183 virtual void RenderEnd();
185 virtual void HandleSystemEvents();
186 virtual void Enter2DMode();
187 virtual void Exit2DMode();
190 virtual void postRenderTargetUpdate(
const Ogre::RenderTargetEvent& event);
191 virtual void windowMoved(Ogre::RenderWindow* window);
192 virtual void windowResized(Ogre::RenderWindow* window);
193 virtual bool windowClosing(Ogre::RenderWindow* window);
194 virtual void windowClosed(Ogre::RenderWindow* window);
195 virtual void windowFocusChange(Ogre::RenderWindow* window);
197 Ogre::RenderWindow* m_window;
198 mutable Ogre::Timer m_timer;
199 Ogre::SharedPtr<Ogre::DataStream> m_config_file_data;