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

Common base class used for renderable components within an ImagerySection. More...

Inherits CEGUI::AllocatedObject< FalagardComponentBase >.

Inherited by CEGUI::FrameComponent, CEGUI::ImageryComponent, and CEGUI::TextComponent.

+ Collaboration diagram for CEGUI::FalagardComponentBase:

List of all members.

Public Member Functions

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.
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.
const ComponentAreagetComponentArea () const
 Return the ComponentArea of this component.
void setComponentArea (const ComponentArea &area)
 Set the conponent's ComponentArea.
const ColourRectgetColours () const
 Return the ColourRect used by this component.
void setColours (const ColourRect &cols)
 Set the colours to be used by this component.
void setColoursPropertySource (const String &property)
 Set the name of the property where colour values can be obtained.
virtual bool handleFontRenderSizeChange (Window &window, const Font *font) const
 perform any processing required due to the given font having changed.

Protected Member Functions

void initColoursRect (const Window &wnd, const ColourRect *modCols, ColourRect &cr) const
 Helper function to initialise a ColourRect with appropriate values according to the way the component is set up.
virtual void render_impl (Window &srcWindow, Rectf &destRect, const CEGUI::ColourRect *modColours, const Rectf *clipper, bool clipToDisplay) const =0
 Function 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.

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.

Detailed Description

Common base class used for renderable components within an ImagerySection.


Member Function Documentation

Return the ColourRect used by this component.

Returns:
ColourRect object holding the colours currently in use by this component.

Return the ComponentArea of this component.

Returns:
ComponentArea object describing the component's current target area.
void CEGUI::FalagardComponentBase::initColoursRect ( const Window wnd,
const ColourRect modCols,
ColourRect cr 
) const [protected]

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.
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:
srcWindowWindow to use as the base for translating the component's ComponentArea into pixel values.
modColoursColourRect 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.
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:
srcWindowWindow to use as the base for translating the component's ComponentArea into pixel values.
baseRectRect to use as the base for translating the component's ComponentArea into pixel values.
modColoursColourRect 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.

Set the colours to be used by this component.

Parameters:
colsColourRect object describing the colours to be used by this component.

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

Parameters:
propertyString containing the name of the property.

Set the conponent's ComponentArea.

Parameters:
areaComponentArea object describing a new target area for the component.
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.)
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends