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

Class that encapsulates information for a frame with background (9 images in total) More...

+ Inheritance diagram for CEGUI::FrameComponent:
+ Collaboration diagram for CEGUI::FrameComponent:

List of all members.

Classes

struct  FrameImageSource

Public Member Functions

void setLeftEdgeFormatting (VerticalFormatting fmt)
 Set the formatting to be used for the left edge image.
void setRightEdgeFormatting (VerticalFormatting fmt)
 Set the formatting to be used for the right edge image.
void setTopEdgeFormatting (HorizontalFormatting fmt)
 Set the formatting to be used for the top edge image.
void setBottomEdgeFormatting (HorizontalFormatting fmt)
 Set the formatting to be used for the bottom edge image.
void setBackgroundVerticalFormatting (VerticalFormatting fmt)
 Set the vertical formatting to be used for the background image.
void setBackgroundHorizontalFormatting (HorizontalFormatting fmt)
 Set the horizontal formatting to be used for the background image.
void setLeftEdgeFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the formatting to use for the left edge image.
void setRightEdgeFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the formatting to use for the right edge image.
void setTopEdgeFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the formatting to use for the top edge image.
void setBottomEdgeFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the formatting to use for the bottom edge image.
void setBackgroundVerticalFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the vertical formatting to use for the backdround image.
void setBackgroundHorizontalFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the horizontal formatting to use for the backdround image.
VerticalFormatting getLeftEdgeFormatting (const Window &wnd) const
 Return the formatting to be used for the left edge image.
VerticalFormatting getRightEdgeFormatting (const Window &wnd) const
 Return the formatting to be used for the right edge image.
HorizontalFormatting getTopEdgeFormatting (const Window &wnd) const
 Return the formatting to be used for the top edge image.
HorizontalFormatting getBottomEdgeFormatting (const Window &wnd) const
 Return the formatting to be used for the bottom edge image.
VerticalFormatting getBackgroundVerticalFormatting (const Window &wnd) const
 Return the vertical formatting to be used for the background image.
HorizontalFormatting getBackgroundHorizontalFormatting (const Window &wnd) const
 Return the horizontal formatting to be used for the background image.
const ImagegetImage (FrameImageComponent part, const Window &wnd) const
 Return the Image object that will be drawn by this FrameComponent for a specified frame part.
void setImage (FrameImageComponent part, const Image *image)
 Set an Image that will be drawn by this FrameComponent.
void setImage (FrameImageComponent part, const String &name)
 Set an Image that will be drawn by this FrameComponent.
void setImagePropertySource (FrameImageComponent part, const String &name)
 Set the name of the Property that will be accesssed on the target Window to determine the Image that will be drawn by the FrameComponent.
bool isImageSpecified (FrameImageComponent part) const
 Return whether the given component image has been specified.
bool isImageFetchedFromProperty (FrameImageComponent part) const
 Return whether the given component image is specified via a property.
const StringgetImagePropertySource (FrameImageComponent part) const
 Return the name of the property that will be used to determine the image to use for the given component image.
void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this FrameComponent to out_stream.
bool operator== (const FrameComponent &rhs) const

Static Public Attributes

static const HorizontalFormatting HorizontalFormattingDefault
 Default value for the HorzFormat elements of the FrameComponent.
static const VerticalFormatting VerticalFormattingDefault
 Default value for the VertFormat elements of the FrameComponent.

Protected Member Functions

void render_impl (Window &srcWindow, Rectf &destRect, const CEGUI::ColourRect *modColours, const Rectf *clipper, bool clipToDisplay) const
 Function to do main render caching work.
void renderImage (GeometryBuffer &buffer, const Image *image, VerticalFormatting vertFmt, HorizontalFormatting horzFmt, Rectf &destRect, const ColourRect &colours, const Rectf *clipper, bool clipToDisplay) const

Protected Attributes

FormattingSetting
< VerticalFormatting
d_leftEdgeFormatting
FormattingSetting
< VerticalFormatting
d_rightEdgeFormatting
FormattingSetting
< HorizontalFormatting
d_topEdgeFormatting
FormattingSetting
< HorizontalFormatting
d_bottomEdgeFormatting
FormattingSetting
< VerticalFormatting
d_backgroundVertFormatting
FormattingSetting
< HorizontalFormatting
d_backgroundHorzFormatting
FrameImageSource d_frameImages [FIC_FRAME_IMAGE_COUNT]
 FrameImageSource array describing images to be used.

Detailed Description

Class that encapsulates information for a frame with background (9 images in total)

Corner images are always drawn at their natural size, edges can be fomatted (stretched, tiled or aligned) between the corner pieces for a particular edge, the background image will cover the inner rectangle formed by the edge images and can be formatted in both dimensions.


Member Function Documentation

Return the horizontal formatting to be used for the background image.

Returns:
One of the HorizontalFormatting enumerated values.

Return the vertical formatting to be used for the background image.

Returns:
One of the VerticalFormatting enumerated values.

Return the formatting to be used for the bottom edge image.

Returns:
One of the HorizontalFormatting enumerated values.
const Image* CEGUI::FrameComponent::getImage ( FrameImageComponent  part,
const Window wnd 
) const

Return the Image object that will be drawn by this FrameComponent for a specified frame part.

Parameters:
partOne of the FrameImageComponent enumerated values specifying the component image to be accessed.
wndReference to a Window object that will be accessed if the image component is fetched from a Property.
Returns:
pointer to an Image object, or 0 if the image had not been set or if the image is sourced from a property that returns an empty image name.

Return the name of the property that will be used to determine the image to use for the given component image.

If the returned String is empty, it indicates either that the component image is not specified or that the component image is not sourced from a property.

See also:
isImageFetchedFromProperty isImageSpecified
Parameters:
partOne of the FrameImageComponent enumerated values specifying the component image property source to return.

Return the formatting to be used for the left edge image.

Returns:
One of the VerticalFormatting enumerated values.

Return the formatting to be used for the right edge image.

Returns:
One of the VerticalFormatting enumerated values.

Return the formatting to be used for the top edge image.

Returns:
One of the HorizontalFormatting enumerated values.

Return whether the given component image is specified via a property.

Parameters:
partOne of the FrameImageComponent enumerated values specifying the component image to check.
Returns:
  • true if the image is specified and fetched via a property.
  • false if the image is not fetched via a property (or is not specified)

Return whether the given component image has been specified.

Parameters:
partOne of the FrameImageComponent enumerated values specifying the component image to check.
Returns:
  • true if the image is specified and will be drawn.
  • false if the image is not specified.

Set the horizontal formatting to be used for the background image.

Parameters:
fmtOne of the HorizontalFormatting enumerated values.

Set the vertical formatting to be used for the background image.

Parameters:
fmtOne of the VerticalFormatting enumerated values.

Set the formatting to be used for the bottom edge image.

Parameters:
fmtOne of the HorizontalFormatting enumerated values.
void CEGUI::FrameComponent::setImage ( FrameImageComponent  part,
const Image image 
)

Set an Image that will be drawn by this FrameComponent.

Parameters:
partOne of the FrameImageComponent enumerated values specifying the component image to be set.
imagePointer to the Image object to be drawn. If this is 0 then drawing of the component image specified by part will be disabled.
void CEGUI::FrameComponent::setImage ( FrameImageComponent  part,
const String name 
)

Set an Image that will be drawn by this FrameComponent.

Parameters:
partOne of the FrameImageComponent enumerated values specifying the component image to be set.
nameString holding the name of an Image. The image should already exist, if the Image does not exist an Exception will be logged and drawing of the component image specified by part will be disabled.

Set the name of the Property that will be accesssed on the target Window to determine the Image that will be drawn by the FrameComponent.

Parameters:
partOne of the FrameImageComponent enumerated values specifying the component image to be set.
nameString holding the name of a property that will be accessed. If this is the empty string then drawing of the component image specified by part will be disabled.

Set the formatting to be used for the left edge image.

Parameters:
fmtOne of the VerticalFormatting enumerated values.

Set the formatting to be used for the right edge image.

Parameters:
fmtOne of the VerticalFormatting enumerated values.

Set the formatting to be used for the top edge image.

Parameters:
fmtOne of the HorizontalFormatting enumerated values.

Writes an xml representation of this FrameComponent to out_stream.

Parameters:
xml_streamStream where xml data should be output.
Returns:
Nothing.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends