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

CEGUI::RenderableElement Class Reference

#include <CEGUIRenderableElement.h>

Inheritance diagram for CEGUI::RenderableElement:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

void draw (const Vector3 &position, const Rect &clip_rect)
 Draw the element chain starting with this element.
void draw (RenderCache &renderCache) const
 Draw the element chain into the given RenderCache.
RenderableElementgetNextElement (void) const
 Return a pointer to the next RenderableElement in the chain.
const ColourRectgetColours (void) const
 Return the rendering colours set for this RenderableElement.
Point getPosition (void) const
 Return the offset position of this RenderableElement.
Size getSize (void) const
 Return the current size of the element.
const RectgetRect (void) const
 Return the area for the element.
bool isColourRectPerImage (bool setting) const
 return whether the element colours will be applied locally to each image drawn as part of the RenderableElement, or applied across the whole of the RenderableElement area.
void setNextElement (RenderableElement *element)
 Link another RenderableElement to this one.
void setColours (const ColourRect &colours)
 Sets the colours to be applied when rendering the element.
void setColours (const colour &top_left_colour, const colour &top_right_colour, const colour &bottom_left_colour, const colour &bottom_right_colour)
 Sets the colours to be applied when rendering the element.
void setPosition (const Point &position)
 Set the rendering offset position for this element.
void setSize (const Size &size)
 set the dimensions for the frame.
void setRect (const Rect &area)
 Set the area for the frame.
void setColourRectPerImage (bool setting)
 set whether the element colours should be applied locally to each image drawn as part of the RenderableElement, or applied across the whole of the RenderableElement area.
 RenderableElement (void)
 Constructor for RenderableElement base class.
virtual ~RenderableElement (void)
 Destructor for RenderableElement base class.

Protected Member Functions

virtual void draw_impl (const Vector3 &position, const Rect &clip_rect) const =0
 This function performs the required rendering for this element.
virtual void draw_impl (RenderCache &renderCache) const =0
 Implementation method to draw the element into the given RenderCache.

Protected Attributes

RenderableElementd_next
 Link to another RenderableElement.
ColourRect d_colours
 Colours to be used for this element;.
Rect d_area
 Currently defined area for this element.
bool d_useColoursPerImage
 true if d_colours should be applied separately to each Image drawn (false to interpolate across d_area).

Detailed Description

Definition at line 43 of file CEGUIRenderableElement.h.


Constructor & Destructor Documentation

CEGUI::RenderableElement::RenderableElement void   ) 
 

Constructor for RenderableElement base class.

Definition at line 35 of file CEGUIRenderableElement.cpp.

CEGUI::RenderableElement::~RenderableElement void   )  [virtual]
 

Destructor for RenderableElement base class.

Definition at line 47 of file CEGUIRenderableElement.cpp.


Member Function Documentation

void CEGUI::RenderableElement::draw RenderCache renderCache  )  const
 

Draw the element chain into the given RenderCache.

Parameters:
renderCache RenderCache object where element imagery is to be queued.
Returns:
Nothing.

Definition at line 84 of file CEGUIRenderableElement.cpp.

References d_next, draw(), and draw_impl().

void CEGUI::RenderableElement::draw const Vector3 position,
const Rect clip_rect
 

Draw the element chain starting with this element.

Parameters:
position Vector3 object describing the base position to be used when rendering the element chain. Each element in the chain will be offset from this position by it's own internal position setting.
clip_rect Rect object describing the clipping area. No rendering will appear outside this area.

Definition at line 67 of file CEGUIRenderableElement.cpp.

References d_area, CEGUI::Rect::d_left, d_next, CEGUI::Rect::d_top, CEGUI::Vector3::d_x, CEGUI::Vector3::d_y, draw(), and draw_impl().

Referenced by draw(), CEGUI::StaticImage::populateRenderCache(), and CEGUI::Static::populateRenderCache().

virtual void CEGUI::RenderableElement::draw_impl RenderCache renderCache  )  const [protected, pure virtual]
 

Implementation method to draw the element into the given RenderCache.

Parameters:
renderCache RenderCache object where element imagery is to be queued.
Returns:
Nothing.

Implemented in CEGUI::RenderableFrame, and CEGUI::RenderableImage.

virtual void CEGUI::RenderableElement::draw_impl const Vector3 position,
const Rect clip_rect
const [protected, pure virtual]
 

This function performs the required rendering for this element.

Parameters:
position Vector3 object describing the final rendering position for the object.
clip_rect Rect object describing the clipping area for the rendering. No rendering will be performed outside this area.
Returns:
Nothing.

Implemented in CEGUI::RenderableFrame, and CEGUI::RenderableImage.

Referenced by draw().

const ColourRect& CEGUI::RenderableElement::getColours void   )  const [inline]
 

Return the rendering colours set for this RenderableElement.

Returns:
ColourRect object describing the colours to be used when rendering this RenderableElement.

Definition at line 94 of file CEGUIRenderableElement.h.

RenderableElement* CEGUI::RenderableElement::getNextElement void   )  const [inline]
 

Return a pointer to the next RenderableElement in the chain.

Returns:
Pointer to a RenderableElement object that is linked this this one. May be NULL for none.

Definition at line 84 of file CEGUIRenderableElement.h.

Point CEGUI::RenderableElement::getPosition void   )  const [inline]
 

Return the offset position of this RenderableElement.

Returns:
Point object describing the offset position that this RenderableElement is to be rendered at. This value is added to whatever position is specified when the RenderableElement::draw method is called to obtain the final rendering position.

Definition at line 106 of file CEGUIRenderableElement.h.

const Rect& CEGUI::RenderableElement::getRect void   )  const [inline]
 

Return the area for the element.

Returns:
Rect object describing the pixel area (offset from some unknown location) of the frame.

Definition at line 126 of file CEGUIRenderableElement.h.

Size CEGUI::RenderableElement::getSize void   )  const [inline]
 

Return the current size of the element.

Returns:
Size object describing the current size of the RenderableFrame.

Definition at line 116 of file CEGUIRenderableElement.h.

bool CEGUI::RenderableElement::isColourRectPerImage bool  setting  )  const [inline]
 

return whether the element colours will be applied locally to each image drawn as part of the RenderableElement, or applied across the whole of the RenderableElement area.

Returns:

Definition at line 138 of file CEGUIRenderableElement.h.

void CEGUI::RenderableElement::setColourRectPerImage bool  setting  )  [inline]
 

set whether the element colours should be applied locally to each image drawn as part of the RenderableElement, or applied across the whole of the RenderableElement area.

Parameters:
setting 
Returns:
Nothing.

Definition at line 246 of file CEGUIRenderableElement.h.

void CEGUI::RenderableElement::setColours const colour top_left_colour,
const colour top_right_colour,
const colour bottom_left_colour,
const colour bottom_right_colour
 

Sets the colours to be applied when rendering the element.

Parameters:
top_left_colour Colour to be applied to the top-left corner of each Image used in the element.
top_right_colour Colour to be applied to the top-right corner of each Image used in the element.
bottom_left_colour Colour to be applied to the bottom-left corner of each Image used in the element.
bottom_right_colour Colour to be applied to the bottom-right corner of each Image used in the element.
Returns:
Nothing.

Definition at line 55 of file CEGUIRenderableElement.cpp.

References CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, d_colours, CEGUI::ColourRect::d_top_left, and CEGUI::ColourRect::d_top_right.

void CEGUI::RenderableElement::setColours const ColourRect colours  )  [inline]
 

Sets the colours to be applied when rendering the element.

Parameters:
colours ColourRect object describing the colours to be used.
Returns:
Nothing.

Definition at line 171 of file CEGUIRenderableElement.h.

Referenced by CEGUI::Static::updateRenderableFrameColours(), and CEGUI::StaticImage::updateRenderableImageColours().

void CEGUI::RenderableElement::setNextElement RenderableElement element  )  [inline]
 

Link another RenderableElement to this one.

The linked element will be drawn whenever this element is drawn using the same base position and clipping area as provided when the RenderableElement::draw method is called. Whole chains of Renderable Elements can be created using this system.

Parameters:
element Pointer to a RenderableElement object that will be linked to this element.
Returns:
Nothing.

Definition at line 158 of file CEGUIRenderableElement.h.

void CEGUI::RenderableElement::setPosition const Point position  )  [inline]
 

Set the rendering offset position for this element.

Parameters:
position Point object describing the offset position to use for this element. This value is added to whatever position is specified when the RenderableElement::draw method is called to obtain the final rendering position.
Returns:
Nothing.

Definition at line 208 of file CEGUIRenderableElement.h.

Referenced by CEGUI::StaticImage::onStaticFrameChanged().

void CEGUI::RenderableElement::setRect const Rect area  )  [inline]
 

Set the area for the frame.

Parameters:
area Rect object describing the pixel area (offset from some unknown location) of the frame.
Returns:
None.

Definition at line 231 of file CEGUIRenderableElement.h.

Referenced by CEGUI::PushButton::onSized(), CEGUI::PushButton::setCustomImageryAutoSized(), CEGUI::PushButton::setDisabledImage(), CEGUI::PushButton::setHoverImage(), CEGUI::PushButton::setNormalImage(), and CEGUI::PushButton::setPushedImage().

void CEGUI::RenderableElement::setSize const Size size  )  [inline]
 

set the dimensions for the frame.

Parameters:
size Size object describing the new size for the frame (in pixels)

Definition at line 218 of file CEGUIRenderableElement.h.

Referenced by CEGUI::StaticImage::onSized(), CEGUI::Static::onSized(), and CEGUI::StaticImage::onStaticFrameChanged().


Member Data Documentation

Rect CEGUI::RenderableElement::d_area [protected]
 

Currently defined area for this element.

Definition at line 304 of file CEGUIRenderableElement.h.

Referenced by draw(), CEGUI::RenderableImage::draw_impl(), CEGUI::RenderableFrame::draw_impl(), CEGUI::RenderableImage::getBaseXCoord(), CEGUI::RenderableImage::getBaseYCoord(), CEGUI::RenderableImage::getDestinationSize(), CEGUI::RenderableImage::getHorzTileCount(), and CEGUI::RenderableImage::getVertTileCount().

ColourRect CEGUI::RenderableElement::d_colours [protected]
 

Colours to be used for this element;.

Definition at line 303 of file CEGUIRenderableElement.h.

Referenced by CEGUI::RenderableImage::draw_impl(), CEGUI::RenderableFrame::draw_impl(), and setColours().

RenderableElement* CEGUI::RenderableElement::d_next [protected]
 

Link to another RenderableElement.

Definition at line 302 of file CEGUIRenderableElement.h.

Referenced by draw().

bool CEGUI::RenderableElement::d_useColoursPerImage [protected]
 

true if d_colours should be applied separately to each Image drawn (false to interpolate across d_area).

Definition at line 305 of file CEGUIRenderableElement.h.

Referenced by CEGUI::RenderableImage::draw_impl(), and CEGUI::RenderableFrame::draw_impl().


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