comparison engine/core/controller/engine.h @ 697:ecaa4d98f05f tip

Abstracted the GUI code and refactored the GUIChan-specific code into its own module. * Most of the GUIChan code has been refactored into its own gui/guichan module. However, references to the GuiFont class still persist in the Engine and GuiManager code and these will need further refactoring. * GuiManager is now an abstract base class which specific implementations (e.g. GUIChan) should subclass. * The GUIChan GUI code is now a concrete implementation of GuiManager, most of which is in the new GuiChanGuiManager class. * The GUI code in the Console class has been refactored out of the Console and into the GUIChan module as its own GuiChanConsoleWidget class. The rest of the Console class related to executing commands was left largely unchanged. * Existing client code may need to downcast the GuiManager pointer received from FIFE::Engine::getGuiManager() to GuiChanGuiManager, since not all functionality is represented in the GuiManager abstract base class. Python client code can use the new GuiChanGuiManager.castTo static method for this purpose.
author M. George Hansen <technopolitica@gmail.com>
date Sat, 18 Jun 2011 00:28:40 -1000
parents ca1fcb96907d
children
comparison
equal deleted inserted replaced
696:e201abd8c807 697:ecaa4d98f05f
50 50
51 namespace FIFE { 51 namespace FIFE {
52 52
53 class SoundManager; 53 class SoundManager;
54 class RenderBackend; 54 class RenderBackend;
55 class GUIManager; 55 class GuiManager;
56 class VFS; 56 class VFS;
57 class VFSSourceFactory; 57 class VFSSourceFactory;
58 class EventManager; 58 class EventManager;
59 class TimeManager; 59 class TimeManager;
60 class ImagePool; 60 class ImagePool;
64 class GuiFont; 64 class GuiFont;
65 class Cursor; 65 class Cursor;
66 class SoundClipPool; 66 class SoundClipPool;
67 class RendererBase; 67 class RendererBase;
68 class Image; 68 class Image;
69 69 class FontManager;
70 class GuiManager;
70 71
71 class IEngineChangeListener { 72 class IEngineChangeListener {
72 public: 73 public:
73 virtual ~IEngineChangeListener() {} 74 virtual ~IEngineChangeListener() {}
74 75
156 */ 157 */
157 TimeManager* getTimeManager() const { return m_timemanager; } 158 TimeManager* getTimeManager() const { return m_timemanager; }
158 159
159 /** Provides access point to the GuiManager 160 /** Provides access point to the GuiManager
160 */ 161 */
161 GUIManager* getGuiManager() const { return m_guimanager; } 162 GuiManager* getGuiManager() const { return m_guimanager; }
162 163
163 /** Provides access point to the ImagePool 164 /** Provides access point to the ImagePool
164 */ 165 */
165 ImagePool* getImagePool() const { return m_imagepool; } 166 ImagePool* getImagePool() const { return m_imagepool; }
166 167
208 209
209 private: 210 private:
210 void preInit(); 211 void preInit();
211 212
212 RenderBackend* m_renderbackend; 213 RenderBackend* m_renderbackend;
213 GUIManager* m_guimanager; 214 GuiManager* m_guimanager;
214 EventManager* m_eventmanager; 215 EventManager* m_eventmanager;
215 SoundManager* m_soundmanager; 216 SoundManager* m_soundmanager;
216 TimeManager* m_timemanager; 217 TimeManager* m_timemanager;
217 ImagePool* m_imagepool; 218 ImagePool* m_imagepool;
218 AnimationPool* m_animpool; 219 AnimationPool* m_animpool;
219 SoundClipPool* m_soundclippool; 220 SoundClipPool* m_soundclippool;
220 VFS* m_vfs; 221 VFS* m_vfs;
221 Model* m_model; 222 Model* m_model;
222 gcn::Graphics* m_gui_graphics;
223 LogManager* m_logmanager; 223 LogManager* m_logmanager;
224 GuiFont* m_defaultfont; 224 GuiFont* m_defaultfont;
225 Cursor* m_cursor; 225 Cursor* m_cursor;
226 bool m_destroyed; 226 bool m_destroyed;
227 227