Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CEGUI::FalagardComponentBase Class Reference

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

#include <CEGUIFalComponentBase.h>

Inheritance diagram for CEGUI::FalagardComponentBase:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::FalagardComponentBase:

Collaboration graph
[legend]
List of all members.

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.
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.
const ComponentAreagetComponentArea () const
 Return the ComponentArea of this ImageryComponent.
void setComponentArea (const ComponentArea &area)
 Set the ImageryComponent's ComponentArea.
const ColourRectgetColours () const
 Return the ColourRect set for use by this ImageryComponent.
void setColours (const ColourRect &cols)
 Set the colours to be used by this ImageryComponent.
void setColoursPropertySource (const String &property)
 Set the name of the property where colour values can be obtained.
void setColoursPropertyIsColourRect (bool setting=true)
 Set whether the colours property source represents a full ColourRect.
void setVertFormattingPropertySource (const String &property)
 Set the name of the property where vertical formatting option can be obtained.
void setHorzFormattingPropertySource (const String &property)
 Set the name of the property where horizontal formatting option can be obtained.

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.
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 (OutStream &out_stream) const
 Writes xml for the colours to a OutStream. Will prefer property colours before explicit.
bool writeVertFormatXML (OutStream &out_stream) const
 Writes xml for the vertical formatting to a OutStream if such a property is defined.
bool writeHorzFormatXML (OutStream &out_stream) const
 Writes xml for the horizontal formatting to a OutStream if such a property is defined.

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.

Detailed Description

Common base class used for renderable components within an ImagerySection.

Definition at line 37 of file CEGUIFalComponentBase.h.


Constructor & Destructor Documentation

CEGUI::FalagardComponentBase::FalagardComponentBase  ) 
 

Constructor.

Definition at line 32 of file CEGUIFalComponentBase.cpp.

CEGUI::FalagardComponentBase::~FalagardComponentBase  )  [virtual]
 

Destructor.

Definition at line 37 of file CEGUIFalComponentBase.cpp.


Member Function Documentation

const ColourRect & CEGUI::FalagardComponentBase::getColours  )  const
 

Return the ColourRect set for use by this ImageryComponent.

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

Definition at line 62 of file CEGUIFalComponentBase.cpp.

References d_colours.

const ComponentArea & CEGUI::FalagardComponentBase::getComponentArea  )  const
 

Return the ComponentArea of this ImageryComponent.

Returns:
ComponentArea object describing the ImageryComponent's current target area.

Definition at line 52 of file CEGUIFalComponentBase.cpp.

References d_area.

void CEGUI::FalagardComponentBase::initColoursRect const Window wnd,
const ColourRect modCols,
ColourRect cr
const [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:

  • a property attached to wnd
  • or the integral d_colours value.

Definition at line 82 of file CEGUIFalComponentBase.cpp.

References CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, d_colourPropertyName, d_colourProperyIsRect, d_colours, CEGUI::ColourRect::d_top_left, CEGUI::ColourRect::d_top_right, CEGUI::String::empty(), CEGUI::PropertySet::getProperty(), CEGUI::PropertyHelper::stringToColour(), and CEGUI::PropertyHelper::stringToColourRect().

Referenced by CEGUI::TextComponent::render_impl(), CEGUI::ImageryComponent::render_impl(), and CEGUI::FrameComponent::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.

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.
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.
Returns:
Nothing.

Definition at line 46 of file CEGUIFalComponentBase.cpp.

References d_area, CEGUI::ComponentArea::getPixelRect(), and 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.

Parameters:
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.
Returns:
Nothing.

Definition at line 40 of file CEGUIFalComponentBase.cpp.

References d_area, CEGUI::ComponentArea::getPixelRect(), and render_impl().

virtual void CEGUI::FalagardComponentBase::render_impl Window srcWindow,
Rect destRect,
float  base_z,
const CEGUI::ColourRect modColours,
const Rect clipper,
bool  clipToDisplay
const [protected, pure virtual]
 

Method to do main render caching work.

Implemented in CEGUI::FrameComponent, CEGUI::ImageryComponent, and CEGUI::TextComponent.

Referenced by render().

void CEGUI::FalagardComponentBase::setColours const ColourRect cols  ) 
 

Set the colours to be used by this ImageryComponent.

Parameters:
cols ColourRect object describing the colours to be used by this ImageryComponent.

Definition at line 67 of file CEGUIFalComponentBase.cpp.

References d_colours.

Referenced by CEGUI::Falagard_xmlHandler::elementStart().

void CEGUI::FalagardComponentBase::setColoursPropertyIsColourRect bool  setting = true  ) 
 

Set whether the colours property source represents a full ColourRect.

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

Definition at line 77 of file CEGUIFalComponentBase.cpp.

References d_colourProperyIsRect.

Referenced by CEGUI::Falagard_xmlHandler::elementStart().

void CEGUI::FalagardComponentBase::setColoursPropertySource const String property  ) 
 

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

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

Definition at line 72 of file CEGUIFalComponentBase.cpp.

References d_colourPropertyName.

Referenced by CEGUI::Falagard_xmlHandler::elementStart().

void CEGUI::FalagardComponentBase::setComponentArea const ComponentArea area  ) 
 

Set the ImageryComponent's ComponentArea.

Parameters:
area ComponentArea object describing a new target area for the ImageryComponent.
Returns:
Nothing.

Definition at line 57 of file CEGUIFalComponentBase.cpp.

References d_area.

Referenced by CEGUI::Falagard_xmlHandler::elementEnd().

void CEGUI::FalagardComponentBase::setHorzFormattingPropertySource const String property  ) 
 

Set the name of the property where horizontal formatting option can be obtained.

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

Definition at line 120 of file CEGUIFalComponentBase.cpp.

References d_horzFormatPropertyName.

Referenced by CEGUI::Falagard_xmlHandler::elementStart().

void CEGUI::FalagardComponentBase::setVertFormattingPropertySource const String property  ) 
 

Set the name of the property where vertical formatting option can be obtained.

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

Definition at line 115 of file CEGUIFalComponentBase.cpp.

References d_vertFormatPropertyName.

Referenced by CEGUI::Falagard_xmlHandler::elementStart().

bool CEGUI::FalagardComponentBase::writeColoursXML OutStream out_stream  )  const [protected]
 

Writes xml for the colours to a OutStream. Will prefer property colours before explicit.

Note:
This is intended as a helper method 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.)

Definition at line 125 of file CEGUIFalComponentBase.cpp.

References CEGUI::PropertyHelper::colourToString(), CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, d_colourPropertyName, d_colourProperyIsRect, d_colours, CEGUI::ColourRect::d_top_left, CEGUI::ColourRect::d_top_right, CEGUI::String::empty(), and CEGUI::ColourRect::isMonochromatic().

Referenced by CEGUI::TextComponent::writeXMLToStream(), CEGUI::ImageryComponent::writeXMLToStream(), and CEGUI::FrameComponent::writeXMLToStream().

bool CEGUI::FalagardComponentBase::writeHorzFormatXML OutStream out_stream  )  const [protected]
 

Writes xml for the horizontal formatting to a OutStream if such a property is defined.

Note:
This is intended as a helper method 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.)

Definition at line 163 of file CEGUIFalComponentBase.cpp.

References d_horzFormatPropertyName, and CEGUI::String::empty().

Referenced by CEGUI::TextComponent::writeXMLToStream(), CEGUI::ImageryComponent::writeXMLToStream(), and CEGUI::FrameComponent::writeXMLToStream().

bool CEGUI::FalagardComponentBase::writeVertFormatXML OutStream out_stream  )  const [protected]
 

Writes xml for the vertical formatting to a OutStream if such a property is defined.

Note:
This is intended as a helper method 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.)

Definition at line 152 of file CEGUIFalComponentBase.cpp.

References d_vertFormatPropertyName, and CEGUI::String::empty().

Referenced by CEGUI::TextComponent::writeXMLToStream(), CEGUI::ImageryComponent::writeXMLToStream(), and CEGUI::FrameComponent::writeXMLToStream().


Member Data Documentation

ComponentArea CEGUI::FalagardComponentBase::d_area [protected]
 

Destination area for this component.

Definition at line 242 of file CEGUIFalComponentBase.h.

Referenced by getComponentArea(), render(), setComponentArea(), CEGUI::TextComponent::writeXMLToStream(), CEGUI::ImageryComponent::writeXMLToStream(), and CEGUI::FrameComponent::writeXMLToStream().

String CEGUI::FalagardComponentBase::d_colourPropertyName [protected]
 

name of property to fetch colours from.

Definition at line 244 of file CEGUIFalComponentBase.h.

Referenced by initColoursRect(), setColoursPropertySource(), and writeColoursXML().

bool CEGUI::FalagardComponentBase::d_colourProperyIsRect [protected]
 

true if the colour property will fetch a full ColourRect.

Definition at line 245 of file CEGUIFalComponentBase.h.

Referenced by initColoursRect(), setColoursPropertyIsColourRect(), and writeColoursXML().

ColourRect CEGUI::FalagardComponentBase::d_colours [protected]
 

base colours to be applied when rendering the image component.

Definition at line 243 of file CEGUIFalComponentBase.h.

Referenced by getColours(), initColoursRect(), setColours(), and writeColoursXML().

String CEGUI::FalagardComponentBase::d_horzFormatPropertyName [protected]
 

name of property to fetch horizontal formatting setting from.

Definition at line 247 of file CEGUIFalComponentBase.h.

Referenced by CEGUI::FrameComponent::doBackgroundRender(), CEGUI::TextComponent::render_impl(), CEGUI::ImageryComponent::render_impl(), setHorzFormattingPropertySource(), and writeHorzFormatXML().

String CEGUI::FalagardComponentBase::d_vertFormatPropertyName [protected]
 

name of property to fetch vertical formatting setting from.

Definition at line 246 of file CEGUIFalComponentBase.h.

Referenced by CEGUI::FrameComponent::doBackgroundRender(), CEGUI::TextComponent::render_impl(), CEGUI::ImageryComponent::render_impl(), setVertFormattingPropertySource(), and writeVertFormatXML().


The documentation for this class was generated from the following files:
Generated on Wed Sep 7 10:09:55 2005 for Crazy Eddies GUI System by  doxygen 1.4.3