CEGUI::ImagerySection Class Reference

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

Collaboration diagram for CEGUI::ImagerySection:

Collaboration graph
[legend]

List of all members.

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, float base_z, const CEGUI::ColourRect *modColours=0, const Rect *clipper=0, bool clipToDisplay=false) const
 Render the ImagerySection.
void render (Window &srcWindow, const Rect &baseRect, float base_z, const CEGUI::ColourRect *modColours=0, const Rect *clipper=0, bool clipToDisplay=false) const
 Render the ImagerySection.
void addImageryComponent (const ImageryComponent &img)
 Add an ImageryComponent to this ImagerySection.
void clearImageryComponents ()
 Clear all ImageryComponents from this ImagerySection.
void addTextComponent (const TextComponent &text)
 Add a TextComponent to this ImagerySection.
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.
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 setMasterColoursPropertySource (const String &property)
 Set the name of the property where master colour values can be obtained.
void setMasterColoursPropertyIsColourRect (bool setting=true)
 Set whether the master colours property source represents a full ColourRect.
Rect getBoundingRect (const Window &wnd) const
 Return smallest Rect that could contain all imagery within this section.
Rect getBoundingRect (const Window &wnd, const Rect &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.

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

CEGUI::ImagerySection::ImagerySection ( const String name  ) 

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

Parameters:
name Name of the new ImagerySection.


Member Function Documentation

void CEGUI::ImagerySection::addFrameComponent ( const FrameComponent frame  ) 

Add a FrameComponent to this ImagerySection.

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

void CEGUI::ImagerySection::addImageryComponent ( const ImageryComponent img  ) 

Add an ImageryComponent to this ImagerySection.

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

void CEGUI::ImagerySection::addTextComponent ( const TextComponent text  ) 

Add a TextComponent to this ImagerySection.

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

void CEGUI::ImagerySection::clearFrameComponents (  ) 

Clear all FrameComponents from this ImagerySection.

Returns:
Nothing

void CEGUI::ImagerySection::clearImageryComponents (  ) 

Clear all ImageryComponents from this ImagerySection.

Returns:
Nothing

void CEGUI::ImagerySection::clearTextComponents (  ) 

Clear all TextComponents from this ImagerySection.

Returns:
Nothing

const ColourRect & CEGUI::ImagerySection::getMasterColours (  )  const

Return the current master colours set for this ImagerySection.

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

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

Return the name of this ImagerySection.

Returns:
String object holding the name of the ImagerySection.

Referenced by CEGUI::WidgetLookFeel::addImagerySection().

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.

References CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, CEGUI::ColourRect::d_top_left, CEGUI::ColourRect::d_top_right, CEGUI::String::empty(), and CEGUI::PropertySet::getProperty().

Referenced by render().

void CEGUI::ImagerySection::render ( Window srcWindow,
const Rect baseRect,
float  base_z,
const CEGUI::ColourRect modColours = 0,
const Rect clipper = 0,
bool  clipToDisplay = false 
) const

Render the ImagerySection.

Parameters:
srcWindow Window object to be used when calculating pixel values from BaseDim values.
baseRect Rect object to be used when calculating pixel values from BaseDim values.
base_z base z value to be used for all imagery in the section.
modColours ColourRect specifying colours to be modulated with the ImagerySection's master colours. May be 0.
Returns:
Nothing.

References CEGUI::ColourRect::d_top_left, CEGUI::colour::getARGB(), initMasterColourRect(), and CEGUI::ColourRect::isMonochromatic().

void CEGUI::ImagerySection::render ( Window srcWindow,
float  base_z,
const CEGUI::ColourRect modColours = 0,
const Rect clipper = 0,
bool  clipToDisplay = false 
) const

Render the ImagerySection.

Parameters:
srcWindow Window object to be used when calculating pixel values from BaseDim values.
base_z base z value to be used for all imagery in the section.
modColours ColourRect specifying colours to be modulated with the ImagerySection's master colours. May be 0.
Returns:
Nothing.

References CEGUI::ColourRect::d_top_left, CEGUI::colour::getARGB(), initMasterColourRect(), and CEGUI::ColourRect::isMonochromatic().

Referenced by CEGUI::FalagardMultiLineEditbox::cacheCaratImagery(), CEGUI::FalagardEditbox::render(), and CEGUI::SectionSpecification::render().

void CEGUI::ImagerySection::setMasterColours ( const ColourRect cols  ) 

Set the master colours to be used for this ImagerySection.

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

void CEGUI::ImagerySection::setMasterColoursPropertyIsColourRect ( bool  setting = true  ) 

Set whether the master colours property source represents a full ColourRect.

Parameters:
setting 
  • true if the master colours property will access a ColourRect object.
  • false if the master colours property will access a colour object.
Returns:
Nothing.

void CEGUI::ImagerySection::setMasterColoursPropertySource ( const String property  ) 

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

Parameters:
property String containing the name of the property.
Returns:
Nothing.

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


Generated on Thu Nov 27 20:34:41 2008 for Crazy Eddies GUI System by  doxygen 1.5.7.1