Crazy Eddie's GUI System
${CEGUI_VERSION}
|
Utility class that helps in converting various types of co-ordinate between absolute screen positions and positions offset from the top-left corner of a given Window object. More...
Static Public Member Functions | |
static float | alignToPixels (float x) |
Static method used to return a float value rounded to the nearest integer. More... | |
static float | asAbsolute (const UDim &u, float base, bool pixelAlign=true) |
converts given UDim to absolute value | |
static float | asRelative (const UDim &u, float base) |
converts given UDim to relative value | |
static Vector2f | asAbsolute (const Vector2< UDim > &v, const Sizef &base, bool pixelAlign=true) |
converts given Vector2<UDim> to absolute Vector2f | |
static Vector2f | asRelative (const Vector2< UDim > &v, const Sizef &base) |
converts given Vector2<UDim> to relative Vector2f | |
static Sizef | asAbsolute (const Size< UDim > &v, const Sizef &base, bool pixelAlign=true) |
converts given Size<UDim> to absolute Sizef | |
static Sizef | asRelative (const Size< UDim > &v, const Sizef &base) |
converts given Size<UDim> to relative Sizef | |
static Rectf | asAbsolute (const URect &r, const Sizef &base, bool pixelAlign=true) |
static Rectf | asRelative (const URect &r, const Sizef &base) |
static float | screenToWindowX (const Window &window, const UDim &x) |
Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels. More... | |
static float | screenToWindowX (const Window &window, const float x) |
Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels. More... | |
static float | screenToWindowY (const Window &window, const UDim &y) |
Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels. More... | |
static float | screenToWindowY (const Window &window, const float y) |
Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels. More... | |
static Vector2f | screenToWindow (const Window &window, const UVector2 &vec) |
Convert a screen relative UVector2 point to a window co-ordinate point, specified in pixels. More... | |
static Vector2f | screenToWindow (const Window &window, const Vector2f &vec) |
Convert a screen Vector2 pixel point to a window co-ordinate point, specified in pixels. More... | |
static Rectf | screenToWindow (const Window &window, const URect &rect) |
Convert a URect screen area to a window area, specified in pixels. More... | |
static Rectf | screenToWindow (const Window &window, const Rectf &rect) |
Convert a Rect screen pixel area to a window area, specified in pixels. More... | |
static float | alignToPixels (float x) |
Static method used to return a float value rounded to the nearest integer. More... | |
static float | asAbsolute (const UDim &u, float base, bool pixelAlign=true) |
converts given UDim to absolute value | |
static float | asRelative (const UDim &u, float base) |
converts given UDim to relative value | |
static Vector2f | asAbsolute (const Vector2< UDim > &v, const Sizef &base, bool pixelAlign=true) |
converts given Vector2<UDim> to absolute Vector2f | |
static Vector2f | asRelative (const Vector2< UDim > &v, const Sizef &base) |
converts given Vector2<UDim> to relative Vector2f | |
static Sizef | asAbsolute (const Size< UDim > &v, const Sizef &base, bool pixelAlign=true) |
converts given Size<UDim> to absolute Sizef | |
static Sizef | asRelative (const Size< UDim > &v, const Sizef &base) |
converts given Size<UDim> to relative Sizef | |
static Rectf | asAbsolute (const URect &r, const Sizef &base, bool pixelAlign=true) |
static Rectf | asRelative (const URect &r, const Sizef &base) |
static float | screenToWindowX (const Window &window, const UDim &x) |
Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels. More... | |
static float | screenToWindowX (const Window &window, const float x) |
Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels. More... | |
static float | screenToWindowY (const Window &window, const UDim &y) |
Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels. More... | |
static float | screenToWindowY (const Window &window, const float y) |
Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels. More... | |
static Vector2f | screenToWindow (const Window &window, const UVector2 &vec) |
Convert a screen relative UVector2 point to a window co-ordinate point, specified in pixels. More... | |
static Vector2f | screenToWindow (const Window &window, const Vector2f &vec) |
Convert a screen Vector2 pixel point to a window co-ordinate point, specified in pixels. More... | |
static Rectf | screenToWindow (const Window &window, const URect &rect) |
Convert a URect screen area to a window area, specified in pixels. More... | |
static Rectf | screenToWindow (const Window &window, const Rectf &rect) |
Convert a Rect screen pixel area to a window area, specified in pixels. More... | |
Utility class that helps in converting various types of co-ordinate between absolute screen positions and positions offset from the top-left corner of a given Window object.
|
inlinestatic |
Static method used to return a float value rounded to the nearest integer.
This method is used throughout the library to ensure that elements are kept at integer pixel positions on the display if user wishes so.
x | Expression to be rounded to nearest whole number |
Referenced by CEGUI::Element::calculatePixelSize(), CEGUI::ListboxTextItem::draw(), CEGUI::FalagardTooltip::getTextSize(), CEGUI::Element::getUnclippedOuterRect_impl(), CEGUI::Menubar::layoutItemWidgets(), CEGUI::PopupMenu::layoutItemWidgets(), CEGUI::FalagardProgressBar::render(), CEGUI::FalagardStaticText::render(), CEGUI::ImageryComponent::render_impl(), CEGUI::FrameComponent::render_impl(), and screenToWindow().
|
inlinestatic |
Static method used to return a float value rounded to the nearest integer.
This method is used throughout the library to ensure that elements are kept at integer pixel positions on the display if user wishes so.
x | Expression to be rounded to nearest whole number |
|
static |
Convert a screen relative UVector2 point to a window co-ordinate point, specified in pixels.
window | Window object to use as a target for the conversion. |
vec | UVector2 object describing the point to be converted |
References asAbsolute(), and CEGUI::Window::getRootContainerSize().
Referenced by CEGUI::Listbox::getItemAtPoint(), CEGUI::MultiLineEditbox::getTextIndexFromPosition(), CEGUI::Titlebar::onMouseButtonDown(), CEGUI::Thumb::onMouseButtonDown(), CEGUI::DragContainer::onMouseButtonDown(), CEGUI::ListHeaderSegment::onMouseButtonDown(), CEGUI::FrameWindow::onMouseButtonDown(), CEGUI::Tree::onMouseButtonDown(), CEGUI::MultiColumnList::onMouseButtonDown(), CEGUI::Titlebar::onMouseMove(), CEGUI::Thumb::onMouseMove(), CEGUI::DragContainer::onMouseMove(), CEGUI::ListHeaderSegment::onMouseMove(), CEGUI::FrameWindow::onMouseMove(), CEGUI::Tree::onMouseMove(), CEGUI::ListHeader::onSegmentOffsetChanged(), and CEGUI::DragContainer::pickUp().
|
static |
Convert a screen relative UVector2 point to a window co-ordinate point, specified in pixels.
window | Window object to use as a target for the conversion. |
vec | UVector2 object describing the point to be converted |
|
static |
|
static |
Convert a URect screen area to a window area, specified in pixels.
window | Window object to use as a target for the conversion. |
rect | URect object describing the area to be converted |
References asAbsolute(), CEGUI::Window::getRootContainerSize(), and CEGUI::Rect< T >::offset().
Convert a Rect screen pixel area to a window area, specified in pixels.
window | Window object to use as a target for the conversion. |
rect | Rect object describing the area to be converted. |
References alignToPixels(), asAbsolute(), CEGUI::Element::getArea(), CEGUI::Element::getChildContentArea(), CEGUI::Rect< T >::getHeight(), CEGUI::Element::getHorizontalAlignment(), CEGUI::Window::getParent(), CEGUI::Element::getPixelSize(), CEGUI::Window::getRootContainerSize(), CEGUI::Element::getVerticalAlignment(), CEGUI::Rect< T >::getWidth(), CEGUI::HA_CENTRE, CEGUI::HA_RIGHT, CEGUI::Element::isNonClient(), CEGUI::Rect< T >::offset(), CEGUI::VA_BOTTOM, and CEGUI::VA_CENTRE.
|
static |
Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels.
window | Window object to use as a target for the conversion. |
x | UDim x co-ordinate value to be converted |
Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels.
window | Window object to use as a target for the conversion. |
x | UDim x co-ordinate value to be converted |
References asAbsolute(), and CEGUI::Window::getRootContainerSize().
Referenced by CEGUI::FalagardEditbox::getTextIndexFromPosition(), and CEGUI::ColourPickerControls::setCallingColourPicker().
|
static |
Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels.
window | Window object to use as a target for the conversion. |
x | float x co-ordinate value to be converted. |
|
static |
Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels.
window | Window object to use as a target for the conversion. |
x | float x co-ordinate value to be converted. |
Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels.
window | Window object to use as a target for the conversion. |
y | UDim y co-ordinate value to be converted |
References asAbsolute(), and CEGUI::Window::getRootContainerSize().
Referenced by CEGUI::ColourPickerControls::setCallingColourPicker().
|
static |
Convert a screen relative UDim co-ordinate value to a window co-ordinate value, specified in pixels.
window | Window object to use as a target for the conversion. |
y | UDim y co-ordinate value to be converted |
|
static |
Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels.
window | Window object to use as a target for the conversion. |
y | UDim y co-ordinate value to be converted. |
|
static |
Convert a screen pixel co-ordinate value to a window co-ordinate value, specified in pixels.
window | Window object to use as a target for the conversion. |
y | UDim y co-ordinate value to be converted. |