Crazy Eddies GUI System
0.6.0
|
Common base class used for renderable components within an ImagerySection. More...
Public Member Functions | |
FalagardComponentBase () | |
Constructor. | |
virtual | ~FalagardComponentBase () |
Destructor. | |
void | render (Window &srcWindow, float base_z, const CEGUI::ColourRect *modColours=0, const Rect *clipper=0, bool clipToDisplay=false) const |
Render this component. More correctly, the component is cached for rendering. More... | |
void | render (Window &srcWindow, const Rect &baseRect, float base_z, const CEGUI::ColourRect *modColours=0, const Rect *clipper=0, bool clipToDisplay=false) const |
Render this component. More correctly, the component is cached for rendering. More... | |
const ComponentArea & | getComponentArea () const |
Return the ComponentArea of this ImageryComponent. More... | |
void | setComponentArea (const ComponentArea &area) |
Set the ImageryComponent's ComponentArea. More... | |
const ColourRect & | getColours () const |
Return the ColourRect set for use by this ImageryComponent. More... | |
void | setColours (const ColourRect &cols) |
Set the colours to be used by this ImageryComponent. More... | |
void | setColoursPropertySource (const String &property) |
Set the name of the property where colour values can be obtained. More... | |
void | setColoursPropertyIsColourRect (bool setting=true) |
Set whether the colours property source represents a full ColourRect. More... | |
void | setVertFormattingPropertySource (const String &property) |
Set the name of the property where vertical formatting option can be obtained. More... | |
void | setHorzFormattingPropertySource (const String &property) |
Set the name of the property where horizontal formatting option can be obtained. More... | |
Protected Member Functions | |
void | initColoursRect (const Window &wnd, const ColourRect *modCols, ColourRect &cr) const |
Helper method to initialise a ColourRect with appropriate values according to the way the ImageryComponent is set up. More... | |
virtual void | render_impl (Window &srcWindow, Rect &destRect, float base_z, const CEGUI::ColourRect *modColours, const Rect *clipper, bool clipToDisplay) const =0 |
Method to do main render caching work. | |
bool | writeColoursXML (XMLSerializer &xml_stream) const |
Writes xml for the colours to a OutStream. Will prefer property colours before explicit. More... | |
bool | writeVertFormatXML (XMLSerializer &xml_stream) const |
Writes xml for the vertical formatting to a OutStream if such a property is defined. More... | |
bool | writeHorzFormatXML (XMLSerializer &xml_stream) const |
Writes xml for the horizontal formatting to a OutStream if such a property is defined. More... | |
Protected Attributes | |
ComponentArea | d_area |
Destination area for this component. | |
ColourRect | d_colours |
base colours to be applied when rendering the image component. | |
String | d_colourPropertyName |
name of property to fetch colours from. | |
bool | d_colourProperyIsRect |
true if the colour property will fetch a full ColourRect. | |
String | d_vertFormatPropertyName |
name of property to fetch vertical formatting setting from. | |
String | d_horzFormatPropertyName |
name of property to fetch horizontal formatting setting from. | |
Common base class used for renderable components within an ImagerySection.
const ColourRect & CEGUI::FalagardComponentBase::getColours | ( | ) | const |
Return the ColourRect set for use by this ImageryComponent.
References d_colours.
const ComponentArea & CEGUI::FalagardComponentBase::getComponentArea | ( | ) | const |
Return the ComponentArea of this ImageryComponent.
References d_area.
|
protected |
Helper method to initialise a ColourRect with appropriate values according to the way the ImageryComponent is set up.
This will try and get values from multiple places:
References d_colourPropertyName, d_colourProperyIsRect, d_colours, CEGUI::String::empty(), and CEGUI::PropertySet::getProperty().
Referenced by CEGUI::FrameComponent::render_impl(), CEGUI::ImageryComponent::render_impl(), and CEGUI::TextComponent::render_impl().
void CEGUI::FalagardComponentBase::render | ( | Window & | srcWindow, |
float | base_z, | ||
const CEGUI::ColourRect * | modColours = 0 , |
||
const Rect * | clipper = 0 , |
||
bool | clipToDisplay = false |
||
) | const |
Render this component. More correctly, the component is cached for rendering.
srcWindow | Window to use as the base for translating the component's ComponentArea into pixel values. |
base_z | The z value to use for rendering the component. Note that this is not the final z value to use, but some z offset from a currently unknown starting value. |
modColours | ColourRect describing colours that are to be modulated with the component's stored colour values to calculate a set of 'final' colour values to be used. May be 0. |
References d_area, CEGUI::ComponentArea::getPixelRect(), and render_impl().
void CEGUI::FalagardComponentBase::render | ( | Window & | srcWindow, |
const Rect & | baseRect, | ||
float | base_z, | ||
const CEGUI::ColourRect * | modColours = 0 , |
||
const Rect * | clipper = 0 , |
||
bool | clipToDisplay = false |
||
) | const |
Render this component. More correctly, the component is cached for rendering.
srcWindow | Window to use as the base for translating the component's ComponentArea into pixel values. |
baseRect | Rect to use as the base for translating the component's ComponentArea into pixel values. |
base_z | The z value to use for rendering the component. Note that this is not the final z value to use, but some z offset from a currently unknown starting value. |
modColours | ColourRect describing colours that are to be modulated with the component's stored colour values to calculate a set of 'final' colour values to be used. May be 0. |
References d_area, CEGUI::ComponentArea::getPixelRect(), and render_impl().
void CEGUI::FalagardComponentBase::setColours | ( | const ColourRect & | cols | ) |
Set the colours to be used by this ImageryComponent.
cols | ColourRect object describing the colours to be used by this ImageryComponent. |
References d_colours.
void CEGUI::FalagardComponentBase::setColoursPropertyIsColourRect | ( | bool | setting = true | ) |
Set whether the colours property source represents a full ColourRect.
setting |
|
References d_colourProperyIsRect.
void CEGUI::FalagardComponentBase::setColoursPropertySource | ( | const String & | property | ) |
Set the name of the property where colour values can be obtained.
property | String containing the name of the property. |
References d_colourPropertyName.
void CEGUI::FalagardComponentBase::setComponentArea | ( | const ComponentArea & | area | ) |
Set the ImageryComponent's ComponentArea.
area | ComponentArea object describing a new target area for the ImageryComponent. |
References d_area.
void CEGUI::FalagardComponentBase::setHorzFormattingPropertySource | ( | const String & | property | ) |
Set the name of the property where horizontal formatting option can be obtained.
property | String containing the name of the property. |
References d_horzFormatPropertyName.
void CEGUI::FalagardComponentBase::setVertFormattingPropertySource | ( | const String & | property | ) |
Set the name of the property where vertical formatting option can be obtained.
property | String containing the name of the property. |
References d_vertFormatPropertyName.
|
protected |
Writes xml for the colours to a OutStream. Will prefer property colours before explicit.
References CEGUI::XMLSerializer::attribute(), CEGUI::XMLSerializer::closeTag(), d_colourPropertyName, d_colourProperyIsRect, d_colours, CEGUI::String::empty(), CEGUI::ColourRect::isMonochromatic(), and CEGUI::XMLSerializer::openTag().
Referenced by CEGUI::ImageryComponent::writeXMLToStream(), CEGUI::TextComponent::writeXMLToStream(), and CEGUI::FrameComponent::writeXMLToStream().
|
protected |
Writes xml for the horizontal formatting to a OutStream if such a property is defined.
References CEGUI::XMLSerializer::attribute(), CEGUI::XMLSerializer::closeTag(), d_horzFormatPropertyName, CEGUI::String::empty(), and CEGUI::XMLSerializer::openTag().
Referenced by CEGUI::ImageryComponent::writeXMLToStream(), CEGUI::TextComponent::writeXMLToStream(), and CEGUI::FrameComponent::writeXMLToStream().
|
protected |
Writes xml for the vertical formatting to a OutStream if such a property is defined.
References CEGUI::XMLSerializer::attribute(), CEGUI::XMLSerializer::closeTag(), d_vertFormatPropertyName, CEGUI::String::empty(), and CEGUI::XMLSerializer::openTag().
Referenced by CEGUI::ImageryComponent::writeXMLToStream(), CEGUI::TextComponent::writeXMLToStream(), and CEGUI::FrameComponent::writeXMLToStream().