Crazy Eddie's GUI System
0.8.7
|
Class that manages WindowFactory objects. More...
Classes | |
class | AliasTargetStack |
Class used to track active alias targets for Window factory types. More... | |
struct | FalagardWindowMapping |
struct used to hold mapping information required to create a falagard based window. More... | |
Public Types | |
typedef ConstMapIterator< WindowFactoryRegistry > | WindowFactoryIterator |
typedef ConstMapIterator< TypeAliasRegistry > | TypeAliasIterator |
typedef ConstMapIterator< FalagardMapRegistry > | FalagardMappingIterator |
Public Member Functions | |
WindowFactoryManager (void) | |
Constructs a new WindowFactoryManager object. | |
~WindowFactoryManager (void) | |
Destructor for WindowFactoryManager objects. | |
void | addFactory (WindowFactory *factory) |
Adds a new WindowFactory to the list of registered factories. More... | |
void | removeFactory (const String &name) |
Removes a WindowFactory from the list of registered factories. More... | |
void | removeFactory (WindowFactory *factory) |
Removes a WindowFactory from the list of registered factories. More... | |
void | removeAllFactories (void) |
Remove all WindowFactory objects from the list. More... | |
WindowFactory * | getFactory (const String &type) const |
Return a pointer to the specified WindowFactory object. More... | |
bool | isFactoryPresent (const String &name) const |
Checks the list of registered WindowFactory objects, aliases, and falagard mapped types for one which can create Window objects of the specified type. More... | |
void | addWindowTypeAlias (const String &aliasName, const String &targetType) |
Adds an alias for a current window type. More... | |
void | removeWindowTypeAlias (const String &aliasName, const String &targetType) |
Remove the specified alias mapping. If the alias mapping does not exist, nothing happens. More... | |
void | removeAllWindowTypeAliases () |
Remove all registered window type alias mappings. | |
void | addFalagardWindowMapping (const String &newType, const String &targetType, const String &lookName, const String &renderer, const String &effectName=String("")) |
Add a mapping for a falagard based window. More... | |
void | removeFalagardWindowMapping (const String &type) |
Remove the specified falagard type mapping if it exists. More... | |
void | removeAllFalagardWindowMappings () |
Remove all registered falagard type mappings. | |
bool | isFalagardMappedType (const String &type) const |
Return whether the given type is a falagard mapped type. More... | |
const String & | getMappedLookForType (const String &type) const |
Return the name of the LookN'Feel assigned to the specified window mapping. More... | |
const String & | getMappedRendererForType (const String &type) const |
Return the name of the WindowRenderer assigned to the specified window mapping. More... | |
String | getDereferencedAliasType (const String &type) const |
Use the alias system, where required, to 'de-reference' the specified type to an actual window type that can be created directly (that being either a concrete window type, or a falagard mapped type). More... | |
const FalagardWindowMapping & | getFalagardMappingForType (const String &type) const |
Return the FalagardWindowMapping for the specified window mapping type. More... | |
WindowFactoryIterator | getIterator (void) const |
Return a WindowFactoryManager::WindowFactoryIterator object to iterate over the available WindowFactory types. | |
TypeAliasIterator | getAliasIterator (void) const |
Return a WindowFactoryManager::TypeAliasIterator object to iterate over the defined aliases for window types. | |
FalagardMappingIterator | getFalagardMappingIterator () const |
Return a WindowFactoryManager::FalagardMappingIterator object to iterate over the defined falagard window mappings. | |
Static Public Member Functions | |
template<typename T > | |
static void | addFactory () |
Creates a WindowFactory of the type T and adds it to the system for use. The created WindowFactory will automatically be deleted when the factory is removed from the system (either directly or at system deletion time). More... | |
template<typename T > | |
static void | addWindowType () |
Internally creates a factory suitable for creating Window objects of the given type and adds it to the system. More... | |
Static Public Member Functions inherited from CEGUI::Singleton< WindowFactoryManager > | |
static WindowFactoryManager & | getSingleton (void) |
static WindowFactoryManager * | getSingletonPtr (void) |
Additional Inherited Members | |
Static Protected Attributes inherited from CEGUI::Singleton< WindowFactoryManager > | |
static WindowFactoryManager * | ms_Singleton |
Class that manages WindowFactory objects.
void CEGUI::WindowFactoryManager::addFactory | ( | WindowFactory * | factory | ) |
Adds a new WindowFactory to the list of registered factories.
factory | Pointer to the WindowFactory to be added to the WindowManager. |
NullObjectException | factory was null. |
AlreadyExistsException | factory provided a Window type name which is in use by another registered WindowFactory. |
|
static |
Creates a WindowFactory of the type T and adds it to the system for use. The created WindowFactory will automatically be deleted when the factory is removed from the system (either directly or at system deletion time).
T | Specifies the type of WindowFactory subclass to add a factory for. |
References CEGUI::WindowFactory::getTypeName().
void CEGUI::WindowFactoryManager::addFalagardWindowMapping | ( | const String & | newType, |
const String & | targetType, | ||
const String & | lookName, | ||
const String & | renderer, | ||
const String & | effectName = String("") |
||
) |
Add a mapping for a falagard based window.
This function creates maps a target window type and target 'look' name onto a registered window type, thus allowing the ususal window creation interface to be used to create windows that require extra information to full initialise themselves.
newType | The type name that will be used to create windows using the target type and look. |
targetType | The base window type. |
lookName | The name of the 'look' that will be used by windows of this type. |
renderer | The type of window renderer to assign for windows of this type. |
effectName | The identifier of the RenderEffect to attempt to set up for windows of this type. |
|
static |
Internally creates a factory suitable for creating Window objects of the given type and adds it to the system.
T | Specifies the type of Window to add a factory for. |
void CEGUI::WindowFactoryManager::addWindowTypeAlias | ( | const String & | aliasName, |
const String & | targetType | ||
) |
Adds an alias for a current window type.
This method allows you to create an alias for a specified window type. This means that you can then use either name as the type parameter when creating a window.
aliasName | String object holding the alias name. That is the name that targetType will also be known as from no on. |
targetType | String object holding the type window type name that is to be aliased. This type must already exist. |
UnknownObjectException | thrown if targetType is not known within the system. |
Use the alias system, where required, to 'de-reference' the specified type to an actual window type that can be created directly (that being either a concrete window type, or a falagard mapped type).
type | String describing the type to be de-referenced. |
WindowFactory* CEGUI::WindowFactoryManager::getFactory | ( | const String & | type | ) | const |
Return a pointer to the specified WindowFactory object.
type | String holding the Window object type to return the WindowFactory for. |
UnknownObjectException | No WindowFactory object for Window objects of type type was found. |
const FalagardWindowMapping& CEGUI::WindowFactoryManager::getFalagardMappingForType | ( | const String & | type | ) | const |
Return the FalagardWindowMapping for the specified window mapping type.
type | Name of a window type. The window type referenced should be a falagard mapped type. |
InvalidRequestException | thrown if type is not a falagard mapping type (or maybe the type didn't exist). |
Return the name of the LookN'Feel assigned to the specified window mapping.
type | Name of a window type. The window type referenced should be a falagard mapped type. |
InvalidRequestException | thrown if type is not a falagard mapping type (or maybe the type didn't exist). |
Return the name of the WindowRenderer assigned to the specified window mapping.
type | Name of a window type. The window type referenced should be a falagard mapped type. |
InvalidRequestException | thrown if type is not a falagard mapping type (or maybe the type didn't exist). |
bool CEGUI::WindowFactoryManager::isFactoryPresent | ( | const String & | name | ) | const |
Checks the list of registered WindowFactory objects, aliases, and falagard mapped types for one which can create Window objects of the specified type.
bool CEGUI::WindowFactoryManager::isFalagardMappedType | ( | const String & | type | ) | const |
Return whether the given type is a falagard mapped type.
type | Name of a window type. |
void CEGUI::WindowFactoryManager::removeAllFactories | ( | void | ) |
Remove all WindowFactory objects from the list.
void CEGUI::WindowFactoryManager::removeFactory | ( | const String & | name | ) |
Removes a WindowFactory from the list of registered factories.
name | String which holds the name (technically, Window type name) of the WindowFactory to be removed. If name is not in the list, no error occurs (nothing happens). |
void CEGUI::WindowFactoryManager::removeFactory | ( | WindowFactory * | factory | ) |
Removes a WindowFactory from the list of registered factories.
factory | Pointer to the factory object to be removed. If factory is null, or if no such WindowFactory is in the list, no error occurs (nothing happens). |
void CEGUI::WindowFactoryManager::removeFalagardWindowMapping | ( | const String & | type | ) |
Remove the specified falagard type mapping if it exists.
void CEGUI::WindowFactoryManager::removeWindowTypeAlias | ( | const String & | aliasName, |
const String & | targetType | ||
) |
Remove the specified alias mapping. If the alias mapping does not exist, nothing happens.
aliasName | String object holding the alias name. |
targetType | String object holding the type window type name that was aliased. |