Crazy Eddies GUI System
0.6.0
|
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 ConstBaseIterator < WindowFactoryRegistry > | WindowFactoryIterator |
typedef ConstBaseIterator < TypeAliasRegistry > | TypeAliasIterator |
typedef ConstBaseIterator < 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 | addFalagardWindowMapping (const String &newType, const String &targetType, const String &lookName, const String &renderer) |
Add a mapping for a falagard based window. More... | |
void | removeFalagardWindowMapping (const String &type) |
Remove the specified falagard type mapping if it exists. More... | |
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. | |
Additional Inherited Members | |
![]() | |
static WindowFactoryManager & | getSingleton (void) |
static WindowFactoryManager * | getSingletonPtr (void) |
![]() | |
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. |
References CEGUI::WindowFactory::getTypeName().
void CEGUI::WindowFactoryManager::addFalagardWindowMapping | ( | const String & | newType, |
const String & | targetType, | ||
const String & | lookName, | ||
const String & | renderer | ||
) |
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. |
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. |
References isFactoryPresent().
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. |
Referenced by getFactory(), getFalagardMappingForType(), getMappedLookForType(), getMappedRendererForType(), isFactoryPresent(), and isFalagardMappedType().
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. |
References getDereferencedAliasType().
Referenced by CEGUI::WindowManager::createWindow().
const WindowFactoryManager::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). |
References getDereferencedAliasType().
Referenced by CEGUI::WindowManager::createWindow().
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). |
References getDereferencedAliasType().
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). |
References getDereferencedAliasType().
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.
References getDereferencedAliasType().
Referenced by addWindowTypeAlias().
bool CEGUI::WindowFactoryManager::isFalagardMappedType | ( | const String & | type | ) | const |
Return whether the given type is a falagard mapped type.
type | Name of a window type. |
References getDereferencedAliasType().
Referenced by CEGUI::WindowManager::createWindow().
|
inline |
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). |
Referenced by removeFactory().
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). |
References CEGUI::WindowFactory::getTypeName(), and removeFactory().
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. |
References CEGUI::Informative.