Common base class used for renderable components within an ImagerySection.
More...
#include <ComponentBase.h>
Inherits CEGUI::AllocatedObject< FalagardComponentBase >.
Inherited by CEGUI::FrameComponent, CEGUI::ImageryComponent, and CEGUI::TextComponent.
|
void | render (Window &srcWindow, const CEGUI::ColourRect *modColours=0, const Rectf *clipper=0, bool clipToDisplay=false) const |
| Render this component. More correctly, the component is cached for rendering. More...
|
|
void | render (Window &srcWindow, const Rectf &baseRect, const CEGUI::ColourRect *modColours=0, const Rectf *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 component. More...
|
|
void | setComponentArea (const ComponentArea &area) |
| Set the conponent's ComponentArea. More...
|
|
const ColourRect & | getColours () const |
| Return the ColourRect used by this component. More...
|
|
void | setColours (const ColourRect &cols) |
| Set the colours to be used by this component. More...
|
|
const String & | getColoursPropertySource () const |
| Returns the name of the property from which the colour values will be obtained, if set. More...
|
|
void | setColoursPropertySource (const String &property) |
| Set the name of the property where colour values will be obtained, if set. More...
|
|
virtual bool | handleFontRenderSizeChange (Window &window, const Font *font) const |
| perform any processing required due to the given font having changed. More...
|
|
|
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.
|
|
Common base class used for renderable components within an ImagerySection.
◆ getColours()
const ColourRect & CEGUI::FalagardComponentBase::getColours |
( |
| ) |
const |
Return the ColourRect used by this component.
- Returns
- ColourRect object holding the colours currently in use by this component.
◆ getColoursPropertySource()
const String & CEGUI::FalagardComponentBase::getColoursPropertySource |
( |
| ) |
const |
Returns the name of the property from which the colour values will be obtained, if set.
- Returns
- String object holding the name of the property.
◆ getComponentArea()
const ComponentArea & CEGUI::FalagardComponentBase::getComponentArea |
( |
| ) |
const |
◆ handleFontRenderSizeChange()
virtual bool CEGUI::FalagardComponentBase::handleFontRenderSizeChange |
( |
Window & |
window, |
|
|
const Font * |
font |
|
) |
| const |
|
virtual |
perform any processing required due to the given font having changed.
Reimplemented in CEGUI::TextComponent.
◆ initColoursRect()
Helper function to initialise a ColourRect with appropriate values according to the way the component is set up.
This will try and get values from multiple places:
- a property attached to wnd
- or the integral d_colours value.
◆ render() [1/2]
void CEGUI::FalagardComponentBase::render |
( |
Window & |
srcWindow, |
|
|
const CEGUI::ColourRect * |
modColours = 0 , |
|
|
const Rectf * |
clipper = 0 , |
|
|
bool |
clipToDisplay = false |
|
) |
| const |
Render this component. More correctly, the component is cached for rendering.
- Parameters
-
srcWindow | Window to use as the base for translating the component's ComponentArea into pixel values. |
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. |
◆ render() [2/2]
void CEGUI::FalagardComponentBase::render |
( |
Window & |
srcWindow, |
|
|
const Rectf & |
baseRect, |
|
|
const CEGUI::ColourRect * |
modColours = 0 , |
|
|
const Rectf * |
clipper = 0 , |
|
|
bool |
clipToDisplay = false |
|
) |
| const |
Render this component. More correctly, the component is cached for rendering.
- Parameters
-
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. |
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. |
◆ render_impl()
virtual void CEGUI::FalagardComponentBase::render_impl |
( |
Window & |
srcWindow, |
|
|
Rectf & |
destRect, |
|
|
const CEGUI::ColourRect * |
modColours, |
|
|
const Rectf * |
clipper, |
|
|
bool |
clipToDisplay |
|
) |
| const |
|
protectedpure virtual |
◆ setColours()
void CEGUI::FalagardComponentBase::setColours |
( |
const ColourRect & |
cols | ) |
|
Set the colours to be used by this component.
- Parameters
-
cols | ColourRect object describing the colours to be used by this component. |
◆ setColoursPropertySource()
void CEGUI::FalagardComponentBase::setColoursPropertySource |
( |
const String & |
property | ) |
|
Set the name of the property where colour values will be obtained, if set.
- Parameters
-
property | String containing the name of the property. |
◆ setComponentArea()
void CEGUI::FalagardComponentBase::setComponentArea |
( |
const ComponentArea & |
area | ) |
|
◆ writeColoursXML()
bool CEGUI::FalagardComponentBase::writeColoursXML |
( |
XMLSerializer & |
xml_stream | ) |
const |
|
protected |
Writes xml for the colours to a OutStream. Will prefer property colours before explicit.
- Note
- This is intended as a helper function for sub-classes when outputting xml to a stream.
- Returns
- true if xml element was written.
- false if nothing was output due to the formatting not being set (sub-class may then choose to do something else.)