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())
Definition MemoryAllocatedObject.h:110
String class used within the GUI system.
Definition String.h:64
Abstract class that defines the required interface for all WindowFactory objects.
Definition WindowFactory.h:117
virtual ~WindowFactory()
Destructor.
Definition WindowFactory.h:156
virtual void destroyWindow(Window *window)=0
Destroys the given Window object.
virtual Window * createWindow(const String &name)=0
Create a new Window object of whatever type this WindowFactory produces.
String d_type
String holding the type of object created by this factory.
Definition WindowFactory.h:167
const String & getTypeName() const
Get the string that describes the type of Window object this WindowFactory produces.
Definition WindowFactory.h:152
WindowFactory(const String &type)
Constructor.
Definition WindowFactory.h:161
An abstract base class providing common functionality and specifying the required interface for deriv...
Definition Window.h:151
Main namespace for Crazy Eddie's GUI Library.
Definition arch_overview.dox:1