Dimension type that represents the value of a Window property. Implements BaseDim interface.
More...
Dimension type that represents the value of a Window property. Implements BaseDim interface.
Constructor.
- Parameters
-
name | String holding the name suffix of the window on which the property is to be accessed. |
property | String 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. |
type | DimensionType 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.
|
BaseDim* CEGUI::PropertyDim::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.
const String& CEGUI::PropertyDim::getPropertyName |
( |
| ) |
const |
Get the name of the property to use for this WidgetDim.
- Returns
- String object holding the name of the property.
Gets the source dimension type for this WidgetDim.
- Returns
- DimensionType value indicating which dimension of the target window to use as the reference / base value when accessing a property that represents a unified dimension:
- DT_INVALID if the property does not represent a unified dim.
- DT_WIDTH to use target width as reference value.
- DT_HEIGHT to use target hight as reference value.
float CEGUI::PropertyDim::getValue |
( |
const Window & |
wnd | ) |
const |
|
virtual |
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.
Implements CEGUI::BaseDim.
float CEGUI::PropertyDim::getValue |
( |
const Window & |
wnd, |
|
|
const Rectf & |
container |
|
) |
| const |
|
virtual |
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.
Implements CEGUI::BaseDim.
const String& CEGUI::PropertyDim::getWidgetName |
( |
| ) |
const |
Get the name suffix to use for this WidgetDim.
- Returns
- String object holding the name suffix for a window/widget.
void CEGUI::PropertyDim::setPropertyName |
( |
const String & |
property | ) |
|
Set the name of the property to use for this WidgetDim.
- Parameters
-
property | String object holding the name of the property. |
- Returns
- Nothing.
Sets the source dimension type for this WidgetDim.
- Parameters
-
dim | DimensionType value indicating which dimension of the target window to use as the reference / base value when accessing a property that represents a unified dimension:
- DT_INVALID if the property does not represent a unified dim.
- DT_WIDTH to use target width as reference value.
- DT_HEIGHT to use target hight as reference value.
|
void CEGUI::PropertyDim::setWidgetName |
( |
const String & |
name | ) |
|
Set the name suffix to use for this WidgetDim.
- Parameters
-
name | String object holding the name suffix for a window/widget. |
- Returns
- Nothing.