Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CEGUI::WidgetLookManager Class Reference

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

#include <CEGUIFalWidgetLookManager.h>

Inheritance diagram for CEGUI::WidgetLookManager:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::WidgetLookManager:

Collaboration graph
[legend]
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 writeFalagardXMLHeadToStream (OutStream &out_stream) const
 Writes the xml header and opening 'Falagard' tags to a stream.
void writeFalagardXMLTailToStream (OutStream &out_stream) const
 Writes closing xml 'Falagard' tag to a stream.
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.
 Singleton (void)

Static Public Member Functions

static WidgetLookManagergetSingleton (void)
 Return singleton WidgetLookManager object.
static WidgetLookManagergetSingletonPtr (void)
 Return pointer to singleton WindowFactoryManager object.

Static Protected Attributes

static WidgetLookManagerms_Singleton = 0

Detailed Description

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

Definition at line 46 of file CEGUIFalWidgetLookManager.h.


Constructor & Destructor Documentation

CEGUI::WidgetLookManager::WidgetLookManager  ) 
 

Constructor.

Definition at line 40 of file CEGUIFalWidgetLookManager.cpp.

References CEGUI::Logger::getSingleton(), and CEGUI::Logger::logEvent().

CEGUI::WidgetLookManager::~WidgetLookManager  ) 
 

Destructor.

Definition at line 45 of file CEGUIFalWidgetLookManager.cpp.

References CEGUI::Logger::getSingleton(), and CEGUI::Logger::logEvent().


Member Function Documentation

void CEGUI::WidgetLookManager::addWidgetLook const WidgetLookFeel look  ) 
 

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:
look WidgetLookFeel object to be added to the system. NB: The WidgetLookFeel is copied, no change of ownership of the input object occurrs.
Returns:
Nothing.

Definition at line 120 of file CEGUIFalWidgetLookManager.cpp.

References CEGUI::WidgetLookFeel::getName(), CEGUI::Logger::getSingleton(), isWidgetLookAvailable(), and CEGUI::Logger::logEvent().

Referenced by CEGUI::Falagard_xmlHandler::elementEnd().

void CEGUI::WidgetLookManager::eraseWidgetLook const String widget  ) 
 

Erase the WidgetLookFeel that has the specified name.

Parameters:
widget String object holding the name of a widget look to be erased. If no such WindowLookFeel exists, nothing happens.
Returns:
Nothing.

Definition at line 106 of file CEGUIFalWidgetLookManager.cpp.

References CEGUI::Logger::getSingleton(), and CEGUI::Logger::logEvent().

WidgetLookManager & CEGUI::WidgetLookManager::getSingleton void   )  [static]
 

Return singleton WidgetLookManager object.

Returns:
Singleton WidgetLookManager object

Reimplemented from CEGUI::Singleton< WidgetLookManager >.

Definition at line 53 of file CEGUIFalWidgetLookManager.cpp.

Referenced by CEGUI::Scheme::loadResources(), CEGUI::Window::performChildWindowLayout(), CEGUI::SectionSpecification::render(), and CEGUI::Window::setLookNFeel().

WidgetLookManager * CEGUI::WidgetLookManager::getSingletonPtr void   )  [static]
 

Return pointer to singleton WindowFactoryManager object.

Returns:
Pointer to singleton WindowFactoryManager object

Reimplemented from CEGUI::Singleton< WidgetLookManager >.

Definition at line 61 of file CEGUIFalWidgetLookManager.cpp.

Referenced by CEGUI::System::~System().

const WidgetLookFeel & CEGUI::WidgetLookManager::getWidgetLook const String widget  )  const
 

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

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

Definition at line 94 of file CEGUIFalWidgetLookManager.cpp.

Referenced by CEGUI::Window::performChildWindowLayout(), CEGUI::SectionSpecification::render(), CEGUI::Window::setLookNFeel(), and writeWidgetLookToStream().

bool CEGUI::WidgetLookManager::isWidgetLookAvailable const String widget  )  const
 

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

Parameters:
widget String object holding the name of a widget look to test for.
Returns:
  • true if a WindowLookFeel named widget is available.
  • false if so such WindowLookFeel is currently available.

Definition at line 89 of file CEGUIFalWidgetLookManager.cpp.

Referenced by addWidgetLook().

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:
filename String object containing the filename of a file containing the widget look & feel data
resourceGroup Resource group identifier to pass to the resource provider when loading the file.
Returns:
Nothing.
Exceptions:
FileIOException thrown if there was some problem accessing or parsing the file filename
InvalidRequestException thrown if an invalid filename was provided.

Definition at line 66 of file CEGUIFalWidgetLookManager.cpp.

References CEGUI::String::empty(), CEGUI::Errors, CEGUI::Logger::getSingleton(), CEGUI::System::getSingleton(), CEGUI::System::getXMLParser(), CEGUI::Logger::logEvent(), and CEGUI::XMLParser::parseXMLFile().

Referenced by CEGUI::Scheme::loadResources().

CEGUI::Singleton< WidgetLookManager >::Singleton void   )  [inline, inherited]
 

Definition at line 58 of file CEGUISingleton.h.

void CEGUI::WidgetLookManager::writeFalagardXMLHeadToStream OutStream out_stream  )  const
 

Writes the xml header and opening 'Falagard' tags to a stream.

Definition at line 131 of file CEGUIFalWidgetLookManager.cpp.

Referenced by writeWidgetLookSeriesToStream(), and writeWidgetLookToStream().

void CEGUI::WidgetLookManager::writeFalagardXMLTailToStream OutStream out_stream  )  const
 

Writes closing xml 'Falagard' tag to a stream.

Parameters:
out_stream OutStream where XML data should be sent.

Definition at line 139 of file CEGUIFalWidgetLookManager.cpp.

Referenced by writeWidgetLookSeriesToStream(), and writeWidgetLookToStream().

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

Definition at line 164 of file CEGUIFalWidgetLookManager.cpp.

References CEGUI::String::length(), writeFalagardXMLHeadToStream(), and writeFalagardXMLTailToStream().

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:
name String holding the name of the widget look to be output to the stream.
out_stream OutStream where XML data should be sent.

Definition at line 145 of file CEGUIFalWidgetLookManager.cpp.

References CEGUI::Errors, CEGUI::Logger::getSingleton(), getWidgetLook(), CEGUI::Logger::logEvent(), writeFalagardXMLHeadToStream(), writeFalagardXMLTailToStream(), and CEGUI::WidgetLookFeel::writeXMLToStream().


Member Data Documentation

WidgetLookManager * CEGUI::Singleton< WidgetLookManager >::ms_Singleton = 0 [static, protected, inherited]
 

Definition at line 36 of file CEGUIFalWidgetLookManager.cpp.


The documentation for this class was generated from the following files:
Generated on Wed Sep 7 10:10:15 2005 for Crazy Eddies GUI System by  doxygen 1.4.3