Crazy Eddies GUI System  0.7.6
Public Member Functions | Static Public Member Functions
CEGUI::WidgetLookManager Class Reference

Manager class that gives top-level access to widget data based "look and feel" specifications loaded into the system. More...

+ Inheritance diagram for CEGUI::WidgetLookManager:
+ Collaboration diagram for CEGUI::WidgetLookManager:

List of all members.

Public Member Functions

 WidgetLookManager ()
 Constructor.
 ~WidgetLookManager ()
 Destructor.
void parseLookNFeelSpecification (const String &filename, const String &resourceGroup="")
 Parses a file containing window look & feel specifications (in the form of XML).
bool isWidgetLookAvailable (const String &widget) const
 Return whether a WidgetLookFeel has been created with the specified name.
const WidgetLookFeelgetWidgetLook (const String &widget) const
 Return a const reference to a WidgetLookFeel object which has the specified name.
void eraseWidgetLook (const String &widget)
 Erase the WidgetLookFeel that has the specified name.
void addWidgetLook (const WidgetLookFeel &look)
 Add the given WidgetLookFeel.
void writeWidgetLookToStream (const String &name, OutStream &out_stream) const
 Writes a complete Widge Look to a stream. Note that xml file header and falagard opening/closing tags will also be written.
void writeWidgetLookSeriesToStream (const String &prefix, OutStream &out_stream) const
 Writes a series of complete Widge Look objects to a stream. Note that xml file header and falagard opening/closing tags will also be written.

Static Public Member Functions

static WidgetLookManagergetSingleton (void)
 Return singleton WidgetLookManager object.
static WidgetLookManagergetSingletonPtr (void)
 Return pointer to singleton WidgetLookManager object.
static const StringgetDefaultResourceGroup ()
 Returns the default resource group currently set for LookNFeels.
static void setDefaultResourceGroup (const String &resourceGroup)
 Sets the default resource group to be used when loading LookNFeel data.

Detailed Description

Manager class that gives top-level access to widget data based "look and feel" specifications loaded into the system.


Member Function Documentation

Add the given WidgetLookFeel.

Note:
If the WidgetLookFeel specification uses a name that already exists within the system, it is not an error; the previous definition is overwritten by the new data. An entry will appear in the log each time any look & feel component is overwritten.
Parameters:
lookWidgetLookFeel object to be added to the system. NB: The WidgetLookFeel is copied, no change of ownership of the input object occurrs.
Returns:
Nothing.

Erase the WidgetLookFeel that has the specified name.

Parameters:
widgetString object holding the name of a widget look to be erased. If no such WidgetLookFeel exists, nothing happens.
Returns:
Nothing.
static const String& CEGUI::WidgetLookManager::getDefaultResourceGroup ( ) [inline, static]

Returns the default resource group currently set for LookNFeels.

Returns:
String describing the default resource group identifier that will be used when loading LookNFeel data.

Return singleton WidgetLookManager object.

Returns:
Singleton WidgetLookManager object

Reimplemented from CEGUI::Singleton< WidgetLookManager >.

Return pointer to singleton WidgetLookManager object.

Returns:
Pointer to singleton WidgetLookManager object

Reimplemented from CEGUI::Singleton< WidgetLookManager >.

Return a const reference to a WidgetLookFeel object which has the specified name.

Parameters:
widgetString object holding the name of a widget look that is to be returned.
Returns:
const reference to the requested WidgetLookFeel object.
Exceptions:
UnknownObjectExceptionthrown if no WidgetLookFeel is available with the requested name.

Return whether a WidgetLookFeel has been created with the specified name.

Parameters:
widgetString object holding the name of a widget look to test for.
Returns:
void CEGUI::WidgetLookManager::parseLookNFeelSpecification ( const String filename,
const String resourceGroup = "" 
)

Parses a file containing window look & feel specifications (in the form of XML).

Note:
If the new file contains specifications for widget types that are already specified, it is not an error; the previous definitions are overwritten by the new data. An entry will appear in the log each time any look & feel component is overwritten.
Parameters:
filenameString object containing the filename of a file containing the widget look & feel data
resourceGroupResource group identifier to pass to the resource provider when loading the file.
Returns:
Nothing.
Exceptions:
FileIOExceptionthrown if there was some problem accessing or parsing the file filename
InvalidRequestExceptionthrown if an invalid filename was provided.
static void CEGUI::WidgetLookManager::setDefaultResourceGroup ( const String resourceGroup) [inline, static]

Sets the default resource group to be used when loading LookNFeel data.

Parameters:
resourceGroupString describing the default resource group identifier to be used.
Returns:
Nothing.
void CEGUI::WidgetLookManager::writeWidgetLookSeriesToStream ( const String prefix,
OutStream out_stream 
) const

Writes a series of complete Widge Look 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.
Parameters:
prefixString holding the widget look name prefix, which will be used when searching for the widget looks to be output to the stream.
out_streamOutStream where XML data should be sent.
void CEGUI::WidgetLookManager::writeWidgetLookToStream ( const String name,
OutStream out_stream 
) const

Writes a complete Widge Look to a stream. Note that xml file header and falagard opening/closing tags will also be written.

Parameters:
nameString holding the name of the widget look to be output to the stream.
out_streamOutStream where XML data should be sent.