Crazy Eddies GUI System  0.6.0
Public Types | Public Member Functions | List of all members
CEGUI::WidgetLookFeel Class Reference

Class that encapsulates look & feel information for a particular widget type. More...

Public Types

typedef std::vector
< PropertyInitialiser
PropertyList
 
typedef std::vector
< PropertyDefinition
PropertyDefinitionList
 
typedef std::vector
< PropertyLinkDefinition
PropertyLinkDefinitionList
 

Public Member Functions

 WidgetLookFeel (const String &name)
 
const StateImagerygetStateImagery (const CEGUI::String &state) const
 Return a const reference to the StateImagery object for the specified state. More...
 
const ImagerySectiongetImagerySection (const CEGUI::String &section) const
 Return a const reference to the ImagerySection object with the specified name. More...
 
const StringgetName () const
 Return the name of the widget look. More...
 
void addImagerySection (const ImagerySection &section)
 Add an ImagerySection to the WidgetLookFeel. More...
 
void addWidgetComponent (const WidgetComponent &widget)
 Add a WidgetComponent to the WidgetLookFeel. More...
 
void addStateSpecification (const StateImagery &state)
 Add a state specification (StateImagery object) to the WidgetLookFeel. More...
 
void addPropertyInitialiser (const PropertyInitialiser &initialiser)
 Add a property initialiser to the WidgetLookFeel. More...
 
void clearImagerySections ()
 Clear all ImagerySections from the WidgetLookFeel. More...
 
void clearWidgetComponents ()
 Clear all WidgetComponents from the WidgetLookFeel. More...
 
void clearStateSpecifications ()
 Clear all StateImagery objects from the WidgetLookFeel. More...
 
void clearPropertyInitialisers ()
 Clear all PropertyInitialiser objects from the WidgetLookFeel. More...
 
void initialiseWidget (Window &widget) const
 Initialise the given window using PropertyInitialsers and component widgets specified for this WidgetLookFeel. More...
 
void cleanUpWidget (Window &widget) const
 Clean up the given window from all properties and component widgets created by this WidgetLookFeel. More...
 
bool isStateImageryPresent (const String &state) const
 Return whether imagery is defined for the given state. More...
 
void addNamedArea (const NamedArea &area)
 Adds a named area to the WidgetLookFeel. More...
 
void clearNamedAreas ()
 Clear all defined named areas from the WidgetLookFeel. More...
 
const NamedAreagetNamedArea (const String &name) const
 Return the NamedArea with the specified name. More...
 
bool isNamedAreaDefined (const String &name) const
 return whether a NamedArea object with the specified name exists for this WidgetLookFeel. More...
 
void layoutChildWidgets (const Window &owner) const
 Layout the child widgets defined for this WidgetLookFeel which are attached to the given window. More...
 
void addPropertyDefinition (const PropertyDefinition &propdef)
 Adds a property definition to the WidgetLookFeel. More...
 
void addPropertyLinkDefinition (const PropertyLinkDefinition &propdef)
 Adds a property link definition to the WidgetLookFeel. More...
 
void clearPropertyDefinitions ()
 Clear all defined property definitions from the WidgetLookFeel. More...
 
void clearPropertyLinkDefinitions ()
 Clear all defined property link definitions from the WidgetLookFeel. More...
 
void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this WidgetLookFeel to out_stream. More...
 
void renameChildren (const Window &widget, const String &newBaseName) const
 Uses the WindowManager to rename the child windows that are created for this WidgetLookFeel. More...
 
const PropertyInitialiserfindPropertyInitialiser (const String &propertyName) const
 Takes the name of a property and returns a pointer to the last PropertyInitialiser for this property or 0 if the is no PropertyInitialiser for this property in the WidgetLookFeel. More...
 
const WidgetComponentfindWidgetComponent (const String &nameSuffix) const
 Takes the namesuffix for a widget component and returns a pointer to it if it exists or 0 if it does'nt. More...
 
const PropertyDefinitionList & getPropertyDefinitions () const
 
const PropertyLinkDefinitionList & getPropertyLinkDefinitions () const
 
const PropertyListgetProperties () const
 

Detailed Description

Class that encapsulates look & feel information for a particular widget type.

Member Typedef Documentation

Typedefs for property related lists.

Member Function Documentation

void CEGUI::WidgetLookFeel::addImagerySection ( const ImagerySection section)

Add an ImagerySection to the WidgetLookFeel.

Parameters
sectionImagerySection object to be added.
Returns
Nothing.

References CEGUI::ImagerySection::getName().

void CEGUI::WidgetLookFeel::addNamedArea ( const NamedArea area)

Adds a named area to the WidgetLookFeel.

Parameters
areaNamedArea to be added.
Returns
Nothing.

References CEGUI::NamedArea::getName().

void CEGUI::WidgetLookFeel::addPropertyDefinition ( const PropertyDefinition propdef)

Adds a property definition to the WidgetLookFeel.

Parameters
propdefPropertyDefinition object to be added.
Returns
Nothing.
void CEGUI::WidgetLookFeel::addPropertyInitialiser ( const PropertyInitialiser initialiser)

Add a property initialiser to the WidgetLookFeel.

Parameters
initialiserPropertyInitialiser object to be added.
Returns
Nothing.
void CEGUI::WidgetLookFeel::addPropertyLinkDefinition ( const PropertyLinkDefinition propdef)

Adds a property link definition to the WidgetLookFeel.

Parameters
propdefPropertyLinkDefinition object to be added.
Returns
Nothing.
void CEGUI::WidgetLookFeel::addStateSpecification ( const StateImagery state)

Add a state specification (StateImagery object) to the WidgetLookFeel.

Parameters
sectionStateImagery object to be added.
Returns
Nothing.

References CEGUI::StateImagery::getName().

void CEGUI::WidgetLookFeel::addWidgetComponent ( const WidgetComponent widget)

Add a WidgetComponent to the WidgetLookFeel.

Parameters
widgetWidgetComponent object to be added.
Returns
Nothing.
void CEGUI::WidgetLookFeel::cleanUpWidget ( Window widget) const

Clean up the given window from all properties and component widgets created by this WidgetLookFeel.

Parameters
widgetWindow based object to be cleaned up.
Returns
Nothing.

References CEGUI::Window::getLookNFeel(), getName(), CEGUI::Window::getName(), and CEGUI::PropertySet::removeProperty().

Referenced by CEGUI::Window::setLookNFeel().

void CEGUI::WidgetLookFeel::clearImagerySections ( )

Clear all ImagerySections from the WidgetLookFeel.

Returns
Nothing.
void CEGUI::WidgetLookFeel::clearNamedAreas ( )

Clear all defined named areas from the WidgetLookFeel.

Returns
Nothing.
void CEGUI::WidgetLookFeel::clearPropertyDefinitions ( )

Clear all defined property definitions from the WidgetLookFeel.

Returns
Nothing.
void CEGUI::WidgetLookFeel::clearPropertyInitialisers ( )

Clear all PropertyInitialiser objects from the WidgetLookFeel.

Returns
Nothing.
void CEGUI::WidgetLookFeel::clearPropertyLinkDefinitions ( )

Clear all defined property link definitions from the WidgetLookFeel.

Returns
Nothing.
void CEGUI::WidgetLookFeel::clearStateSpecifications ( )

Clear all StateImagery objects from the WidgetLookFeel.

Returns
Nothing.
void CEGUI::WidgetLookFeel::clearWidgetComponents ( )

Clear all WidgetComponents from the WidgetLookFeel.

Returns
Nothing.
const PropertyInitialiser * CEGUI::WidgetLookFeel::findPropertyInitialiser ( const String propertyName) const

Takes the name of a property and returns a pointer to the last PropertyInitialiser for this property or 0 if the is no PropertyInitialiser for this property in the WidgetLookFeel.

Parameters
propertyNameThe name of the property to look for.

Referenced by CEGUI::Window::isPropertyAtDefault().

const WidgetComponent * CEGUI::WidgetLookFeel::findWidgetComponent ( const String nameSuffix) const

Takes the namesuffix for a widget component and returns a pointer to it if it exists or 0 if it does'nt.

Parameters
nameSuffixThe name suffix of the Child component to look for.

Referenced by CEGUI::Window::isPropertyAtDefault().

const ImagerySection & CEGUI::WidgetLookFeel::getImagerySection ( const CEGUI::String section) const

Return a const reference to the ImagerySection object with the specified name.

Returns
ImagerySection object with the specified name.

Referenced by CEGUI::Tree::initialise(), and CEGUI::SectionSpecification::render().

const String & CEGUI::WidgetLookFeel::getName ( void  ) const

Return the name of the widget look.

Returns
String object holding the name of the WidgetLookFeel.

Referenced by CEGUI::WidgetLookManager::addWidgetLook(), and cleanUpWidget().

const NamedArea & CEGUI::WidgetLookFeel::getNamedArea ( const String name) const

Return the NamedArea with the specified name.

Parameters
nameString object holding the name of the NamedArea to be returned.
Returns
The requested NamedArea object.
const PropertyList& CEGUI::WidgetLookFeel::getProperties ( ) const
inline

Obtains list of properties. public

Returns
CEGUI::WidgetLookFeel::PropertyList List of properties
const PropertyDefinitionList& CEGUI::WidgetLookFeel::getPropertyDefinitions ( ) const
inline

Obtains list of properties definitions. public

Returns
CEGUI::WidgetLookFeel::PropertyDefinitionList List of properties definitions
const PropertyLinkDefinitionList& CEGUI::WidgetLookFeel::getPropertyLinkDefinitions ( ) const
inline

Obtains list of properties link definitions. public

Returns
CEGUI::WidgetLookFeel::PropertyLinkDefinitionList List of properties link definitions
const StateImagery & CEGUI::WidgetLookFeel::getStateImagery ( const CEGUI::String state) const

Return a const reference to the StateImagery object for the specified state.

Returns
StateImagery object for the requested state.
void CEGUI::WidgetLookFeel::initialiseWidget ( Window widget) const

Initialise the given window using PropertyInitialsers and component widgets specified for this WidgetLookFeel.

Parameters
widgetWindow based object to be initialised.
Returns
Nothing.

References CEGUI::PropertySet::addProperty(), and CEGUI::PropertySet::setProperty().

Referenced by CEGUI::Window::setLookNFeel().

bool CEGUI::WidgetLookFeel::isNamedAreaDefined ( const String name) const

return whether a NamedArea object with the specified name exists for this WidgetLookFeel.

Parameters
nameString holding the name of the NamedArea to check for.
Returns
  • true if a named area with the requested name is defined for this WidgetLookFeel.
  • false if no such named area is defined for this WidgetLookFeel.
bool CEGUI::WidgetLookFeel::isStateImageryPresent ( const String state) const

Return whether imagery is defined for the given state.

Parameters
stateString object containing name of state to look for.
Returns
  • true if imagery exists for the specified state,
  • false if no imagery exists for the specified state.
void CEGUI::WidgetLookFeel::layoutChildWidgets ( const Window owner) const

Layout the child widgets defined for this WidgetLookFeel which are attached to the given window.

Parameters
ownerWindow object that has the child widgets that require laying out.
Returns
Nothing.

Referenced by CEGUI::Window::performChildWindowLayout().

void CEGUI::WidgetLookFeel::renameChildren ( const Window widget,
const String newBaseName 
) const

Uses the WindowManager to rename the child windows that are created for this WidgetLookFeel.

Parameters
widgetThe target Window containing the child windows that are to be renamed.
newBaseNameString object holding the new base name that will be used when constructing new names for the child windows.

References CEGUI::Window::getName(), and CEGUI::WindowManager::renameWindow().

Referenced by CEGUI::Window::rename().

void CEGUI::WidgetLookFeel::writeXMLToStream ( XMLSerializer xml_stream) const

Writes an xml representation of this WidgetLookFeel to out_stream.

Parameters
xml_streamStream where xml data should be output.
Returns
Nothing.

References CEGUI::XMLSerializer::attribute(), CEGUI::XMLSerializer::closeTag(), and CEGUI::XMLSerializer::openTag().

Referenced by CEGUI::WidgetLookManager::writeWidgetLookToStream().