Crazy Eddie's GUI System
0.8.4
|
Manager class that gives top-level access to widget data based "look and feel" specifications loaded into the system. More...
Public Types | |
typedef std::set< String, StringFastLessCompare CEGUI_SET_ALLOC(String)> | WidgetLookNameSet |
typedef ConstMapIterator < WidgetLookList > | WidgetLookIterator |
Public Member Functions | |
WidgetLookManager () | |
Constructor. | |
~WidgetLookManager () | |
Destructor. | |
void | parseLookNFeelSpecificationFromContainer (const RawDataContainer &source) |
Parses a file containing window look & feel specifications (in the form of XML). More... | |
void | parseLookNFeelSpecificationFromFile (const String &filename, const String &resourceGroup="") |
void | parseLookNFeelSpecificationFromString (const String &source) |
bool | isWidgetLookAvailable (const String &widget) const |
Return whether a WidgetLookFeel has been created with the specified name. More... | |
const WidgetLookFeel & | getWidgetLook (const String &widget) const |
Return a const reference to a WidgetLookFeel object which has the specified name. More... | |
void | eraseWidgetLook (const String &widget) |
Erase the WidgetLookFeel that has the specified name. More... | |
void | eraseAllWidgetLooks () |
erase all defined WidgetLookFeel. | |
void | addWidgetLook (const WidgetLookFeel &look) |
Add the given WidgetLookFeel. More... | |
void | writeWidgetLookToStream (const String &widgetLookName, OutStream &out_stream) const |
Writes a complete WidgetLookFeel to a stream. Note that XML file header and Falagard opening/closing tags will also be written. More... | |
String | getWidgetLookAsString (const String &widgetLookName) const |
Writes a complete WidgetLookFeel to a string. Note that XML file header and Falagard opening/closing tags will also be written. More... | |
String | getWidgetLookSetAsString (const WidgetLookNameSet &widgetLookNameSet) const |
Writes a set WidgetLookFeels to a string. Note that XML file header and Falagard opening/closing tags will also be written. More... | |
void | writeWidgetLookSeriesToStream (const String &prefix, OutStream &out_stream) const |
Writes a series of complete WidgetLook objects to a stream. Note that XML file header and Falagard opening/closing tags will also be written. More... | |
void | writeWidgetLookSetToStream (const WidgetLookNameSet &widgetLookNameSet, OutStream &out_stream) const |
Writes a series of complete WidgetLook objects to a stream. Note that XML file header and Falagard opening/closing tags will also be written. More... | |
WidgetLookIterator | getWidgetLookIterator () const |
Static Public Member Functions | |
static WidgetLookManager & | getSingleton (void) |
Return singleton WidgetLookManager object. More... | |
static WidgetLookManager * | getSingletonPtr (void) |
Return pointer to singleton WidgetLookManager object. More... | |
static const String & | getDefaultResourceGroup () |
Returns the default resource group currently set for LookNFeels. More... | |
static void | setDefaultResourceGroup (const String &resourceGroup) |
Sets the default resource group to be used when loading LookNFeel data. More... | |
Static Public Member Functions inherited from CEGUI::Singleton< WidgetLookManager > | |
static WidgetLookManager & | getSingleton (void) |
static WidgetLookManager * | getSingletonPtr (void) |
Additional Inherited Members | |
Static Protected Attributes inherited from CEGUI::Singleton< WidgetLookManager > | |
static WidgetLookManager * | ms_Singleton |
Manager class that gives top-level access to widget data based "look and feel" specifications loaded into the system.
typedef std::set<String, StringFastLessCompare CEGUI_SET_ALLOC(String)> CEGUI::WidgetLookManager::WidgetLookNameSet |
Typedef for a set of WidgetLookFeel names.
void CEGUI::WidgetLookManager::addWidgetLook | ( | const WidgetLookFeel & | look | ) |
Add the given WidgetLookFeel.
look | WidgetLookFeel object to be added to the system. NB: The WidgetLookFeel is copied, no change of ownership of the input object occurrs. |
void CEGUI::WidgetLookManager::eraseWidgetLook | ( | const String & | widget | ) |
Erase the WidgetLookFeel that has the specified name.
widget | String object holding the name of a widget look to be erased. If no such WidgetLookFeel exists, nothing happens. |
|
inlinestatic |
Returns the default resource group currently set for LookNFeels.
|
static |
Return singleton WidgetLookManager object.
|
static |
Return pointer to singleton WidgetLookManager object.
const WidgetLookFeel& CEGUI::WidgetLookManager::getWidgetLook | ( | const String & | widget | ) | const |
Return a const reference to a WidgetLookFeel object which has the specified name.
widget | String object holding the name of a widget look that is to be returned. |
UnknownObjectException | thrown if no WidgetLookFeel is available with the requested name. |
Writes a complete WidgetLookFeel to a string. Note that XML file header and Falagard opening/closing tags will also be written.
name | String holding the name of the WidgetLookFeel to be output to the string. |
String CEGUI::WidgetLookManager::getWidgetLookSetAsString | ( | const WidgetLookNameSet & | widgetLookNameSet | ) | const |
Writes a set WidgetLookFeels to a string. Note that XML file header and Falagard opening/closing tags will also be written.
widgetLookNameSet | Set of strings containing the WidgetLookFeel names to be output to the string. |
bool CEGUI::WidgetLookManager::isWidgetLookAvailable | ( | const String & | widget | ) | const |
Return whether a WidgetLookFeel has been created with the specified name.
widget | String object holding the name of a widget look to test for. |
void CEGUI::WidgetLookManager::parseLookNFeelSpecificationFromContainer | ( | const RawDataContainer & | source | ) |
Parses a file containing window look & feel specifications (in the form of XML).
source | RawDataContainer containing the source code that will be parsed |
resourceGroup | Resource group identifier to pass to the resource provider when loading the file. |
FileIOException | thrown if there was some problem accessing or parsing the file filename |
InvalidRequestException | thrown if an invalid filename was provided. |
void CEGUI::WidgetLookManager::parseLookNFeelSpecificationFromString | ( | const String & | source | ) |
|
inlinestatic |
Sets the default resource group to be used when loading LookNFeel data.
resourceGroup | String describing the default resource group identifier to be used. |
void CEGUI::WidgetLookManager::writeWidgetLookSeriesToStream | ( | const String & | prefix, |
OutStream & | out_stream | ||
) | const |
Writes a series of complete WidgetLook objects to a stream. Note that XML file header and Falagard opening/closing tags will also be written.
The \a prefix specifies a name prefix common to all widget looks to be written, you could specify this as "TaharezLook/" and then any defined widget look starting with that prefix, such as "TaharezLook/Button" and "TaharezLook/Listbox" will be written to the stream.
prefix | String holding the widget look name prefix, which will be used when searching for the widget looks to be output to the stream. |
out_stream | OutStream where XML data should be sent. |
void CEGUI::WidgetLookManager::writeWidgetLookSetToStream | ( | const WidgetLookNameSet & | widgetLookNameSet, |
OutStream & | out_stream | ||
) | const |
Writes a series of complete WidgetLook objects to a stream. Note that XML file header and Falagard opening/closing tags will also be written.
The \a widgetLookSet specifies a set of strings containing the names of the WidgetLookFeels to be written to the stream.
widgetLookNameSet | Set of strings containing the WidgetLookFeel names to be added to be written to the stream. |
out_stream | OutStream where XML data should be sent. |
void CEGUI::WidgetLookManager::writeWidgetLookToStream | ( | const String & | widgetLookName, |
OutStream & | out_stream | ||
) | const |
Writes a complete WidgetLookFeel to a stream. Note that XML file header and Falagard opening/closing tags will also be written.
name | String holding the name of the WidgetLookFeel to be output to the stream. |
out_stream | OutStream where XML data should be sent. |