Crazy Eddies GUI System  0.7.2
Public Member Functions | Protected Member Functions | List of all members
CEGUI::PropertyDim Class Reference

Dimension type that represents the value of a Window property. Implements BaseDim interface. More...

+ Inheritance diagram for CEGUI::PropertyDim:
+ Collaboration diagram for CEGUI::PropertyDim:

Public Member Functions

 PropertyDim (const String &name, const String &property, DimensionType type)
 Constructor. More...
 
- Public Member Functions inherited from CEGUI::BaseDim
float getValue (const Window &wnd) const
 Return a value that represents this dimension as absolute pixels. More...
 
float getValue (const Window &wnd, const Rect &container) const
 Return a value that represents this dimension as absolute pixels. More...
 
BaseDimclone () const
 Create an exact copy of the specialised class and return it as a pointer to a BaseDim object. More...
 
DimensionOperator getDimensionOperator () const
 Return the DimensionOperator set for this BaseDim based object. More...
 
void setDimensionOperator (DimensionOperator op)
 Set the DimensionOperator set for this BaseDim based object. More...
 
const BaseDimgetOperand () const
 Return a pointer to the BaseDim set to be used as the other operand. More...
 
void setOperand (const BaseDim &operand)
 Set the BaseDim set to be used as the other operand in calculations for this BaseDim. More...
 
void writeXMLToStream (XMLSerializer &xml_stream) const
 Writes an xml representation of this BaseDim to out_stream. More...
 

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 (XMLSerializer &xml_stream) const
 Implementataion method to output real xml element name.
 
void writeXMLElementAttributes_impl (XMLSerializer &xml_stream) const
 Implementataion method to create 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 the value of a Window property. Implements BaseDim interface.

Constructor & Destructor Documentation

CEGUI::PropertyDim::PropertyDim ( const String name,
const String property,
DimensionType  type 
)

Constructor.

Parameters
nameString holding the name suffix of the window on which the property is to be accessed.
propertyString object holding the name of the property this PropertyDim represents the value of. The property named should represent either a UDim value or a simple float value - dependning upon what type is specified as.
typeDimensionType value indicating what dimension named property represents. The possible DimensionType values are as follows:
  • DT_INVALID the property should represent a simple float value.
  • DT_WIDTH the property should represent a UDim value where the scale is relative to the targetted Window's width.
  • DT_HEIGHT the property should represent a UDim value where the scale is relative to the targetted Window's height.
  • All other values will cause an InvalidRequestException exception to be thrown.