Crazy Eddie's GUI System  0.8.6
CEGUI::StateImagery Class Reference

Class the encapsulates imagery for a given widget state. More...

+ Inheritance diagram for CEGUI::StateImagery:
+ Collaboration diagram for CEGUI::StateImagery:

Public Types

typedef std::vector< LayerSpecification *CEGUI_VECTOR_ALLOC(LayerSpecification *)> LayerSpecificationPointerList
 Container type for LayerSpecification pointers.
 
typedef ConstVectorIterator< LayersList > LayerIterator
 

Public Member Functions

 StateImagery ()
 Constructor.
 
 StateImagery (const String &name)
 Constructor. More...
 
void render (Window &srcWindow, const ColourRect *modcols=0, const Rectf *clipper=0) const
 Render imagery for this state. More...
 
void render (Window &srcWindow, const Rectf &baseRect, const ColourRect *modcols=0, const Rectf *clipper=0) const
 Render imagery for this state. More...
 
void addLayer (const LayerSpecification &layer)
 Add an imagery LayerSpecification to this state. More...
 
void sort ()
 Sorts the LayerSpecifications after their priority. Whenever a LayerSpecification, which has been added to this StateImagery, is changed, this sort function should be called.
 
void clearLayers ()
 Removed all LayerSpecifications from this state. More...
 
const StringgetName () const
 Return the name of this state. More...
 
void setName (const String &name)
 Set the name of this state. More...
 
bool isClippedToDisplay () const
 Return whether this state imagery should be clipped to the display rather than the target window. More...
 
void setClippedToDisplay (bool setting)
 Set whether this state imagery should be clipped to the display rather than the target window. More...
 
void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this StateImagery to out_stream. More...
 
LayerSpecificationPointerList getLayerSpecificationPointers ()
 Returns a vector of pointers to the LayerSpecifications that are currently added to this StateImagery. If a LayerSpecification is added or removed from this StateImagery, then the pointers in this vector are not valid anymore. The function should then be called again to retrieve valid pointers. More...
 
LayerIterator getLayerIterator () const
 

Detailed Description

Class the encapsulates imagery for a given widget state.

Member Typedef Documentation

Deprecated:
This type is deprecated and will be removed in the next version. A const reference to the Container type of getLayerSpecifications will replace this.

Constructor & Destructor Documentation

CEGUI::StateImagery::StateImagery ( const String name)

Constructor.

Parameters
nameName of the state

Member Function Documentation

void CEGUI::StateImagery::addLayer ( const LayerSpecification layer)

Add an imagery LayerSpecification to this state.

Parameters
layerLayerSpecification to be added to this state (will be copied)
Returns
Nothing.
void CEGUI::StateImagery::clearLayers ( )

Removed all LayerSpecifications from this state.

Returns
Nothing.
LayerIterator CEGUI::StateImagery::getLayerIterator ( ) const
Deprecated:
This function is deprecated. Instead the getLayerSpecifications will be used in the next version and getLayerSpecificationPointers can be used for editing.
LayerSpecificationPointerList CEGUI::StateImagery::getLayerSpecificationPointers ( )

Returns a vector of pointers to the LayerSpecifications that are currently added to this StateImagery. If a LayerSpecification is added or removed from this StateImagery, then the pointers in this vector are not valid anymore. The function should then be called again to retrieve valid pointers.

Note
Whenever a pointer from this list is changed in a way that the multiset needs to be resorted, the sort function of this class must be called.
Returns
A vector of pointers to the LayerSpecifications that are currently added to this StateImagery
const String& CEGUI::StateImagery::getName ( ) const

Return the name of this state.

Returns
String object holding the name of the StateImagery object.
bool CEGUI::StateImagery::isClippedToDisplay ( ) const

Return whether this state imagery should be clipped to the display rather than the target window.

Clipping to the display effectively implies that the imagery should be rendered unclipped.

/return

  • true if the imagery will be clipped to the display area.
  • false if the imagery will be clipped to the target window area.
void CEGUI::StateImagery::render ( Window srcWindow,
const ColourRect modcols = 0,
const Rectf clipper = 0 
) const

Render imagery for this state.

Parameters
srcWindowWindow to use when convering BaseDim values to pixels.
Returns
Nothing.
void CEGUI::StateImagery::render ( Window srcWindow,
const Rectf baseRect,
const ColourRect modcols = 0,
const Rectf clipper = 0 
) const

Render imagery for this state.

Parameters
srcWindowWindow to use when convering BaseDim values to pixels.
baseRectRect to use when convering BaseDim values to pixels.
Returns
Nothing.
void CEGUI::StateImagery::setClippedToDisplay ( bool  setting)

Set whether this state imagery should be clipped to the display rather than the target window.

Clipping to the display effectively implies that the imagery should be rendered unclipped.

Parameters
setting
  • true if the imagery should be clipped to the display area.
  • false if the imagery should be clipped to the target window area.
Returns
Nothing.
void CEGUI::StateImagery::setName ( const String name)

Set the name of this state.

Returns
String object holding the name of the StateImagery object.
void CEGUI::StateImagery::writeXMLToStream ( XMLSerializer xml_stream) const

Writes an xml representation of this StateImagery to out_stream.

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