Crazy Eddies GUI System  0.6.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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:

Public Member Functions

 FrameComponent ()
 Constructor.
 
VerticalFormatting getBackgroundVerticalFormatting () const
 Return the current vertical formatting setting for this FrameComponent. More...
 
void setBackgroundVerticalFormatting (VerticalFormatting fmt)
 Set the vertical formatting setting for this FrameComponent. More...
 
HorizontalFormatting getBackgroundHorizontalFormatting () const
 Return the current horizontal formatting setting for this FrameComponent. More...
 
void setBackgroundHorizontalFormatting (HorizontalFormatting fmt)
 Set the horizontal formatting setting for this FrameComponent. More...
 
const ImagegetImage (FrameImageComponent part) const
 Return the Image object that will be drawn by this FrameComponent for a specified frame part. More...
 
void setImage (FrameImageComponent part, const Image *image)
 Set the Image that will be drawn by this ImageryComponent. More...
 
void setImage (FrameImageComponent part, const String &imageset, const String &image)
 Set the Image that will be drawn by this FrameComponent. More...
 
void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this FrameComponent to out_stream. More...
 
- Public Member Functions inherited from CEGUI::FalagardComponentBase
 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. More...
 
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. More...
 
const ComponentAreagetComponentArea () const
 Return the ComponentArea of this ImageryComponent. More...
 
void setComponentArea (const ComponentArea &area)
 Set the ImageryComponent's ComponentArea. More...
 
const ColourRectgetColours () const
 Return the ColourRect set for use by this ImageryComponent. More...
 
void setColours (const ColourRect &cols)
 Set the colours to be used by this ImageryComponent. More...
 
void setColoursPropertySource (const String &property)
 Set the name of the property where colour values can be obtained. More...
 
void setColoursPropertyIsColourRect (bool setting=true)
 Set whether the colours property source represents a full ColourRect. More...
 
void setVertFormattingPropertySource (const String &property)
 Set the name of the property where vertical formatting option can be obtained. More...
 
void setHorzFormattingPropertySource (const String &property)
 Set the name of the property where horizontal formatting option can be obtained. More...
 

Protected Member Functions

void render_impl (Window &srcWindow, Rect &destRect, float base_z, const CEGUI::ColourRect *modColours, const Rect *clipper, bool clipToDisplay) const
 Method to do main render caching work.
 
void doBackgroundRender (Window &srcWindow, Rect &destRect, float base_z, const ColourRect &colours, const Rect *clipper, bool clipToDisplay) const
 
- Protected Member Functions inherited from CEGUI::FalagardComponentBase
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. More...
 
bool writeColoursXML (XMLSerializer &xml_stream) const
 Writes xml for the colours to a OutStream. Will prefer property colours before explicit. More...
 
bool writeVertFormatXML (XMLSerializer &xml_stream) const
 Writes xml for the vertical formatting to a OutStream if such a property is defined. More...
 
bool writeHorzFormatXML (XMLSerializer &xml_stream) const
 Writes xml for the horizontal formatting to a OutStream if such a property is defined. More...
 

Protected Attributes

VerticalFormatting d_vertFormatting
 Vertical formatting to be applied when rendering the background for the component.
 
HorizontalFormatting d_horzFormatting
 Horizontal formatting to be applied when rendering the background for the component.
 
const Imaged_frameImages [FIC_FRAME_IMAGE_COUNT]
 Array that holds the assigned images.
 
- Protected Attributes inherited from CEGUI::FalagardComponentBase
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

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

Corner images are always drawn at their natural size, edges are stretched between the corner pieces for a particular edge, the background image will cover the inner rectangle formed by the edge images and can be stretched or tiled in either dimension.

Member Function Documentation

HorizontalFormatting CEGUI::FrameComponent::getBackgroundHorizontalFormatting ( ) const

Return the current horizontal formatting setting for this FrameComponent.

Returns
One of the HorizontalFormatting enumerated values.

References d_horzFormatting.

VerticalFormatting CEGUI::FrameComponent::getBackgroundVerticalFormatting ( ) const

Return the current vertical formatting setting for this FrameComponent.

Returns
One of the VerticalFormatting enumerated values.

References d_vertFormatting.

const Image * CEGUI::FrameComponent::getImage ( FrameImageComponent  part) 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.
Returns
Image object.

References d_frameImages, and CEGUI::FIC_FRAME_IMAGE_COUNT.

void CEGUI::FrameComponent::setBackgroundHorizontalFormatting ( HorizontalFormatting  fmt)

Set the horizontal formatting setting for this FrameComponent.

Parameters
fmtOne of the HorizontalFormatting enumerated values.
Returns
Nothing.

References d_horzFormatting.

void CEGUI::FrameComponent::setBackgroundVerticalFormatting ( VerticalFormatting  fmt)

Set the vertical formatting setting for this FrameComponent.

Parameters
fmtOne of the VerticalFormatting enumerated values.
Returns
Nothing.

References d_vertFormatting.

void CEGUI::FrameComponent::setImage ( FrameImageComponent  part,
const Image image 
)

Set the Image that will be drawn by this ImageryComponent.

Parameters
partOne of the FrameImageComponent enumerated values specifying the component image to be accessed.
imagePointer to the Image object to be drawn by this FrameComponent.
Returns
Nothing.

References d_frameImages, and CEGUI::FIC_FRAME_IMAGE_COUNT.

void CEGUI::FrameComponent::setImage ( FrameImageComponent  part,
const String imageset,
const String image 
)

Set the Image that will be drawn by this FrameComponent.

Parameters
partOne of the FrameImageComponent enumerated values specifying the component image to be accessed.
imagesetString holding the name of the Imagset that contains the Image to be rendered.
imageString holding the name of the Image to be rendered.
Returns
Nothing.

References d_frameImages, CEGUI::FIC_FRAME_IMAGE_COUNT, CEGUI::Imageset::getImage(), and CEGUI::Image::getImageset().

void CEGUI::FrameComponent::writeXMLToStream ( XMLSerializer xml_stream) const