# CEGUI::RenderableFrame Class Reference

A higher order GUI entity that represents a renderable frame. More...

Collaboration diagram for CEGUI::RenderableFrame:

[legend]
List of all members.

## 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.

## 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

## 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.

## Detailed Description

A higher order GUI entity that represents a renderable frame.

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.

## Member Function Documentation

void CEGUI::RenderableFrame::draw_impl | ( | const Vector3 & | position,
|  | const Rect & | clip_rect
| ) | const`[protected]`

Renders the imagery for a RenderableFrame 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.

const Image * CEGUI::RenderableFrame::getImageForLocation | ( | FrameLocation | location | ) | const

Return the Image being used for the specified location of the frame.

Parameters:

  | location | One of the FrameLocation enumerated values specifying the image to be returned.

Returns:
  Pointer to the Image object currently set for the frame location specified in location. May return NULL if no Image is set for the requested position.

void CEGUI::RenderableFrame::setImageForLocation | ( | FrameLocation | location,
|  | const Image * | image
| ) |

Set the Image to use for the specified location of the frame.

Parameters:

  | location | One of the FrameLocation enumerated values specifying the image to be returned.
  | image | Pointer to the Image to use for the frame location specified in location. May be NULL to indicate the frame component is not required.

Returns:
  Nothing.

void CEGUI::RenderableFrame::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.

Parameters:

  | topleft | Pointer to an Image object to render as the top-left corner of the frame. Specify NULL to omit this part of the frame.
  | topright | Pointer to an Image object to render as the top-right corner of the frame. Specify NULL to omit this part of the frame.
  | bottomleft | Pointer to an Image object to render as the bottom-left corner of the frame. Specify NULL to omit this part of the frame.
  | bottomright | Pointer to an Image object to render as the bottom-right corner of the frame. Specify NULL to omit this part of the frame.
  | left | Pointer to an Image object to render as the left edge of the frame. Specify NULL to omit this part of the frame.
  | top | Pointer to an Image object to render as the top edge of the frame. Specify NULL to omit this part of the frame.
  | right | Pointer to an Image object to render as the right edge of the frame. Specify NULL to omit this part of the frame.
  | bottom | Pointer to an Image object to render as the bottom edge of the frame. Specify NULL to omit this part of the frame.

Returns:
  Nothing