MyGUI
3.2.1
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
File List
Globals
mygui
MyGUIEngine
src
MyGUI_WidgetInput.cpp
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
#include "
MyGUI_Precompiled.h
"
8
#include "
MyGUI_WidgetInput.h
"
9
#include "
MyGUI_Widget.h
"
10
11
namespace
MyGUI
12
{
13
14
WidgetInput::WidgetInput
() :
15
mNeedToolTip(false),
16
mInheritsPick(false),
17
mNeedKeyFocus(false),
18
mNeedMouseFocus(true),
19
mRootMouseFocus(false),
20
mRootKeyFocus(false)
21
{
22
}
23
24
WidgetInput::~WidgetInput
()
25
{
26
}
27
28
void
WidgetInput::setMaskPick
(
const
std::string& _filename)
29
{
30
if
(_filename.empty())
31
mOwnMaskPickInfo =
MaskPickInfo
();
32
else
if
(!mOwnMaskPickInfo.
load
(_filename))
33
MYGUI_LOG
(Error,
"mask not load '"
<< _filename <<
"'"
);
34
}
35
36
void
WidgetInput::setMaskPick
(
const
MaskPickInfo
& _info)
37
{
38
mOwnMaskPickInfo = _info;
39
}
40
41
bool
WidgetInput::isMaskPickInside
(
const
IntPoint
& _point,
const
IntCoord
& _coord)
const
42
{
43
return
mOwnMaskPickInfo.
empty
() || mOwnMaskPickInfo.
pick
(_point, _coord);
44
}
45
46
void
WidgetInput::_riseMouseLostFocus
(
Widget
* _new)
47
{
48
onMouseLostFocus
(_new);
49
eventMouseLostFocus
(static_cast<Widget*>(
this
), _new);
50
}
51
52
void
WidgetInput::_riseMouseSetFocus
(
Widget
* _old)
53
{
54
onMouseSetFocus
(_old);
55
eventMouseSetFocus
(static_cast<Widget*>(
this
), _old);
56
}
57
58
void
WidgetInput::_riseMouseDrag
(
int
_left,
int
_top,
MouseButton
_id)
59
{
60
onMouseDrag
(_left, _top, _id);
61
eventMouseDrag
(static_cast<Widget*>(
this
), _left, _top, _id);
62
}
63
64
void
WidgetInput::_riseMouseMove
(
int
_left,
int
_top)
65
{
66
onMouseMove
(_left, _top);
67
eventMouseMove
(static_cast<Widget*>(
this
), _left, _top);
68
}
69
70
void
WidgetInput::_riseMouseWheel
(
int
_rel)
71
{
72
onMouseWheel
(_rel);
73
eventMouseWheel
(static_cast<Widget*>(
this
), _rel);
74
}
75
76
void
WidgetInput::_riseMouseButtonPressed
(
int
_left,
int
_top,
MouseButton
_id)
77
{
78
onMouseButtonPressed
(_left, _top, _id);
79
eventMouseButtonPressed
(static_cast<Widget*>(
this
), _left, _top, _id);
80
}
81
82
void
WidgetInput::_riseMouseButtonReleased
(
int
_left,
int
_top,
MouseButton
_id)
83
{
84
onMouseButtonReleased
(_left, _top, _id);
85
eventMouseButtonReleased
(static_cast<Widget*>(
this
), _left, _top, _id);
86
}
87
88
void
WidgetInput::_riseMouseButtonClick
()
89
{
90
onMouseButtonClick
();
91
eventMouseButtonClick
(static_cast<Widget*>(
this
));
92
}
93
94
void
WidgetInput::_riseMouseButtonDoubleClick
()
95
{
96
onMouseButtonDoubleClick
();
97
eventMouseButtonDoubleClick
(static_cast<Widget*>(
this
));
98
}
99
100
void
WidgetInput::_riseKeyLostFocus
(
Widget
* _new)
101
{
102
onKeyLostFocus
(_new);
103
eventKeyLostFocus
(static_cast<Widget*>(
this
), _new);
104
}
105
106
void
WidgetInput::_riseKeySetFocus
(
Widget
* _old)
107
{
108
onKeySetFocus
(_old);
109
eventKeySetFocus
(static_cast<Widget*>(
this
), _old);
110
}
111
112
void
WidgetInput::_riseKeyButtonPressed
(
KeyCode
_key,
Char
_char)
113
{
114
onKeyButtonPressed
(_key, _char);
115
eventKeyButtonPressed
(static_cast<Widget*>(
this
), _key, _char);
116
}
117
118
void
WidgetInput::_riseKeyButtonReleased
(
KeyCode
_key)
119
{
120
onKeyButtonReleased
(_key);
121
eventKeyButtonReleased
(static_cast<Widget*>(
this
), _key);
122
}
123
124
void
WidgetInput::_riseMouseChangeRootFocus
(
bool
_focus)
125
{
126
onMouseChangeRootFocus
(_focus);
127
eventRootMouseChangeFocus
(static_cast<Widget*>(
this
), _focus);
128
}
129
130
void
WidgetInput::_riseKeyChangeRootFocus
(
bool
_focus)
131
{
132
onKeyChangeRootFocus
(_focus);
133
eventRootKeyChangeFocus
(static_cast<Widget*>(
this
), _focus);
134
}
135
136
void
WidgetInput::setNeedToolTip
(
bool
_value)
137
{
138
mNeedToolTip = _value;
139
}
140
141
bool
WidgetInput::getNeedToolTip
()
const
142
{
143
return
mNeedToolTip;
144
}
145
146
void
WidgetInput::setPointer
(
const
std::string& _value)
147
{
148
mPointer = _value;
149
}
150
151
const
std::string&
WidgetInput::getPointer
()
const
152
{
153
return
mPointer;
154
}
155
156
void
WidgetInput::setNeedKeyFocus
(
bool
_value)
157
{
158
mNeedKeyFocus = _value;
159
}
160
161
bool
WidgetInput::getNeedKeyFocus
()
const
162
{
163
return
mNeedKeyFocus;
164
}
165
166
void
WidgetInput::setNeedMouseFocus
(
bool
_value)
167
{
168
mNeedMouseFocus = _value;
169
}
170
171
bool
WidgetInput::getNeedMouseFocus
()
const
172
{
173
return
mNeedMouseFocus;
174
}
175
176
void
WidgetInput::setInheritsPick
(
bool
_value)
177
{
178
mInheritsPick = _value;
179
}
180
181
bool
WidgetInput::getInheritsPick
()
const
182
{
183
return
mInheritsPick;
184
}
185
186
bool
WidgetInput::getRootMouseFocus
()
const
187
{
188
return
mRootMouseFocus;
189
}
190
191
bool
WidgetInput::getRootKeyFocus
()
const
192
{
193
return
mRootKeyFocus;
194
}
195
196
void
WidgetInput::_setRootMouseFocus
(
bool
_value)
197
{
198
mRootMouseFocus = _value;
199
}
200
201
void
WidgetInput::_setRootKeyFocus
(
bool
_value)
202
{
203
mRootKeyFocus = _value;
204
}
205
206
void
WidgetInput::onMouseLostFocus
(
Widget
* _new)
207
{
208
}
209
210
void
WidgetInput::onMouseSetFocus
(
Widget
* _old)
211
{
212
}
213
214
void
WidgetInput::onMouseDrag
(
int
_left,
int
_top,
MouseButton
_id)
215
{
216
}
217
218
void
WidgetInput::onMouseMove
(
int
_left,
int
_top)
219
{
220
}
221
222
void
WidgetInput::onMouseWheel
(
int
_rel)
223
{
224
}
225
226
void
WidgetInput::onMouseButtonPressed
(
int
_left,
int
_top,
MouseButton
_id)
227
{
228
}
229
230
void
WidgetInput::onMouseButtonReleased
(
int
_left,
int
_top,
MouseButton
_id)
231
{
232
}
233
234
void
WidgetInput::onMouseButtonClick
()
235
{
236
}
237
238
void
WidgetInput::onMouseButtonDoubleClick
()
239
{
240
}
241
242
void
WidgetInput::onKeyLostFocus
(
Widget
* _new)
243
{
244
}
245
246
void
WidgetInput::onKeySetFocus
(
Widget
* _old)
247
{
248
}
249
250
void
WidgetInput::onKeyButtonPressed
(
KeyCode
_key,
Char
_char)
251
{
252
}
253
254
void
WidgetInput::onKeyButtonReleased
(
KeyCode
_key)
255
{
256
}
257
258
void
WidgetInput::onMouseChangeRootFocus
(
bool
_focus)
259
{
260
}
261
262
void
WidgetInput::onKeyChangeRootFocus
(
bool
_focus)
263
{
264
}
265
266
}
// namespace MyGUI
Generated on Wed Aug 20 2014 00:03:34 for MyGUI by
1.8.3.1