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

Class that encapsulates a re-usable collection of imagery specifications. More...

+ Inheritance diagram for CEGUI::ImagerySection:
+ Collaboration diagram for CEGUI::ImagerySection:

List of all members.

Public Types

typedef ConstVectorIterator
< ImageryList > 
ImageryComponentIterator
typedef ConstVectorIterator
< TextList > 
TextComponentIterator
typedef ConstVectorIterator
< FrameList > 
FrameComponentIterator

Public Member Functions

 ImagerySection ()
 Constructor.
 ImagerySection (const String &name)
 ImagerySection constructor. Name must be supplied, masterColours are set to 0xFFFFFFFF by default.
void render (Window &srcWindow, const CEGUI::ColourRect *modColours=0, const Rectf *clipper=0, bool clipToDisplay=false) const
 Render the ImagerySection.
void render (Window &srcWindow, const Rectf &baseRect, const CEGUI::ColourRect *modColours=0, const Rectf *clipper=0, bool clipToDisplay=false) const
 Render the ImagerySection.
void addImageryComponent (const ImageryComponent &img)
 Add an ImageryComponent to this ImagerySection.
void removeImageryComponent (const ImageryComponent &img)
void clearImageryComponents ()
 Clear all ImageryComponents from this ImagerySection.
void addTextComponent (const TextComponent &text)
 Add a TextComponent to this ImagerySection.
void removeTextComponent (const TextComponent &text)
void clearTextComponents ()
 Clear all TextComponents from this ImagerySection.
void clearFrameComponents ()
 Clear all FrameComponents from this ImagerySection.
void addFrameComponent (const FrameComponent &frame)
 Add a FrameComponent to this ImagerySection.
void removeFrameComponent (const FrameComponent &frame)
const ColourRectgetMasterColours () const
 Return the current master colours set for this ImagerySection.
void setMasterColours (const ColourRect &cols)
 Set the master colours to be used for this ImagerySection.
const StringgetName () const
 Return the name of this ImagerySection.
void setName (const String &name)
 Sets the name of this ImagerySection.
const StringgetMasterColoursPropertySource () const
 Get the name of the property where master colour values can be obtained.
void setMasterColoursPropertySource (const String &property)
 Set the name of the property where master colour values can be obtained.
Rectf getBoundingRect (const Window &wnd) const
 Return smallest Rect that could contain all imagery within this section.
Rectf getBoundingRect (const Window &wnd, const Rectf &rect) const
 Return smallest Rect that could contain all imagery within this section.
void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this ImagerySection to out_stream.
bool handleFontRenderSizeChange (Window &window, const Font *font) const
 perform any processing required due to the given font having changed.
ImageryComponentIterator getImageryComponentIterator () const
 Return a ImagerySection::ImageryComponentIterator object to iterate over the ImageryComponent elements currently added to the ImagerySection.
TextComponentIterator getTextComponentIterator () const
 Return a ImagerySection::TextComponentIterator object to iterate over the TextComponent elements currently added to the ImagerySection.
FrameComponentIterator getFrameComponentIterator () const
 Return a ImagerySection::FrameComponentIterator object to iterate over the FrameComponent elements currently added to the ImagerySection.

Protected Member Functions

void initMasterColourRect (const Window &wnd, ColourRect &cr) const
 Helper method to initialise a ColourRect with appropriate values according to the way the ImagerySection is set up.

Detailed Description

Class that encapsulates a re-usable collection of imagery specifications.


Constructor & Destructor Documentation

ImagerySection constructor. Name must be supplied, masterColours are set to 0xFFFFFFFF by default.

Parameters:
nameName of the new ImagerySection.

Member Function Documentation

Add a FrameComponent to this ImagerySection.

Parameters:
frameFrameComponent to be added to the section (a copy is made)
Returns:
Nothing

Add an ImageryComponent to this ImagerySection.

Parameters:
imgImageryComponent to be added to the section (a copy is made)
Returns:
Nothing

Add a TextComponent to this ImagerySection.

Parameters:
textTextComponent to be added to the section (a copy is made)
Returns:
Nothing

Clear all FrameComponents from this ImagerySection.

Returns:
Nothing

Clear all ImageryComponents from this ImagerySection.

Returns:
Nothing

Clear all TextComponents from this ImagerySection.

Returns:
Nothing

Return the current master colours set for this ImagerySection.

Returns:
ColourRect describing the master colour values in use for this ImagerySection.

Get the name of the property where master colour values can be obtained.

Returns:
String containing the name of the property.

Return the name of this ImagerySection.

Returns:
String object holding the name of the ImagerySection.
void CEGUI::ImagerySection::initMasterColourRect ( const Window wnd,
ColourRect cr 
) const [protected]

Helper method to initialise a ColourRect with appropriate values according to the way the ImagerySection is set up.

This will try and get values from multiple places:

  • a property attached to wnd
  • or the integral d_masterColours value.
void CEGUI::ImagerySection::render ( Window srcWindow,
const CEGUI::ColourRect modColours = 0,
const Rectf clipper = 0,
bool  clipToDisplay = false 
) const

Render the ImagerySection.

Parameters:
srcWindowWindow object to be used when calculating pixel values from BaseDim values.
modColoursColourRect specifying colours to be modulated with the ImagerySection's master colours. May be 0.
Returns:
Nothing.
void CEGUI::ImagerySection::render ( Window srcWindow,
const Rectf baseRect,
const CEGUI::ColourRect modColours = 0,
const Rectf clipper = 0,
bool  clipToDisplay = false 
) const

Render the ImagerySection.

Parameters:
srcWindowWindow object to be used when calculating pixel values from BaseDim values.
baseRectRect object to be used when calculating pixel values from BaseDim values.
modColoursColourRect specifying colours to be modulated with the ImagerySection's master colours. May be 0.
Returns:
Nothing.

Set the master colours to be used for this ImagerySection.

Parameters:
colsColourRect describing the colours to be set as the master colours for this ImagerySection.
Returns:
Nothing.

Set the name of the property where master colour values can be obtained.

Parameters:
propertyString containing the name of the property.
Returns:
Nothing.
void CEGUI::ImagerySection::setName ( const String name)

Sets the name of this ImagerySection.

Parameters:
nameString object holding the name of the ImagerySection.
Returns:
Nothing.

Writes an xml representation of this ImagerySection to out_stream.

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