7#ifndef MYGUI_WIDGET_TRANSLATE_H_
8#define MYGUI_WIDGET_TRANSLATE_H_
19 return _vert ? _widget->getWidth() : _widget->getHeight();
24 return _vert ? _widget->getHeight() : _widget->getWidth();
29 return _vert ? _widget->getLeft() : _widget->getTop();
34 return _vert ? _widget->getTop() : _widget->getLeft();
37 inline void setWidgetSize(Widget* _widget,
int _width,
int _height,
bool _vert)
39 _vert ? _widget->setSize(_width, _height) : _widget->setSize(_height, _width);
42 inline void setWidgetCoord(Widget* _widget,
int _left,
int _top,
int _width,
int _height,
bool _vert)
44 _vert ? _widget->setCoord(_left, _top, _width, _height) : _widget->setCoord(_top, _left, _height, _width);
51 std::swap(_coord.
left, _coord.
top);
int getWidgetLeft(Widget *_widget, bool _vert)
int getWidgetWidth(Widget *_widget, bool _vert)
void convertWidgetCoord(IntCoord &_coord, bool _vert)
void setWidgetSize(Widget *_widget, int _width, int _height, bool _vert)
int getWidgetHeight(Widget *_widget, bool _vert)
types::TCoord< int > IntCoord
int getWidgetTop(Widget *_widget, bool _vert)
void setWidgetCoord(Widget *_widget, int _left, int _top, int _width, int _height, bool _vert)