29 #ifndef _CEGUIWindowFactory_h_
30 #define _CEGUIWindowFactory_h_
32 #include "CEGUI/Base.h"
33 #include "CEGUI/String.h"
34 #include "CEGUI/Window.h"
55 #define CEGUI_DECLARE_WINDOW_FACTORY( T )\
56 class T ## Factory : public WindowFactory\
59 T ## Factory() : WindowFactory( T::WidgetTypeName ) {}\
60 Window* createWindow(const String& name)\
62 return CEGUI_NEW_AO T(d_type, name);\
64 void destroyWindow(Window* window)\
66 CEGUI_DELETE_AO window;\
69 T ## Factory& get ## T ## Factory();
76 #define CEGUI_DEFINE_WINDOW_FACTORY( T )\
77 T ## Factory& get ## T ## Factory()\
79 static T ## Factory s_factory;\
88 #define CEGUI_WINDOW_FACTORY( T ) (get ## T ## Factory())
115 class CEGUIEXPORT WindowFactory :
116 public AllocatedObject<WindowFactory>
129 virtual Window* createWindow(
const String& name) = 0;
141 virtual void destroyWindow(Window* window) = 0;
172 #endif // end of guard _CEGUIWindowFactory_h_
virtual ~WindowFactory()
Destructor.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/WindowFactory.h:156
Main namespace for Crazy Eddie's GUI Library.
Definition: cegui/include/CEGUI/Affector.h:42
WindowFactory(const String &type)
Constructor.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/WindowFactory.h:161
const String & getTypeName() const
Get the string that describes the type of Window object this WindowFactory produces.
Definition: debian/tmp/usr/include/cegui-0.8.7/CEGUI/WindowFactory.h:152
String class used within the GUI system.
Definition: cegui/include/CEGUI/String.h:62