Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CEGUI::ImageDim Class Reference

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

#include <CEGUIFalDimensions.h>

Inheritance diagram for CEGUI::ImageDim:

Inheritance graph
[legend]
Collaboration diagram for CEGUI::ImageDim:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ImageDim (const String &imageset, const String &image, DimensionType dim)
 Constructor.
void setSourceImage (const String &imageset, const String &image)
 Sets the source image information for this ImageDim.
void setSourceDimension (DimensionType dim)
 Sets the source dimension type for this ImageDim.
float getValue (const Window &wnd) const
 Return a value that represents this dimension as absolute pixels.
float getValue (const Window &wnd, const Rect &container) const
 Return a value that represents this dimension as absolute pixels.
BaseDimclone () const
 Create an exact copy of the specialised class and return it as a pointer to a BaseDim object.
DimensionOperator getDimensionOperator () const
 Return the DimensionOperator set for this BaseDim based object.
void setDimensionOperator (DimensionOperator op)
 Set the DimensionOperator set for this BaseDim based object.
const BaseDimgetOperand () const
 Return a pointer to the BaseDim set to be used as the other operand.
void setOperand (const BaseDim &operand)
 Set the BaseDim set to be used as the other operand in calculations for this BaseDim.
void writeXMLToStream (OutStream &out_stream) const
 Writes an xml representation of this BaseDim to out_stream.

Protected Member Functions

float getValue_impl (const Window &wnd) const
 Implementataion method to return the base value for this BaseDim. This method should not attempt to apply the mathematical operator; this is handled automatically.
float getValue_impl (const Window &wnd, const Rect &container) const
 Implementataion method to return the base value for this BaseDim. This method should not attempt to apply the mathematical operator; this is handled automatically by BaseDim.
void writeXMLElementName_impl (OutStream &out_stream) const
 Implementataion method to output real xml element name to an OutStream. This method should not write the element opening '<' character, nor close the element, it must write just the element name itself.
void writeXMLElementAttributes_impl (OutStream &out_stream) const
 Implementataion method to output xml element attributes to an OutStream. This method should not write the element opening '<' character, nor close the element, it must write just the element attributes.
BaseDimclone_impl () const
 Implementataion method to return a clone of this sub-class of BaseDim. This method should not attempt to clone the mathematical operator or operand; theis is handled automatically by BaseDim.

Detailed Description

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

Definition at line 233 of file CEGUIFalDimensions.h.


Constructor & Destructor Documentation

CEGUI::ImageDim::ImageDim const String imageset,
const String image,
DimensionType  dim
 

Constructor.

Parameters:
imageset String object holding the name of the imagseset which contains the image.
image String object holding the name of the image.
dim DimensionType value indicating which dimension of the described image that this ImageDim is to represent.

Definition at line 222 of file CEGUIFalDimensions.cpp.

Referenced by clone_impl().


Member Function Documentation

BaseDim * CEGUI::BaseDim::clone  )  const [inherited]
 

Create an exact copy of the specialised class 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.

Returns:
BaseDim object pointer

Definition at line 113 of file CEGUIFalDimensions.cpp.

References CEGUI::BaseDim::clone(), CEGUI::BaseDim::clone_impl(), CEGUI::BaseDim::d_operand, and CEGUI::BaseDim::d_operator.

Referenced by CEGUI::BaseDim::clone(), CEGUI::Dimension::Dimension(), CEGUI::Dimension::operator=(), CEGUI::Dimension::setBaseDimension(), and CEGUI::BaseDim::setOperand().

BaseDim * CEGUI::ImageDim::clone_impl  )  const [protected, virtual]
 

Implementataion method to return a clone of this sub-class of BaseDim. This method should not attempt to clone the mathematical operator or operand; theis is handled automatically by BaseDim.

Implements CEGUI::BaseDim.

Definition at line 294 of file CEGUIFalDimensions.cpp.

References ImageDim().

DimensionOperator CEGUI::BaseDim::getDimensionOperator  )  const [inherited]
 

Return the DimensionOperator set for this BaseDim based object.

Returns:
One of the DimensionOperator enumerated values representing a mathematical operation to be performed upon this BaseDim using the set operand.

Definition at line 128 of file CEGUIFalDimensions.cpp.

const BaseDim * CEGUI::BaseDim::getOperand  )  const [inherited]
 

Return a pointer to the BaseDim set to be used as the other operand.

Returns:
Pointer to the BaseDim object.

Definition at line 138 of file CEGUIFalDimensions.cpp.

float CEGUI::BaseDim::getValue const Window wnd,
const Rect container
const [inherited]
 

Return a value that represents this dimension as absolute pixels.

Parameters:
wnd Window 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).
container Rect 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.

Definition at line 82 of file CEGUIFalDimensions.cpp.

References CEGUI::DOP_ADD, CEGUI::DOP_DIVIDE, CEGUI::DOP_MULTIPLY, CEGUI::DOP_SUBTRACT, CEGUI::BaseDim::getValue(), and CEGUI::BaseDim::getValue_impl().

float CEGUI::BaseDim::getValue const Window wnd  )  const [inherited]
 

Return a value that represents this dimension as absolute pixels.

Parameters:
wnd Window 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.

Definition at line 51 of file CEGUIFalDimensions.cpp.

References CEGUI::DOP_ADD, CEGUI::DOP_DIVIDE, CEGUI::DOP_MULTIPLY, CEGUI::DOP_SUBTRACT, CEGUI::BaseDim::getValue(), and CEGUI::BaseDim::getValue_impl().

Referenced by CEGUI::ComponentArea::getPixelRect(), CEGUI::BaseDim::getValue(), CEGUI::PropertyDim::getValue_impl(), CEGUI::FontDim::getValue_impl(), CEGUI::WidgetDim::getValue_impl(), and getValue_impl().

float CEGUI::ImageDim::getValue_impl const Window wnd,
const Rect container
const [protected, virtual]
 

Implementataion method to return the base value for this BaseDim. This method should not attempt to apply the mathematical operator; this is handled automatically by BaseDim.

Implements CEGUI::BaseDim.

Definition at line 287 of file CEGUIFalDimensions.cpp.

References CEGUI::BaseDim::getValue().

float CEGUI::ImageDim::getValue_impl const Window wnd  )  const [protected, virtual]
 

Implementataion method to return the base value for this BaseDim. This method should not attempt to apply the mathematical operator; this is handled automatically.

Implements CEGUI::BaseDim.

Definition at line 239 of file CEGUIFalDimensions.cpp.

References CEGUI::Rect::d_bottom, CEGUI::Rect::d_left, CEGUI::Rect::d_right, CEGUI::Rect::d_top, CEGUI::DT_BOTTOM_EDGE, CEGUI::DT_HEIGHT, CEGUI::DT_LEFT_EDGE, CEGUI::DT_RIGHT_EDGE, CEGUI::DT_TOP_EDGE, CEGUI::DT_WIDTH, CEGUI::DT_X_OFFSET, CEGUI::DT_X_POSITION, CEGUI::DT_Y_OFFSET, CEGUI::DT_Y_POSITION, CEGUI::Image::getHeight(), CEGUI::Imageset::getImage(), CEGUI::ImagesetManager::getImageset(), CEGUI::Image::getOffsetX(), CEGUI::Image::getOffsetY(), CEGUI::ImagesetManager::getSingleton(), CEGUI::Image::getSourceTextureArea(), and CEGUI::Image::getWidth().

void CEGUI::BaseDim::setDimensionOperator DimensionOperator  op  )  [inherited]
 

Set the DimensionOperator set for this BaseDim based object.

Parameters:
op One of the DimensionOperator enumerated values representing a mathematical operation to be performed upon this BaseDim using the set operand.
Returns:
Nothing.

Definition at line 133 of file CEGUIFalDimensions.cpp.

void CEGUI::BaseDim::setOperand const BaseDim operand  )  [inherited]
 

Set the BaseDim set to be used as the other operand in calculations for this BaseDim.

Parameters:
operand sub-class of BaseDim representing the 'other' operand. The given object will be cloned; no transfer of ownership occurrs for the passed object.
Returns:
Nothing.

Definition at line 143 of file CEGUIFalDimensions.cpp.

References CEGUI::BaseDim::clone().

void CEGUI::ImageDim::setSourceDimension DimensionType  dim  ) 
 

Sets the source dimension type for this ImageDim.

Parameters:
dim DimensionType value indicating which dimension of the described image that this ImageDim is to represent.
Returns:
Nothing.

Definition at line 234 of file CEGUIFalDimensions.cpp.

void CEGUI::ImageDim::setSourceImage const String imageset,
const String image
 

Sets the source image information for this ImageDim.

Parameters:
imageset String object holding the name of the imagseset which contains the image.
image String object holding the name of the image.
Returns:
Nothing.

Definition at line 228 of file CEGUIFalDimensions.cpp.

void CEGUI::ImageDim::writeXMLElementAttributes_impl OutStream out_stream  )  const [protected, virtual]
 

Implementataion method to output xml element attributes to an OutStream. This method should not write the element opening '<' character, nor close the element, it must write just the element attributes.

Implements CEGUI::BaseDim.

Definition at line 305 of file CEGUIFalDimensions.cpp.

References CEGUI::FalagardXMLHelper::dimensionTypeToString().

void CEGUI::ImageDim::writeXMLElementName_impl OutStream out_stream  )  const [protected, virtual]
 

Implementataion method to output real xml element name to an OutStream. This method should not write the element opening '<' character, nor close the element, it must write just the element name itself.

Implements CEGUI::BaseDim.

Definition at line 300 of file CEGUIFalDimensions.cpp.

void CEGUI::BaseDim::writeXMLToStream OutStream out_stream  )  const [inherited]
 

Writes an xml representation of this BaseDim to out_stream.

Parameters:
out_stream Stream where xml data should be output.
Returns:
Nothing.

Definition at line 151 of file CEGUIFalDimensions.cpp.

References CEGUI::FalagardXMLHelper::dimensionOperatorToString(), CEGUI::BaseDim::writeXMLElementAttributes_impl(), CEGUI::BaseDim::writeXMLElementName_impl(), and CEGUI::BaseDim::writeXMLToStream().

Referenced by CEGUI::Dimension::writeXMLToStream(), and CEGUI::BaseDim::writeXMLToStream().


The documentation for this class was generated from the following files:
Generated on Wed Sep 7 10:09:58 2005 for Crazy Eddies GUI System by  doxygen 1.4.3