Crazy Eddies GUI System: CEGUI::WindowFactory Class Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions | Protected Attributes
CEGUI::WindowFactory Class Reference

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

Inheritance diagram for CEGUI::WindowFactory:
[legend]
Collaboration diagram for CEGUI::WindowFactory:
[legend]

List of all members.

## Public Member Functions
virtual Window * | createWindow (const String &name)=0
| Create a new Window object of whatever type this WindowFactory produces.
virtual void | destroyWindow (Window *window)=0
| Destroys the given Window object.
const String & | getTypeName () const
| Get the string that describes the type of Window object this WindowFactory produces.
virtual | ~WindowFactory ()
| Destructor.
## Protected Member Functions
| WindowFactory (const String &type)
| Constructor.
## 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 WindowFactoryManager so that the system knows how to create and destroy those types of Window base object.

Note:
  The use if of the CEGUI_DECLARE_WINDOW_FACTORY, CEGUI_DEFINE_WINDOW_FACTORY and CEGUI_WINDOW_FACTORY macros is deprecated in favour of the template class TplWindowFactory and templatised WindowFactoryManager::addFactory function, whereby you no longer need to directly create any supporting structure for your new window type, and can simply do:

          CEGUI::WindowFactoryManager::addFactory<TplWindowFactory<MyWidget> >();

## 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:

  name | A unique name that is to be assigned to the newly created Window object

Returns:
  Pointer to the new Window object.

Implemented in CEGUI::TplWindowFactory< T >.

virtual void CEGUI::WindowFactory::destroyWindow | ( | Window * | window | ) | `[pure virtual]`

Destroys the given Window object.

Parameters:

  window | Pointer to the Window object to be destroyed.

Returns:
  Nothing.

Implemented in CEGUI::TplWindowFactory< T >.

const String& CEGUI::WindowFactory::getTypeName | ( |  | ) | 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().