Crazy Eddies GUI System  0.6.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CEGUI::WindowFactory Class Referenceabstract

Abstract class that defines the required interface for all WindowFactory objects. More...

+ Collaboration diagram for CEGUI::WindowFactory:

Public Member Functions

virtual WindowcreateWindow (const String &name)=0
 Create a new Window object of whatever type this WindowFactory produces. More...
 
virtual void destroyWindow (Window *window)=0
 Destroys the given Window object. More...
 
const StringgetTypeName (void) const
 Get the string that describes the type of Window object this WindowFactory produces. More...
 

Protected Member Functions

 WindowFactory (const String &type)
 

Protected Attributes

String d_type
 String holding the type of object created by this factory.
 

Detailed Description

Abstract class that defines the required interface for all WindowFactory objects.

A WindowFactory is used to create and destroy windows of a specific type. For every type of Window object wihin the system (widgets, dialogs, movable windows etc) there must be an associated WindowFactory registered with the WindowManager so that the system knows how to create and destroy those types of Window base object.

Member Function Documentation

virtual Window* CEGUI::WindowFactory::createWindow ( const String name)
pure virtual

Create a new Window object of whatever type this WindowFactory produces.

Parameters
nameA unique name that is to be assigned to the newly created Window object
Returns
Pointer to the new Window object.

Referenced by CEGUI::WindowManager::createWindow().

virtual void CEGUI::WindowFactory::destroyWindow ( Window window)
pure virtual

Destroys the given Window object.

Parameters
windowPointer to the Window object to be destroyed.
Returns
Nothing.

Referenced by CEGUI::WindowManager::cleanDeadPool().

const String& CEGUI::WindowFactory::getTypeName ( void  ) const
inline

Get the string that describes the type of Window object this WindowFactory produces.

Returns
String object that contains the unique Window object type produced by this WindowFactory

Referenced by CEGUI::WindowFactoryManager::addFactory(), and CEGUI::WindowFactoryManager::removeFactory().