Crazy Eddie's GUI System  0.8.7
CEGUI::ImageDimBase Class Referenceabstract

Dimension type that represents some dimension of an Image. Implements BaseDim interface. More...

+ Inheritance diagram for CEGUI::ImageDimBase:
+ Collaboration diagram for CEGUI::ImageDimBase:

Public Member Functions

 ImageDimBase (DimensionType dim)
 Constructor. More...
 
DimensionType getSourceDimension () const
 Gets the source dimension type for this WidgetDim. More...
 
void setSourceDimension (DimensionType dim)
 Sets the source dimension type for this ImageDim. More...
 
float getValue (const Window &wnd) const
 Return a value that represents this dimension as absolute pixels. More...
 
float getValue (const Window &wnd, const Rectf &container) const
 Return a value that represents this dimension as absolute pixels. More...
 
- Public Member Functions inherited from CEGUI::BaseDim
virtual BaseDimclone () const =0
 Create an exact copy of the specialised object and return it as a pointer to a BaseDim object. More...
 
virtual void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this BaseDim to out_stream. More...
 
virtual bool handleFontRenderSizeChange (Window &window, const Font *font) const
 perform any processing required due to the given font having changed.
 

Protected Member Functions

virtual const ImagegetSourceImage (const Window &wnd) const =0
 return the image instance to access
 
void writeXMLElementAttributes_impl (XMLSerializer &xml_stream) const
 Implementataion method to create the element attributes.
 
- Protected Member Functions inherited from CEGUI::BaseDim
virtual void writeXMLElementName_impl (XMLSerializer &xml_stream) const =0
 Implementataion method to output real xml element name.
 

Protected Attributes

DimensionType d_what
 the dimension of the image that we are to represent.
 

Detailed Description

Dimension type that represents some dimension of an Image. Implements BaseDim interface.

Constructor & Destructor Documentation

CEGUI::ImageDimBase::ImageDimBase ( DimensionType  dim)

Constructor.

Parameters
dimDimensionType value indicating which dimension of an Image that this ImageDim is to represent.

Member Function Documentation

DimensionType CEGUI::ImageDimBase::getSourceDimension ( ) const

Gets the source dimension type for this WidgetDim.

Returns
DimensionType value indicating which dimension of the described image that this WidgetDim is to represent.
float CEGUI::ImageDimBase::getValue ( const Window wnd) const
virtual

Return a value that represents this dimension as absolute pixels.

Parameters
wndWindow object that may be used by the specialised class to aid in calculating the final value.
Returns
float value which represents, in pixels, the same value as this BaseDim.

Implements CEGUI::BaseDim.

float CEGUI::ImageDimBase::getValue ( const Window wnd,
const Rectf container 
) const
virtual

Return a value that represents this dimension as absolute pixels.

Parameters
wndWindow object that may be used by the specialised class to aid in calculating the final value (typically would be used to obtain window/widget dimensions).
containerRect object which describes an area to be considered as the base area when calculating the final value. Basically this means that relative values are calculated from the dimensions of this Rect.
Returns
float value which represents, in pixels, the same value as this BaseDim.

Implements CEGUI::BaseDim.

void CEGUI::ImageDimBase::setSourceDimension ( DimensionType  dim)

Sets the source dimension type for this ImageDim.

Parameters
dimDimensionType value indicating which dimension of the described image that this ImageDim is to represent.