Crazy Eddie's GUI System  0.8.4
CEGUI::WidgetLookFeel Class Reference

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

+ Inheritance diagram for CEGUI::WidgetLookFeel:
+ Collaboration diagram for CEGUI::WidgetLookFeel:

List of all members.

Public Types

typedef std::vector
< PropertyInitialiser
CEGUI_VECTOR_ALLOC(PropertyInitialiser)> 
PropertyList
typedef std::vector
< PropertyDefinitionBase
*CEGUI_VECTOR_ALLOC(PropertyDefinitionBase *) 
PropertyDefinitionList )
typedef std::vector
< PropertyDefinitionBase
*CEGUI_VECTOR_ALLOC(PropertyDefinitionBase *) 
PropertyLinkDefinitionList )
typedef std::set< String,
StringFastLessCompare
CEGUI_SET_ALLOC(String)> 
StringSet
typedef ConstMapIterator
< StateList > 
StateIterator
typedef ConstMapIterator
< ImageryList > 
ImageryIterator
typedef ConstMapIterator
< NamedAreaList > 
NamedAreaIterator
typedef ConstVectorIterator
< WidgetComponentCollator
WidgetComponentIterator
typedef ConstVectorIterator
< PropertyDefinitionCollator
PropertyDefinitionIterator
typedef ConstVectorIterator
< PropertyLinkDefinitionCollator
PropertyLinkDefinitionIterator
typedef ConstVectorIterator
< PropertyInitialiserCollator
PropertyInitialiserIterator
typedef ConstVectorIterator
< EventLinkDefinitionCollator
EventLinkDefinitionIterator
typedef ConstVectorIterator
< AnimationNameSet > 
AnimationNameIterator

Public Member Functions

 WidgetLookFeel (const String &name, const String &inherits)
 WidgetLookFeel (const WidgetLookFeel &other)
WidgetLookFeeloperator= (const WidgetLookFeel &other)
const StateImagerygetStateImagery (const CEGUI::String &state) const
 Return a const reference to the StateImagery object for the specified state.
const ImagerySectiongetImagerySection (const CEGUI::String &section) const
 Return a const reference to the ImagerySection object with the specified name.
const StringgetName () const
 Return the name of the widget look.
void addImagerySection (const ImagerySection &section)
 Add an ImagerySection to the WidgetLookFeel.
void renameImagerySection (const String &oldName, const String &newName)
void addWidgetComponent (const WidgetComponent &widget)
 Add a WidgetComponent to the WidgetLookFeel.
void addStateSpecification (const StateImagery &state)
 Add a state specification (StateImagery object) to the WidgetLookFeel.
void addPropertyInitialiser (const PropertyInitialiser &initialiser)
 Add a property initialiser to the WidgetLookFeel.
void clearImagerySections ()
 Clear all ImagerySections from the WidgetLookFeel.
void clearWidgetComponents ()
 Clear all WidgetComponents from the WidgetLookFeel.
void clearStateSpecifications ()
 Clear all StateImagery objects from the WidgetLookFeel.
void clearPropertyInitialisers ()
 Clear all PropertyInitialiser objects from the WidgetLookFeel.
void initialiseWidget (Window &widget) const
 Initialise the given window using PropertyInitialsers and component widgets specified for this WidgetLookFeel.
void cleanUpWidget (Window &widget) const
 Clean up the given window from all properties and component widgets created by this WidgetLookFeel.
bool isStateImageryPresent (const String &state) const
 Return whether imagery is defined for the given state.
void addNamedArea (const NamedArea &area)
 Adds a named area to the WidgetLookFeel.
void clearNamedAreas ()
 Clear all defined named areas from the WidgetLookFeel.
const NamedAreagetNamedArea (const String &name) const
 Return the NamedArea with the specified name.
void renameNamedArea (const String &oldName, const String &newName)
bool isNamedAreaDefined (const String &name) const
 return whether a NamedArea object with the specified name exists for this WidgetLookFeel.
void layoutChildWidgets (const Window &owner) const
 Layout the child widgets defined for this WidgetLookFeel which are attached to the given window.
void addPropertyDefinition (PropertyDefinitionBase *propdef)
 Adds a property definition to the WidgetLookFeel.
void addPropertyLinkDefinition (PropertyDefinitionBase *propdef)
 Adds a property link definition to the WidgetLookFeel.
void clearPropertyDefinitions ()
 Clear all defined property definitions from the WidgetLookFeel.
void clearPropertyLinkDefinitions ()
 Clear all defined property link definitions from the WidgetLookFeel.
void addAnimationName (const String &anim_name)
 Add the name of an animation that is associated with the WidgetLookFeel.
void addEventLinkDefinition (const EventLinkDefinition &evtdef)
 adds an event link definition to the WidgetLookFeel.
void clearEventLinkDefinitions ()
 clear all defined event link definitions from the WidgetLookFeel.
void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this WidgetLookFeel to out_stream.
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.
const WidgetComponentfindWidgetComponent (const String &name) const
 Takes the name for a widget component and returns a pointer to it if it exists or 0 if it does'nt.
const PropertyDefinitionList & getPropertyDefinitions () const
const PropertyLinkDefinitionList & getPropertyLinkDefinitions () const
const PropertyListgetProperties () const
bool handleFontRenderSizeChange (Window &window, const Font *font) const
 perform any processing required due to the given font having changed.
StringSet getStateNames (bool inherits=false) const
StringSet getImageryNames (bool inherits=false) const
StringSet getNamedAreaNames (bool inherits=false) const
StringSet getWidgetNames (bool inherits=false) const
StringSet getPropertyDefinitionNames (bool inherits=false) const
StringSet getPropertyLinkDefinitionNames (bool inherits=false) const
StringSet getPropertyInitialiserNames (bool inherits=false) const
StringSet getEventLinkDefinitionNames (bool inherits=false) const
StringSet getAnimationNames (bool inherits=false) const
StateIterator getStateIterator (bool inherits=false) const
ImageryIterator getImageryIterator (bool inherits=false) const
NamedAreaIterator getNamedAreaIterator (bool inherits=false) const
WidgetComponentIterator getWidgetComponentIterator (bool inherits=false) const
PropertyDefinitionIterator getPropertyDefinitionIterator (bool inherits=false) const
PropertyLinkDefinitionIterator getPropertyLinkDefinitionIterator (bool inherits=false) const
PropertyInitialiserIterator getPropertyInitialiserIterator (bool inherits=false) const
EventLinkDefinitionIterator getEventLinkDefinitionIterator (bool inherits=false) const
AnimationNameIterator getAnimationNameIterator (bool inherits=false) 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::addAnimationName ( const String anim_name)

Add the name of an animation that is associated with the WidgetLookFeel.

Parameters:
anim_nameReference to a String object that contains the name of the animation to be associated with this WidgetLookFeel.

Add an ImagerySection to the WidgetLookFeel.

Parameters:
sectionImagerySection object to be added.
Returns:
Nothing.

Adds a named area to the WidgetLookFeel.

Parameters:
areaNamedArea to be added.
Returns:
Nothing.

Adds a property definition to the WidgetLookFeel.

Parameters:
propdefPropertyDefinition object to be added.
Returns:
Nothing.

Add a property initialiser to the WidgetLookFeel.

Parameters:
initialiserPropertyInitialiser object to be added.
Returns:
Nothing.

Adds a property link definition to the WidgetLookFeel.

Parameters:
propdefPropertyLinkDefinition object to be added.
Returns:
Nothing.

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

Parameters:
sectionStateImagery object to be added.
Returns:
Nothing.

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.

Clear all ImagerySections from the WidgetLookFeel.

Returns:
Nothing.

Clear all defined named areas from the WidgetLookFeel.

Returns:
Nothing.

Clear all defined property definitions from the WidgetLookFeel.

Returns:
Nothing.

Clear all PropertyInitialiser objects from the WidgetLookFeel.

Returns:
Nothing.

Clear all defined property link definitions from the WidgetLookFeel.

Returns:
Nothing.

Clear all StateImagery objects from the WidgetLookFeel.

Returns:
Nothing.

Clear all WidgetComponents from the WidgetLookFeel.

Returns:
Nothing.

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.

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

Parameters:
nameThe name of the Child component to look for.

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

Returns:
ImagerySection object with the specified name.

Return the name of the widget look.

Returns:
String object holding the name of the WidgetLookFeel.
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.

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

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

Returns:
StateImagery object for the requested state.

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

Parameters:
widgetWindow based object to be initialised.
Returns:
Nothing.
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.

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.

Writes an xml representation of this WidgetLookFeel to out_stream.

Parameters:
xml_streamStream where xml data should be output.
Returns:
Nothing.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends