Crazy Eddie's GUI System
0.8.4
|
Dimension type that represents an Unified dimension. Implements BaseDim interface. More...
Public Member Functions | |
UnifiedDim (const UDim &value, DimensionType dim) | |
Constructor. | |
const UDim & | getBaseValue () const |
Get the current value of the UnifiedDim. | |
void | setBaseValue (const UDim &val) |
Set the current value of the UnifiedDim. | |
DimensionType | getSourceDimension () const |
Gets the source dimension type for this WidgetDim. | |
void | setSourceDimension (DimensionType dim) |
Sets the source dimension type for this WidgetDim. | |
float | getValue (const Window &wnd) const |
Return a value that represents this dimension as absolute pixels. | |
float | getValue (const Window &wnd, const Rectf &container) const |
Return a value that represents this dimension as absolute pixels. | |
BaseDim * | clone () const |
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object. | |
Protected Member Functions | |
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. |
CEGUI::UnifiedDim::UnifiedDim | ( | const UDim & | value, |
DimensionType | dim | ||
) |
Constructor.
value | UDim holding the value to assign to this UnifiedDim. |
dim | DimensionType value indicating what this UnifiedDim is to represent. This is required because we need to know what part of the base Window that the UDim scale component is to operate against. |
BaseDim* CEGUI::UnifiedDim::clone | ( | ) | const [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.
Implements CEGUI::BaseDim.
Gets the source dimension type for this WidgetDim.
float CEGUI::UnifiedDim::getValue | ( | const Window & | wnd | ) | const [virtual] |
Return a value that represents this dimension as absolute pixels.
wnd | Window object that may be used by the specialised class to aid in calculating the final value. |
Implements CEGUI::BaseDim.
float CEGUI::UnifiedDim::getValue | ( | const Window & | wnd, |
const Rectf & | container | ||
) | const [virtual] |
Return a value that represents this dimension as absolute pixels.
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. |
Implements CEGUI::BaseDim.
void CEGUI::UnifiedDim::setSourceDimension | ( | DimensionType | dim | ) |
Sets the source dimension type for this WidgetDim.
dim | DimensionType value indicating which dimension should be used as the scale reference / base value when calculating the pixel value of this dimension. |