MyGUI
3.2.2
MyGUIEngine
include
MyGUI_WidgetTranslate.h
Go to the documentation of this file.
1
/*
2
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
3
* Distributed under the MIT License
4
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5
*/
6
7
#ifndef MYGUI_WIDGET_TRANSLATE_H_
8
#define MYGUI_WIDGET_TRANSLATE_H_
9
10
#include "
MyGUI_Prerequest.h
"
11
12
namespace
MyGUI
13
{
14
15
inline
int
getWidgetWidth
(
Widget
* _widget,
bool
_vert)
16
{
17
return
_vert ? _widget->
getWidth
() : _widget->
getHeight
();
18
}
19
20
inline
int
getWidgetHeight
(
Widget
* _widget,
bool
_vert)
21
{
22
return
_vert ? _widget->
getHeight
() : _widget->
getWidth
();
23
}
24
25
inline
int
getWidgetLeft
(
Widget
* _widget,
bool
_vert)
26
{
27
return
_vert ? _widget->
getLeft
() : _widget->
getTop
();
28
}
29
30
inline
int
getWidgetTop
(
Widget
* _widget,
bool
_vert)
31
{
32
return
_vert ? _widget->
getTop
() : _widget->
getLeft
();
33
}
34
35
inline
void
setWidgetSize
(
Widget
* _widget,
int
_width,
int
_height,
bool
_vert)
36
{
37
_vert ? _widget->
setSize
(_width, _height) : _widget->
setSize
(_height, _width);
38
}
39
40
inline
void
setWidgetCoord
(
Widget
* _widget,
int
_left,
int
_top,
int
_width,
int
_height,
bool
_vert)
41
{
42
_vert ? _widget->
setCoord
(_left, _top, _width, _height) : _widget->
setCoord
(_top, _left, _height, _width);
43
}
44
45
inline
void
convertWidgetCoord
(
IntCoord
& _coord,
bool
_vert)
46
{
47
if
(!_vert)
48
{
49
std::swap(_coord.
left
, _coord.
top
);
50
std::swap(_coord.
width
, _coord.
height
);
51
}
52
}
53
54
}
// namespace MyGUI
55
56
#endif // MYGUI_WIDGET_TRANSLATE_H_
MyGUI::getWidgetHeight
int getWidgetHeight(Widget *_widget, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:20
MyGUI::types::TCoord::left
T left
Definition:
MyGUI_TCoord.h:22
MyGUI::types::TCoord::top
T top
Definition:
MyGUI_TCoord.h:23
MyGUI::Widget
Widget properties. Skin childs. Widget widget description should be here.
Definition:
MyGUI_Widget.h:37
MyGUI::getWidgetLeft
int getWidgetLeft(Widget *_widget, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:25
MyGUI::getWidgetWidth
int getWidgetWidth(Widget *_widget, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:15
MyGUI_Prerequest.h
MyGUI::getWidgetTop
int getWidgetTop(Widget *_widget, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:30
MyGUI::convertWidgetCoord
void convertWidgetCoord(IntCoord &_coord, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:45
MyGUI::setWidgetCoord
void setWidgetCoord(Widget *_widget, int _left, int _top, int _width, int _height, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:40
MyGUI::Widget::setCoord
virtual void setCoord(const IntCoord &_value)
Definition:
MyGUI_Widget.cpp:689
MyGUI::Widget::setSize
virtual void setSize(const IntSize &_value)
Definition:
MyGUI_Widget.cpp:652
MyGUI::types::TCoord::width
T width
Definition:
MyGUI_TCoord.h:24
MyGUI::ICroppedRectangle::getTop
int getTop() const
Definition:
MyGUI_ICroppedRectangle.h:104
MyGUI::setWidgetSize
void setWidgetSize(Widget *_widget, int _width, int _height, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:35
MyGUI::ICroppedRectangle::getHeight
int getHeight() const
Definition:
MyGUI_ICroppedRectangle.h:119
MyGUI::types::TCoord
Definition:
MyGUI_TCoord.h:21
MyGUI::ICroppedRectangle::getWidth
int getWidth() const
Definition:
MyGUI_ICroppedRectangle.h:114
MyGUI::ICroppedRectangle::getLeft
int getLeft() const
Definition:
MyGUI_ICroppedRectangle.h:94
MyGUI::types::TCoord::height
T height
Definition:
MyGUI_TCoord.h:25
MyGUI
Definition:
MyGUI_ActionController.h:15
Generated by
1.8.20