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

Abstract interface for a generic 'dimension' class. More...

Inherits CEGUI::AllocatedObject< BaseDim >.

Inherited by CEGUI::AbsoluteDim, CEGUI::FontDim, CEGUI::ImageDimBase, CEGUI::OperatorDim, CEGUI::PropertyDim, CEGUI::UnifiedDim, and CEGUI::WidgetDim.

+ Collaboration diagram for CEGUI::BaseDim:

Public Member Functions

virtual float getValue (const Window &wnd) const =0
 Return a value that represents this dimension as absolute pixels. More...
 
virtual float getValue (const Window &wnd, const Rectf &container) const =0
 Return a value that represents this dimension as absolute pixels. More...
 
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 void writeXMLElementName_impl (XMLSerializer &xml_stream) const =0
 Implementataion method to output real xml element name.
 
virtual void writeXMLElementAttributes_impl (XMLSerializer &xml_stream) const =0
 Implementataion method to create the element attributes.
 

Detailed Description

Abstract interface for a generic 'dimension' class.

Member Function Documentation

virtual BaseDim* CEGUI::BaseDim::clone ( ) const
pure virtual

Create an exact copy of the specialised object and return it as a pointer to a BaseDim object.

Since the system needs to be able to copy objects derived from BaseDim, but only has knowledge of the BaseDim interface, this clone method is provided to prevent slicing issues.

Implemented in CEGUI::PropertyDim, CEGUI::FontDim, CEGUI::UnifiedDim, CEGUI::WidgetDim, CEGUI::ImagePropertyDim, CEGUI::ImageDim, CEGUI::AbsoluteDim, and CEGUI::OperatorDim.

virtual float CEGUI::BaseDim::getValue ( const Window wnd) const
pure 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.

Implemented in CEGUI::PropertyDim, CEGUI::FontDim, CEGUI::UnifiedDim, CEGUI::WidgetDim, CEGUI::ImageDimBase, CEGUI::AbsoluteDim, and CEGUI::OperatorDim.

virtual float CEGUI::BaseDim::getValue ( const Window wnd,
const Rectf container 
) const
pure 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.

Implemented in CEGUI::PropertyDim, CEGUI::FontDim, CEGUI::UnifiedDim, CEGUI::WidgetDim, CEGUI::ImageDimBase, CEGUI::AbsoluteDim, and CEGUI::OperatorDim.

virtual void CEGUI::BaseDim::writeXMLToStream ( XMLSerializer xml_stream) const
virtual

Writes an xml representation of this BaseDim to out_stream.

Parameters
xml_streamStream where xml data should be output.

Reimplemented in CEGUI::OperatorDim.