Crazy Eddie's GUI System
${CEGUI_VERSION}
|
Dimension type that represents the value of a Window property. Implements BaseDim interface. More...
Public Member Functions | |
PropertyDim (const String &name, const String &property, DimensionType type) | |
Constructor. More... | |
const String & | getWidgetName () const |
Get the name suffix to use for this WidgetDim. More... | |
void | setWidgetName (const String &name) |
Set the name suffix to use for this WidgetDim. More... | |
const String & | getPropertyName () const |
Get the name of the property to use for this WidgetDim. More... | |
void | setPropertyName (const String &property) |
Set the name of the property to use for this WidgetDim. More... | |
DimensionType | getSourceDimension () const |
Gets the source dimension type for this WidgetDim. More... | |
void | setSourceDimension (DimensionType dim) |
Sets the source dimension type for this WidgetDim. More... | |
float | getValue (const Window &wnd) const |
Return a value that represents this dimension as absolute pixels. More... | |
float | getValue (const Window &wnd, const Rectf &container) const |
Return a value that represents this dimension as absolute pixels. More... | |
BaseDim * | clone () const |
Create an exact copy of the specialised object and return it as a pointer to a BaseDim object. More... | |
PropertyDim (const String &name, const String &property, DimensionType type) | |
Constructor. More... | |
const String & | getWidgetName () const |
Get the name suffix to use for this WidgetDim. More... | |
void | setWidgetName (const String &name) |
Set the name suffix to use for this WidgetDim. More... | |
const String & | getPropertyName () const |
Get the name of the property to use for this WidgetDim. More... | |
void | setPropertyName (const String &property) |
Set the name of the property to use for this WidgetDim. More... | |
DimensionType | getSourceDimension () const |
Gets the source dimension type for this WidgetDim. More... | |
void | setSourceDimension (DimensionType dim) |
Sets the source dimension type for this WidgetDim. More... | |
float | getValue (const Window &wnd) const |
Return a value that represents this dimension as absolute pixels. More... | |
float | getValue (const Window &wnd, const Rectf &container) const |
Return a value that represents this dimension as absolute pixels. More... | |
BaseDim * | clone () const |
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. | |
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 | |
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. | |
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::PropertyDim::PropertyDim | ( | const String & | name, |
const String & | property, | ||
DimensionType | type | ||
) |
Constructor.
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:
|
CEGUI::PropertyDim::PropertyDim | ( | const String & | name, |
const String & | property, | ||
DimensionType | type | ||
) |
Constructor.
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:
|
|
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.
Reimplemented in PropertyDim_wrapper.
Referenced by PropertyDim_wrapper::clone().
|
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.
Referenced by PropertyDim_wrapper::clone().
const String& CEGUI::PropertyDim::getPropertyName | ( | ) | const |
DimensionType CEGUI::PropertyDim::getSourceDimension | ( | ) | const |
Gets the source dimension type for this WidgetDim.
Referenced by PropertyDim_wrapper::clone().
DimensionType CEGUI::PropertyDim::getSourceDimension | ( | ) | const |
Gets the source dimension type for this WidgetDim.
|
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.
|
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.
References CEGUI::CoordConverter::asAbsolute(), CEGUI::DT_HEIGHT, CEGUI::DT_INVALID, CEGUI::DT_WIDTH, CEGUI::String::empty(), CEGUI::Window::getChild(), CEGUI::Property::getDataType(), CEGUI::Element::getPixelSize(), CEGUI::PropertySet::getProperty(), and CEGUI::PropertySet::getPropertyInstance().
Referenced by PropertyDim_wrapper::clone(), and getValue().
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.
References getValue().
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.
const String& CEGUI::PropertyDim::getWidgetName | ( | ) | const |
const String & CEGUI::PropertyDim::getWidgetName | ( | ) | const |
Get the name suffix to use for this WidgetDim.
Referenced by PropertyDim_wrapper::clone().
void CEGUI::PropertyDim::setPropertyName | ( | const String & | property | ) |
void CEGUI::PropertyDim::setPropertyName | ( | const String & | property | ) |
Set the name of the property to use for this WidgetDim.
property | String object holding the name of the property. |
Referenced by PropertyDim_wrapper::clone().
void CEGUI::PropertyDim::setSourceDimension | ( | DimensionType | dim | ) |
Sets the source dimension type for this WidgetDim.
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:
|
void CEGUI::PropertyDim::setSourceDimension | ( | DimensionType | dim | ) |
Sets the source dimension type for this WidgetDim.
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:
|
Referenced by PropertyDim_wrapper::clone().
void CEGUI::PropertyDim::setWidgetName | ( | const String & | name | ) |
void CEGUI::PropertyDim::setWidgetName | ( | const String & | name | ) |
Set the name suffix to use for this WidgetDim.
name | String object holding the name suffix for a window/widget. |
Referenced by PropertyDim_wrapper::clone().