Crazy Eddie's GUI System  ${CEGUI_VERSION}
CEGUI::ImageryComponent Class Reference

Class that encapsulates information for a single image component. More...

+ Inheritance diagram for CEGUI::ImageryComponent:
+ Collaboration diagram for CEGUI::ImageryComponent:

Public Member Functions

 ImageryComponent ()
 Constructor.
 
const Image * getImage () const
 Return the Image object that will be drawn by this ImageryComponent. More...
 
void setImage (const Image *image)
 Set the Image that will be drawn by this ImageryComponent. More...
 
void setImage (const String &name)
 Set the Image that will be drawn by this ImageryComponent. More...
 
VerticalFormatting getVerticalFormatting (const Window &wnd) const
 Return the current vertical formatting setting for this ImageryComponent. More...
 
void setVerticalFormatting (VerticalFormatting fmt)
 Set the vertical formatting setting for this ImageryComponent. More...
 
HorizontalFormatting getHorizontalFormatting (const Window &wnd) const
 Return the current horizontal formatting setting for this ImageryComponent. More...
 
void setHorizontalFormatting (HorizontalFormatting fmt)
 Set the horizontal formatting setting for this ImageryComponent. More...
 
void setHorizontalFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the horizontal formatting to use for this ImageryComponent.
 
void setVerticalFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the vertical formatting to use for this ImageryComponent.
 
void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this ImageryComponent to out_stream. More...
 
bool isImageFetchedFromProperty () const
 Return whether this ImageryComponent fetches it's image via a property on the target window. More...
 
const String & getImagePropertySource () const
 Return the name of the property that will be used to determine the image for this ImageryComponent. More...
 
void setImagePropertySource (const String &property)
 Set the name of the property that will be used to determine the image for this ImageryComponent. More...
 
 ImageryComponent ()
 Constructor.
 
const Image * getImage () const
 Return the Image object that will be drawn by this ImageryComponent. More...
 
void setImage (const Image *image)
 Set the Image that will be drawn by this ImageryComponent. More...
 
void setImage (const String &name)
 Set the Image that will be drawn by this ImageryComponent. More...
 
VerticalFormatting getVerticalFormatting (const Window &wnd) const
 Return the current vertical formatting setting for this ImageryComponent. More...
 
void setVerticalFormatting (VerticalFormatting fmt)
 Set the vertical formatting setting for this ImageryComponent. More...
 
HorizontalFormatting getHorizontalFormatting (const Window &wnd) const
 Return the current horizontal formatting setting for this ImageryComponent. More...
 
void setHorizontalFormatting (HorizontalFormatting fmt)
 Set the horizontal formatting setting for this ImageryComponent. More...
 
void setHorizontalFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the horizontal formatting to use for this ImageryComponent.
 
void setVerticalFormattingPropertySource (const String &property_name)
 Set the name of a property that will be used to obtain the vertical formatting to use for this ImageryComponent.
 
void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this ImageryComponent to out_stream. More...
 
bool isImageFetchedFromProperty () const
 Return whether this ImageryComponent fetches it's image via a property on the target window. More...
 
const String & getImagePropertySource () const
 Return the name of the property that will be used to determine the image for this ImageryComponent. More...
 
void setImagePropertySource (const String &property)
 Set the name of the property that will be used to determine the image for this ImageryComponent. More...
 
- Public Member Functions inherited from CEGUI::FalagardComponentBase
void render (Window &srcWindow, const CEGUI::ColourRect *modColours=0, const Rectf *clipper=0, bool clipToDisplay=false) const
 Render this component. More correctly, the component is cached for rendering. More...
 
void render (Window &srcWindow, const Rectf &baseRect, const CEGUI::ColourRect *modColours=0, const Rectf *clipper=0, bool clipToDisplay=false) const
 Render this component. More correctly, the component is cached for rendering. More...
 
const ComponentArea & getComponentArea () const
 Return the ComponentArea of this component. More...
 
void setComponentArea (const ComponentArea &area)
 Set the conponent's ComponentArea. More...
 
const ColourRect & getColours () const
 Return the ColourRect used by this component. More...
 
void setColours (const ColourRect &cols)
 Set the colours to be used by this component. More...
 
void setColoursPropertySource (const String &property)
 Set the name of the property where colour values can be obtained. More...
 
virtual bool handleFontRenderSizeChange (Window &window, const Font *font) const
 perform any processing required due to the given font having changed.
 
void render (Window &srcWindow, const CEGUI::ColourRect *modColours=0, const Rectf *clipper=0, bool clipToDisplay=false) const
 Render this component. More correctly, the component is cached for rendering. More...
 
void render (Window &srcWindow, const Rectf &baseRect, const CEGUI::ColourRect *modColours=0, const Rectf *clipper=0, bool clipToDisplay=false) const
 Render this component. More correctly, the component is cached for rendering. More...
 
const ComponentArea & getComponentArea () const
 Return the ComponentArea of this component. More...
 
void setComponentArea (const ComponentArea &area)
 Set the conponent's ComponentArea. More...
 
const ColourRect & getColours () const
 Return the ColourRect used by this component. More...
 
void setColours (const ColourRect &cols)
 Set the colours to be used by this component. More...
 
void setColoursPropertySource (const String &property)
 Set the name of the property where colour values can be obtained. More...
 
virtual bool handleFontRenderSizeChange (Window &window, const Font *font) const
 perform any processing required due to the given font having changed.
 

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 render_impl (Window &srcWindow, Rectf &destRect, const CEGUI::ColourRect *modColours, const Rectf *clipper, bool clipToDisplay) const
 Function to do main render caching work.
 
- Protected Member Functions inherited from CEGUI::FalagardComponentBase
void initColoursRect (const Window &wnd, const ColourRect *modCols, ColourRect &cr) const
 Helper function to initialise a ColourRect with appropriate values according to the way the component 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...
 
void initColoursRect (const Window &wnd, const ColourRect *modCols, ColourRect &cr) const
 Helper function to initialise a ColourRect with appropriate values according to the way the component 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...
 

Protected Attributes

const Image * d_image
 
FormattingSetting< VerticalFormatting > d_vertFormatting
 Vertical formatting to be applied when rendering the image component.
 
FormattingSetting< HorizontalFormatting > d_horzFormatting
 Horizontal formatting to be applied when rendering the image component.
 
String d_imagePropertyName
 Name of the property to access to obtain the image to be used.
 
- 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.
 

Detailed Description

Class that encapsulates information for a single image component.

Member Function Documentation

HorizontalFormatting CEGUI::ImageryComponent::getHorizontalFormatting ( const Window &  wnd) const

Return the current horizontal formatting setting for this ImageryComponent.

Returns
One of the HorizontalFormatting enumerated values.

References d_horzFormatting.

HorizontalFormatting CEGUI::ImageryComponent::getHorizontalFormatting ( const Window &  wnd) const

Return the current horizontal formatting setting for this ImageryComponent.

Returns
One of the HorizontalFormatting enumerated values.
const Image * CEGUI::ImageryComponent::getImage ( ) const

Return the Image object that will be drawn by this ImageryComponent.

Returns
Image object.

References d_image.

Referenced by CEGUI::ImagerySection::addImageryComponent().

const Image* CEGUI::ImageryComponent::getImage ( ) const

Return the Image object that will be drawn by this ImageryComponent.

Returns
Image object.
const String & CEGUI::ImageryComponent::getImagePropertySource ( ) const

Return the name of the property that will be used to determine the image for this ImageryComponent.

Returns
String object holding the name of a Propery.

References d_imagePropertyName.

const String& CEGUI::ImageryComponent::getImagePropertySource ( ) const

Return the name of the property that will be used to determine the image for this ImageryComponent.

Returns
String object holding the name of a Propery.
VerticalFormatting CEGUI::ImageryComponent::getVerticalFormatting ( const Window &  wnd) const

Return the current vertical formatting setting for this ImageryComponent.

Returns
One of the VerticalFormatting enumerated values.
VerticalFormatting CEGUI::ImageryComponent::getVerticalFormatting ( const Window &  wnd) const

Return the current vertical formatting setting for this ImageryComponent.

Returns
One of the VerticalFormatting enumerated values.

References d_vertFormatting.

bool CEGUI::ImageryComponent::isImageFetchedFromProperty ( ) const

Return whether this ImageryComponent fetches it's image via a property on the target window.

Returns
  • true if the image comes via a Propery.
  • false if the image is defined explicitly.

References d_imagePropertyName, and CEGUI::String::empty().

Referenced by render_impl(), and writeXMLToStream().

bool CEGUI::ImageryComponent::isImageFetchedFromProperty ( ) const

Return whether this ImageryComponent fetches it's image via a property on the target window.

Returns
  • true if the image comes via a Propery.
  • false if the image is defined explicitly.
void CEGUI::ImageryComponent::setHorizontalFormatting ( HorizontalFormatting  fmt)

Set the horizontal formatting setting for this ImageryComponent.

Parameters
fmtOne of the HorizontalFormatting enumerated values.
Returns
Nothing.

References d_horzFormatting.

Referenced by CEGUI::Falagard_xmlHandler::elementEndLocal().

void CEGUI::ImageryComponent::setHorizontalFormatting ( HorizontalFormatting  fmt)

Set the horizontal formatting setting for this ImageryComponent.

Parameters
fmtOne of the HorizontalFormatting enumerated values.
Returns
Nothing.
void CEGUI::ImageryComponent::setImage ( const Image *  image)

Set the Image that will be drawn by this ImageryComponent.

Parameters
Pointerto the Image object to be drawn by this ImageryComponent.
Returns
Nothing.
void CEGUI::ImageryComponent::setImage ( const Image *  image)

Set the Image that will be drawn by this ImageryComponent.

Parameters
Pointerto the Image object to be drawn by this ImageryComponent.
Returns
Nothing.

References d_image.

Referenced by CEGUI::Falagard_xmlHandler::elementEndLocal().

void CEGUI::ImageryComponent::setImage ( const String &  name)

Set the Image that will be drawn by this ImageryComponent.

Parameters
nameString holding the name of the Image to be rendered.
Returns
Nothing.
void CEGUI::ImageryComponent::setImage ( const String &  name)

Set the Image that will be drawn by this ImageryComponent.

Parameters
nameString holding the name of the Image to be rendered.
Returns
Nothing.

References d_image.

void CEGUI::ImageryComponent::setImagePropertySource ( const String &  property)

Set the name of the property that will be used to determine the image for this ImageryComponent.

Parameters
propertyString object holding the name of a Propery. The property should access a imageset & image specification.
Returns
Nothing.

References d_imagePropertyName.

Referenced by CEGUI::Falagard_xmlHandler::elementEndLocal().

void CEGUI::ImageryComponent::setImagePropertySource ( const String &  property)

Set the name of the property that will be used to determine the image for this ImageryComponent.

Parameters
propertyString object holding the name of a Propery. The property should access a imageset & image specification.
Returns
Nothing.
void CEGUI::ImageryComponent::setVerticalFormatting ( VerticalFormatting  fmt)

Set the vertical formatting setting for this ImageryComponent.

Parameters
fmtOne of the VerticalFormatting enumerated values.
Returns
Nothing.
void CEGUI::ImageryComponent::setVerticalFormatting ( VerticalFormatting  fmt)

Set the vertical formatting setting for this ImageryComponent.

Parameters
fmtOne of the VerticalFormatting enumerated values.
Returns
Nothing.

References d_vertFormatting.

Referenced by CEGUI::Falagard_xmlHandler::elementEndLocal().

void CEGUI::ImageryComponent::writeXMLToStream ( XMLSerializer &  xml_stream) const

Writes an xml representation of this ImageryComponent to out_stream.

Parameters
xml_streamStream where xml data should be output.
Returns
Nothing.

Member Data Documentation

const Image * CEGUI::ImageryComponent::d_image
protected

CEGUI::Image to be drawn by this image component.

Referenced by getImage(), render_impl(), setImage(), and writeXMLToStream().