Crazy Eddies GUI System
0.7.8
|
Class that encapsulates a re-usable collection of imagery specifications. More...
Public Member Functions | |
ImagerySection () | |
Constructor. | |
ImagerySection (const String &name) | |
ImagerySection constructor. Name must be supplied, masterColours are set to 0xFFFFFFFF by default. More... | |
void | render (Window &srcWindow, const CEGUI::ColourRect *modColours=0, const Rect *clipper=0, bool clipToDisplay=false) const |
Render the ImagerySection. More... | |
void | render (Window &srcWindow, const Rect &baseRect, const CEGUI::ColourRect *modColours=0, const Rect *clipper=0, bool clipToDisplay=false) const |
Render the ImagerySection. More... | |
void | addImageryComponent (const ImageryComponent &img) |
Add an ImageryComponent to this ImagerySection. More... | |
void | clearImageryComponents () |
Clear all ImageryComponents from this ImagerySection. More... | |
void | addTextComponent (const TextComponent &text) |
Add a TextComponent to this ImagerySection. More... | |
void | clearTextComponents () |
Clear all TextComponents from this ImagerySection. More... | |
void | clearFrameComponents () |
Clear all FrameComponents from this ImagerySection. More... | |
void | addFrameComponent (const FrameComponent &frame) |
Add a FrameComponent to this ImagerySection. More... | |
const ColourRect & | getMasterColours () const |
Return the current master colours set for this ImagerySection. More... | |
void | setMasterColours (const ColourRect &cols) |
Set the master colours to be used for this ImagerySection. More... | |
const String & | getName () const |
Return the name of this ImagerySection. More... | |
void | setMasterColoursPropertySource (const String &property) |
Set the name of the property where master colour values can be obtained. More... | |
void | setMasterColoursPropertyIsColourRect (bool setting=true) |
Set whether the master colours property source represents a full ColourRect. More... | |
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. More... | |
size_t | getTextComponentCount () const |
return number of TextComponents in the ImagerySection. | |
const TextComponent & | getTextComponent (const size_t idx) const |
return a reference to a TextComponent (via index). | |
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. More... | |
Class that encapsulates a re-usable collection of imagery specifications.
CEGUI::ImagerySection::ImagerySection | ( | const String & | name | ) |
ImagerySection constructor. Name must be supplied, masterColours are set to 0xFFFFFFFF by default.
name | Name of the new ImagerySection. |
void CEGUI::ImagerySection::addFrameComponent | ( | const FrameComponent & | frame | ) |
Add a FrameComponent to this ImagerySection.
frame | FrameComponent to be added to the section (a copy is made) |
void CEGUI::ImagerySection::addImageryComponent | ( | const ImageryComponent & | img | ) |
Add an ImageryComponent to this ImagerySection.
img | ImageryComponent to be added to the section (a copy is made) |
void CEGUI::ImagerySection::addTextComponent | ( | const TextComponent & | text | ) |
Add a TextComponent to this ImagerySection.
text | TextComponent to be added to the section (a copy is made) |
void CEGUI::ImagerySection::clearFrameComponents | ( | ) |
Clear all FrameComponents from this ImagerySection.
void CEGUI::ImagerySection::clearImageryComponents | ( | ) |
Clear all ImageryComponents from this ImagerySection.
void CEGUI::ImagerySection::clearTextComponents | ( | ) |
Clear all TextComponents from this ImagerySection.
const ColourRect& CEGUI::ImagerySection::getMasterColours | ( | ) | const |
Return the current master colours set for this ImagerySection.
const String& CEGUI::ImagerySection::getName | ( | ) | const |
Return the name of this ImagerySection.
|
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:
void CEGUI::ImagerySection::render | ( | Window & | srcWindow, |
const CEGUI::ColourRect * | modColours = 0 , |
||
const Rect * | clipper = 0 , |
||
bool | clipToDisplay = false |
||
) | const |
Render the ImagerySection.
srcWindow | Window object to be used when calculating pixel values from BaseDim values. |
modColours | ColourRect specifying colours to be modulated with the ImagerySection's master colours. May be 0. |
void CEGUI::ImagerySection::render | ( | Window & | srcWindow, |
const Rect & | baseRect, | ||
const CEGUI::ColourRect * | modColours = 0 , |
||
const Rect * | clipper = 0 , |
||
bool | clipToDisplay = false |
||
) | const |
Render the ImagerySection.
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. |
modColours | ColourRect specifying colours to be modulated with the ImagerySection's master colours. May be 0. |
void CEGUI::ImagerySection::setMasterColours | ( | const ColourRect & | cols | ) |
Set the master colours to be used for this ImagerySection.
cols | ColourRect describing the colours to be set as the master colours for this ImagerySection. |
void CEGUI::ImagerySection::setMasterColoursPropertyIsColourRect | ( | bool | setting = true | ) |
Set whether the master colours property source represents a full ColourRect.
setting |
|
void CEGUI::ImagerySection::setMasterColoursPropertySource | ( | const String & | property | ) |
Set the name of the property where master colour values can be obtained.
property | String containing the name of the property. |
void CEGUI::ImagerySection::writeXMLToStream | ( | XMLSerializer & | xml_stream | ) | const |
Writes an xml representation of this ImagerySection to out_stream.
xml_stream | Stream where xml data should be output. |