MyGUI
3.4.0
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
#include "
MyGUI_Types.h
"
12
13
namespace
MyGUI
14
{
15
16
inline
int
getWidgetWidth
(
Widget
* _widget,
bool
_vert)
17
{
18
return
_vert ? _widget->
getWidth
() : _widget->
getHeight
();
19
}
20
21
inline
int
getWidgetHeight
(
Widget
* _widget,
bool
_vert)
22
{
23
return
_vert ? _widget->
getHeight
() : _widget->
getWidth
();
24
}
25
26
inline
int
getWidgetLeft
(
Widget
* _widget,
bool
_vert)
27
{
28
return
_vert ? _widget->
getLeft
() : _widget->
getTop
();
29
}
30
31
inline
int
getWidgetTop
(
Widget
* _widget,
bool
_vert)
32
{
33
return
_vert ? _widget->
getTop
() : _widget->
getLeft
();
34
}
35
36
inline
void
setWidgetSize
(
Widget
* _widget,
int
_width,
int
_height,
bool
_vert)
37
{
38
_vert ? _widget->
setSize
(_width, _height) : _widget->
setSize
(_height, _width);
39
}
40
41
inline
void
setWidgetCoord
(
Widget
* _widget,
int
_left,
int
_top,
int
_width,
int
_height,
bool
_vert)
42
{
43
_vert ? _widget->
setCoord
(_left, _top, _width, _height) : _widget->
setCoord
(_top, _left, _height, _width);
44
}
45
46
inline
void
convertWidgetCoord
(
IntCoord
& _coord,
bool
_vert)
47
{
48
if
(!_vert)
49
{
50
std::swap(_coord.
left
, _coord.
top
);
51
std::swap(_coord.
width
, _coord.
height
);
52
}
53
}
54
55
}
// namespace MyGUI
56
57
#endif // MYGUI_WIDGET_TRANSLATE_H_
MyGUI::getWidgetHeight
int getWidgetHeight(Widget *_widget, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:21
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:26
MyGUI::getWidgetWidth
int getWidgetWidth(Widget *_widget, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:16
MyGUI_Prerequest.h
MyGUI::getWidgetTop
int getWidgetTop(Widget *_widget, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:31
MyGUI::Widget::setSize
void setSize(const IntSize &_value) override
Definition:
MyGUI_Widget.cpp:647
MyGUI::convertWidgetCoord
void convertWidgetCoord(IntCoord &_coord, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:46
MyGUI::Widget::setCoord
void setCoord(const IntCoord &_value) override
Definition:
MyGUI_Widget.cpp:684
MyGUI::setWidgetCoord
void setWidgetCoord(Widget *_widget, int _left, int _top, int _width, int _height, bool _vert)
Definition:
MyGUI_WidgetTranslate.h:41
MyGUI::types::TCoord::width
T width
Definition:
MyGUI_TCoord.h:24
MyGUI_Types.h
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:36
MyGUI::ICroppedRectangle::getHeight
int getHeight() const
Definition:
MyGUI_ICroppedRectangle.h:119
MyGUI::types::TCoord< int >
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