#include <CEGUIRenderableFrame.h>
Inheritance diagram for CEGUI::RenderableFrame:
Public Member Functions | |
RenderableFrame (void) | |
Default constructor for RenderableFrame. | |
virtual | ~RenderableFrame (void) |
Destructor for RenderableFrame. | |
void | setImages (const Image *topleft, const Image *topright, const Image *bottomleft, const Image *bottomright, const Image *left, const Image *top, const Image *right, const Image *bottom) |
specify the Image objects to use for each part of the frame. A NULL may be used to omit any part. | |
void | setImageForLocation (FrameLocation location, const Image *image) |
Set the Image to use for the specified location of the frame. | |
const Image * | getImageForLocation (FrameLocation location) const |
Return the Image being used for the specified location of the frame. | |
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. | |
RenderableElement * | getNextElement (void) const |
Return a pointer to the next RenderableElement in the chain. | |
const ColourRect & | getColours (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 Rect & | getRect (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. | |
Protected Member Functions | |
void | draw_impl (const Vector3 &position, const Rect &clip_rect) const |
Renders the imagery for a RenderableFrame element. | |
void | draw_impl (RenderCache &renderCache) const |
Implementation method to draw the element into the given RenderCache. | |
Protected Attributes | |
const Image * | d_topleft |
Image to draw for the top-left corner. | |
const Image * | d_topright |
Image to draw for the top-right corner. | |
const Image * | d_bottomleft |
Image to draw for the bottom-left corner. | |
const Image * | d_bottomright |
Image to draw for the bottom-right corner. | |
const Image * | d_left |
Image to draw for the left edge. | |
const Image * | d_right |
Image to draw for the right edge. | |
const Image * | d_top |
Image to draw for the top edge. | |
const Image * | d_bottom |
Image to draw for the bottom edge. | |
RenderableElement * | d_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). |
This class is intended to be used where a (usually top-level) GUI element needs to draw a frame that is constructed from a collection of Images. It is possible to specify the image to use for each of the four corners, which are placed appropriately at their natural size, and the images for the four edges, which are stretched to cover the area between any corner images. Any of the Images may be omitted, in which case that part of the frame is not drawn. If the GUI element uses only one image for its frame (usually stretched over the entire area of the element) then a better choice would be to use a RenderableImage, or perform the rendering directly instead.
Definition at line 65 of file CEGUIRenderableFrame.h.
|
Default constructor for RenderableFrame.
Definition at line 37 of file CEGUIRenderableFrame.cpp. References d_bottom, d_bottomleft, d_bottomright, d_left, d_right, d_top, d_topleft, and d_topright. |
|
Destructor for RenderableFrame.
Definition at line 47 of file CEGUIRenderableFrame.cpp. |
|
Draw the element chain into the given RenderCache.
Definition at line 84 of file CEGUIRenderableElement.cpp. References CEGUI::RenderableElement::d_next, CEGUI::RenderableElement::draw(), and CEGUI::RenderableElement::draw_impl(). |
|
Draw the element chain starting with this element.
Definition at line 67 of file CEGUIRenderableElement.cpp. References CEGUI::RenderableElement::d_area, CEGUI::Rect::d_left, CEGUI::RenderableElement::d_next, CEGUI::Rect::d_top, CEGUI::Vector3::d_x, CEGUI::Vector3::d_y, CEGUI::RenderableElement::draw(), and CEGUI::RenderableElement::draw_impl(). Referenced by CEGUI::RenderableElement::draw(), CEGUI::StaticImage::populateRenderCache(), and CEGUI::Static::populateRenderCache(). |
|
Implementation method to draw the element into the given RenderCache.
Implements CEGUI::RenderableElement. Definition at line 399 of file CEGUIRenderableFrame.cpp. References CEGUI::RenderCache::cacheImage(), CEGUI::RenderableElement::d_area, d_bottom, CEGUI::Rect::d_bottom, d_bottomleft, d_bottomright, CEGUI::RenderableElement::d_colours, CEGUI::Size::d_height, d_left, CEGUI::Rect::d_left, d_right, CEGUI::Rect::d_right, CEGUI::Rect::d_top, d_top, d_topleft, d_topright, CEGUI::RenderableElement::d_useColoursPerImage, CEGUI::Size::d_width, CEGUI::Vector3::d_x, CEGUI::Vector3::d_y, CEGUI::Image::getHeight(), CEGUI::Rect::getHeight(), CEGUI::Image::getOffsetX(), CEGUI::Image::getOffsetY(), CEGUI::ColourRect::getSubRectangle(), CEGUI::Image::getWidth(), CEGUI::Rect::getWidth(), and CEGUI::ColourRect::isMonochromatic(). |
|
Renders the imagery for a RenderableFrame element.
Implements CEGUI::RenderableElement. Definition at line 72 of file CEGUIRenderableFrame.cpp. References CEGUI::RenderableElement::d_area, d_bottom, d_bottomleft, d_bottomright, CEGUI::RenderableElement::d_colours, CEGUI::Size::d_height, d_left, d_right, d_top, d_topleft, d_topright, CEGUI::RenderableElement::d_useColoursPerImage, CEGUI::Size::d_width, CEGUI::Vector3::d_x, CEGUI::Vector3::d_y, CEGUI::Image::draw(), CEGUI::Image::getHeight(), CEGUI::Rect::getHeight(), CEGUI::Image::getOffsetX(), CEGUI::Image::getOffsetY(), CEGUI::ColourRect::getSubRectangle(), CEGUI::Image::getWidth(), CEGUI::Rect::getWidth(), and CEGUI::ColourRect::isMonochromatic(). |
|
Return the rendering colours set for this RenderableElement.
Definition at line 94 of file CEGUIRenderableElement.h. |
|
Return the Image being used for the specified location of the frame.
Definition at line 356 of file CEGUIRenderableFrame.cpp. References CEGUI::BottomEdge, CEGUI::BottomLeftCorner, CEGUI::BottomRightCorner, d_bottom, d_bottomleft, d_bottomright, d_left, d_right, d_top, d_topleft, d_topright, CEGUI::LeftEdge, CEGUI::RightEdge, CEGUI::TopEdge, CEGUI::TopLeftCorner, and CEGUI::TopRightCorner. Referenced by CEGUI::Static::getImageForFrameLocation(). |
|
Return a pointer to the next RenderableElement in the chain.
Definition at line 84 of file CEGUIRenderableElement.h. |
|
Return the offset position of this RenderableElement.
Definition at line 106 of file CEGUIRenderableElement.h. |
|
Return the area for the element.
Definition at line 126 of file CEGUIRenderableElement.h. |
|
Return the current size of the element.
Definition at line 116 of file CEGUIRenderableElement.h. |
|
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.
Definition at line 138 of file CEGUIRenderableElement.h. |
|
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.
Definition at line 246 of file CEGUIRenderableElement.h. |
|
Sets the colours to be applied when rendering the element.
Definition at line 55 of file CEGUIRenderableElement.cpp. References CEGUI::ColourRect::d_bottom_left, CEGUI::ColourRect::d_bottom_right, CEGUI::RenderableElement::d_colours, CEGUI::ColourRect::d_top_left, and CEGUI::ColourRect::d_top_right. |
|
Sets the colours to be applied when rendering the element.
Definition at line 171 of file CEGUIRenderableElement.h. Referenced by CEGUI::Static::updateRenderableFrameColours(), and CEGUI::StaticImage::updateRenderableImageColours(). |
|
Set the Image to use for the specified location of the frame.
Definition at line 310 of file CEGUIRenderableFrame.cpp. References CEGUI::BottomEdge, CEGUI::BottomLeftCorner, CEGUI::BottomRightCorner, d_bottom, d_bottomleft, d_bottomright, d_left, d_right, d_top, d_topleft, d_topright, CEGUI::LeftEdge, CEGUI::RightEdge, CEGUI::TopEdge, CEGUI::TopLeftCorner, and CEGUI::TopRightCorner. Referenced by CEGUI::Static::setImageForFrameLocation(). |
|
specify the Image objects to use for each part of the frame. A NULL may be used to omit any part.
Definition at line 55 of file CEGUIRenderableFrame.cpp. References d_bottom, d_bottomleft, d_bottomright, d_left, d_right, d_top, d_topleft, and d_topright. Referenced by CEGUI::Static::setFrameImages(). |
|
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.
Definition at line 158 of file CEGUIRenderableElement.h. |
|
Set the rendering offset position for this element.
Definition at line 208 of file CEGUIRenderableElement.h. Referenced by CEGUI::StaticImage::onStaticFrameChanged(). |
|
Set the area for the frame.
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(). |
|
set the dimensions for the frame.
Definition at line 218 of file CEGUIRenderableElement.h. Referenced by CEGUI::StaticImage::onSized(), CEGUI::Static::onSized(), and CEGUI::StaticImage::onStaticFrameChanged(). |
|
Currently defined area for this element.
Definition at line 304 of file CEGUIRenderableElement.h. Referenced by CEGUI::RenderableElement::draw(), CEGUI::RenderableImage::draw_impl(), draw_impl(), CEGUI::RenderableImage::getBaseXCoord(), CEGUI::RenderableImage::getBaseYCoord(), CEGUI::RenderableImage::getDestinationSize(), CEGUI::RenderableImage::getHorzTileCount(), and CEGUI::RenderableImage::getVertTileCount(). |
|
Image to draw for the bottom edge.
Definition at line 184 of file CEGUIRenderableFrame.h. Referenced by draw_impl(), getImageForLocation(), RenderableFrame(), setImageForLocation(), and setImages(). |
|
Image to draw for the bottom-left corner.
Definition at line 179 of file CEGUIRenderableFrame.h. Referenced by draw_impl(), getImageForLocation(), RenderableFrame(), setImageForLocation(), and setImages(). |
|
Image to draw for the bottom-right corner.
Definition at line 180 of file CEGUIRenderableFrame.h. Referenced by draw_impl(), getImageForLocation(), RenderableFrame(), setImageForLocation(), and setImages(). |
|
Colours to be used for this element;.
Definition at line 303 of file CEGUIRenderableElement.h. Referenced by CEGUI::RenderableImage::draw_impl(), draw_impl(), and CEGUI::RenderableElement::setColours(). |
|
Image to draw for the left edge.
Definition at line 181 of file CEGUIRenderableFrame.h. Referenced by draw_impl(), getImageForLocation(), RenderableFrame(), setImageForLocation(), and setImages(). |
|
Link to another RenderableElement.
Definition at line 302 of file CEGUIRenderableElement.h. Referenced by CEGUI::RenderableElement::draw(). |
|
Image to draw for the right edge.
Definition at line 182 of file CEGUIRenderableFrame.h. Referenced by draw_impl(), getImageForLocation(), RenderableFrame(), setImageForLocation(), and setImages(). |
|
Image to draw for the top edge.
Definition at line 183 of file CEGUIRenderableFrame.h. Referenced by draw_impl(), getImageForLocation(), RenderableFrame(), setImageForLocation(), and setImages(). |
|
Image to draw for the top-left corner.
Definition at line 177 of file CEGUIRenderableFrame.h. Referenced by draw_impl(), getImageForLocation(), RenderableFrame(), setImageForLocation(), and setImages(). |
|
Image to draw for the top-right corner.
Definition at line 178 of file CEGUIRenderableFrame.h. Referenced by draw_impl(), getImageForLocation(), RenderableFrame(), setImageForLocation(), and setImages(). |
|
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 draw_impl(). |