#include <CEGUIFalDimensions.h>
Inheritance diagram for CEGUI::WidgetDim:
Public Member Functions | |
WidgetDim (const String &name, DimensionType dim) | |
Constructor. | |
void | setWidgetName (const String &name) |
Set the name suffix to use 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 Rect &container) const |
Return a value that represents this dimension as absolute pixels. | |
BaseDim * | clone () 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 BaseDim * | getOperand () 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. | |
BaseDim * | clone_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. |
When calculating the final pixel value for the dimension, a target widget name is built by appending the name suffix specified for the WidgetDim to the name of the window passed to getValue, we then find the window/widget with that name - the final value of the dimension is taken from this window/widget.
Definition at line 304 of file CEGUIFalDimensions.h.
|
Constructor.
Definition at line 312 of file CEGUIFalDimensions.cpp. Referenced by clone_impl(). |
|
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.
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(). |
|
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 392 of file CEGUIFalDimensions.cpp. References WidgetDim(). |
|
Return the DimensionOperator set for this BaseDim based object.
Definition at line 128 of file CEGUIFalDimensions.cpp. |
|
Return a pointer to the BaseDim set to be used as the other operand.
Definition at line 138 of file CEGUIFalDimensions.cpp. |
|
Return a value that represents this dimension as absolute pixels.
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(). |
|
Return a value that represents this dimension as absolute pixels.
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(), getValue_impl(), and CEGUI::ImageDim::getValue_impl(). |
|
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 386 of file CEGUIFalDimensions.cpp. References CEGUI::BaseDim::getValue(). |
|
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 327 of file CEGUIFalDimensions.cpp. References CEGUI::Rect::d_bottom, CEGUI::Rect::d_right, CEGUI::Vector2::d_x, CEGUI::Vector2::d_y, 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::String::empty(), CEGUI::Window::getAbsoluteHeight(), CEGUI::Window::getAbsolutePosition(), CEGUI::Window::getAbsoluteRect(), CEGUI::Window::getAbsoluteWidth(), CEGUI::Window::getName(), CEGUI::Logger::getSingleton(), CEGUI::WindowManager::getSingleton(), CEGUI::WindowManager::getWindow(), and CEGUI::Logger::logEvent(). |
|
Set the DimensionOperator set for this BaseDim based object.
Definition at line 133 of file CEGUIFalDimensions.cpp. |
|
Set the BaseDim set to be used as the other operand in calculations for this BaseDim.
Definition at line 143 of file CEGUIFalDimensions.cpp. References CEGUI::BaseDim::clone(). |
|
Sets the source dimension type for this WidgetDim.
Definition at line 322 of file CEGUIFalDimensions.cpp. |
|
Set the name suffix to use for this WidgetDim.
Definition at line 317 of file CEGUIFalDimensions.cpp. |
|
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 403 of file CEGUIFalDimensions.cpp. References CEGUI::FalagardXMLHelper::dimensionTypeToString(), and CEGUI::String::empty(). |
|
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 398 of file CEGUIFalDimensions.cpp. |
|
Writes an xml representation of this BaseDim to out_stream.
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(). |