MyGUI: MyGUI_Window.cpp Source File

MyGUI 3.4.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_Window.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_Window.h"
9#include "MyGUI_Macros.h"
10#include "MyGUI_Gui.h"
11#include "MyGUI_ControllerManager.h"
12#include "MyGUI_InputManager.h"
13#include "MyGUI_WidgetManager.h"
14#include "MyGUI_ResourceSkin.h"
15
16namespace MyGUI
17{
18 const float WINDOW_ALPHA_ACTIVE = ALPHA_MAX;
19 const float WINDOW_ALPHA_FOCUS = 0.7f;
20 const float WINDOW_ALPHA_DEACTIVE = 0.3f;
21 const float WINDOW_SPEED_COEF = 3.0f;
22
23 const int WINDOW_SNAP_DISTANSE = 10;
24
25 Window::Window() :
26 mWidgetCaption(nullptr),
27 mMouseRootFocus(false),
28 mKeyRootFocus(false),
29 mIsAutoAlpha(false),
30 mSnap(false),
31 mAnimateSmooth(false),
32 mMovable(true)
33 {
34 }
35
36 void Window::initialiseOverride()
37 {
38 Base::initialiseOverride();
39
40 // FIXME нам нужен фокус клавы
41 setNeedKeyFocus(true);
42
43 // дефолтные размеры
44 mMinmax.set(
45 (std::numeric_limits<int>::min)(),
46 (std::numeric_limits<int>::min)(),
47 (std::numeric_limits<int>::max)(),
48 (std::numeric_limits<int>::max)());
49
50 bool main_move = false;
51 if (isUserString("MainMove"))
52 {
53 setUserString("Scale", "1 1 0 0");
54 main_move = true;
55 }
56
57 if (getClientWidget() != nullptr)
58 {
59 if (main_move)
60 {
61 getClientWidget()->setUserString("Scale", "1 1 0 0");
62 getClientWidget()->eventMouseButtonPressed += newDelegate(this, &Window::notifyMousePressed);
63 getClientWidget()->eventMouseButtonReleased += newDelegate(this, &Window::notifyMouseReleased);
64 getClientWidget()->eventMouseDrag += newDelegate(this, &Window::notifyMouseDrag);
65 }
66 }
67
69 assignWidget(mWidgetCaption, "Caption");
70 if (mWidgetCaption != nullptr)
71 {
72 mWidgetCaption->setUserString("Scale", "1 1 0 0");
73 mWidgetCaption->eventMouseButtonPressed += newDelegate(this, &Window::notifyMousePressed);
74 mWidgetCaption->eventMouseButtonReleased += newDelegate(this, &Window::notifyMouseReleased);
75 mWidgetCaption->eventMouseDrag += newDelegate(this, &Window::notifyMouseDrag);
76 }
77
78 VectorWidgetPtr buttons = getSkinWidgetsByName("Button");
79 for (VectorWidgetPtr::iterator iter = buttons.begin(); iter != buttons.end(); ++iter)
80 {
81 (*iter)->eventMouseButtonClick += newDelegate(this, &Window::notifyPressedButtonEvent);
82 }
83
84 VectorWidgetPtr actions = getSkinWidgetsByName("Action");
85 for (VectorWidgetPtr::iterator iter = actions.begin(); iter != actions.end(); ++iter)
86 {
87 (*iter)->eventMouseButtonPressed += newDelegate(this, &Window::notifyMousePressed);
88 (*iter)->eventMouseButtonReleased += newDelegate(this, &Window::notifyMouseReleased);
89 (*iter)->eventMouseDrag += newDelegate(this, &Window::notifyMouseDrag);
90 (*iter)->eventMouseWheel += newDelegate(this, &Window::notifyMouseWheel);
91 }
92
93 const size_t countNames = 8;
94 const char* resizers[2][countNames] =
95 {
96 {"ResizeLeftTop", "ResizeTop", "ResizeRightTop", "ResizeRight", "ResizeRightBottom", "ResizeBottom", "ResizeLeftBottom", "ResizeLeft"},
97 {"Left Top", "Top", "Right Top", "Right", "Right Bottom", "Bottom", "Left Bottom", "Left"}
98 };
99
100 for (size_t index = 0; index < countNames; ++ index)
101 {
102 Widget* widget = nullptr;
103 assignWidget(widget, resizers[0][index]);
104 if (widget != nullptr)
105 {
106 widget->eventMouseButtonPressed += newDelegate(this, &Window::notifyMousePressed);
107 widget->eventMouseButtonReleased += newDelegate(this, &Window::notifyMouseReleased);
108 widget->eventMouseDrag += newDelegate(this, &Window::notifyMouseDrag);
109 widget->eventMouseWheel += newDelegate(this, &Window::notifyMouseWheel);
110 widget->setUserString("Action", resizers[1][index]);
111 }
112 }
113 }
114
115 void Window::shutdownOverride()
116 {
117 mWidgetCaption = nullptr;
118
119 Base::shutdownOverride();
120 }
121
122 void Window::onMouseChangeRootFocus(bool _focus)
123 {
124 mMouseRootFocus = _focus;
125 updateAlpha();
126
127 Base::onMouseChangeRootFocus(_focus);
128 }
129
130 void Window::onKeyChangeRootFocus(bool _focus)
131 {
132 mKeyRootFocus = _focus;
133 updateAlpha();
134
135 Base::onKeyChangeRootFocus(_focus);
136 }
137
138 void Window::onMouseDrag(int _left, int _top, MouseButton _id)
139 {
140 // на тот случай, если двигать окно, можно за любое место виджета
141 notifyMouseDrag(this, _left, _top, _id);
142
143 Base::onMouseDrag(_left, _top, _id);
144 }
145
146 void Window::onMouseButtonPressed(int _left, int _top, MouseButton _id)
147 {
148 notifyMousePressed(this, _left, _top, _id);
149
150 Base::onMouseButtonPressed(_left, _top, _id);
151 }
152
153 void Window::onMouseButtonReleased(int _left, int _top, MouseButton _id)
154 {
155 notifyMouseReleased(this, _left, _top, _id);
156
157 Base::onMouseButtonReleased(_left, _top, _id);
158 }
159
160 void Window::notifyMousePressed(MyGUI::Widget* _sender, int _left, int _top, MouseButton _id)
161 {
162 if (MouseButton::Left == _id)
163 {
164 mPreActionCoord = mCoord;
165 mCurrentActionScale = _getActionScale(_sender);
166 }
167 }
168
169 void Window::notifyPressedButtonEvent(MyGUI::Widget* _sender)
170 {
171 eventWindowButtonPressed(this, _sender->getUserString("Event"));
172 }
173
174 void Window::notifyMouseDrag(MyGUI::Widget* _sender, int _left, int _top, MouseButton _id)
175 {
176 if (_id != MouseButton::Left)
177 return;
178
179 const IntPoint& point = InputManager::getInstance().getLastPressedPosition(MouseButton::Left);
180
181 IntCoord coord = mCurrentActionScale;
182 coord.left *= (_left - point.left);
183 coord.top *= (_top - point.top);
184 coord.width *= (_left - point.left);
185 coord.height *= (_top - point.top);
186
187 if (coord.empty())
188 return;
189
190 if (coord.left == 0 && coord.top == 0)
191 setSize((mPreActionCoord + coord).size());
192 else if (coord.width == 0 && coord.height == 0)
193 setPosition((mPreActionCoord + coord).point());
194 else
195 setCoord(mPreActionCoord + coord);
196
197 // посылаем событие о изменении позиции и размере
198 eventWindowChangeCoord(this);
199 }
200
201 void Window::updateAlpha()
202 {
203 if (!mIsAutoAlpha)
204 return;
205
206 float alpha;
207 if (mKeyRootFocus)
208 alpha = WINDOW_ALPHA_ACTIVE;
209 else if (mMouseRootFocus)
210 alpha = WINDOW_ALPHA_FOCUS;
211 else
212 alpha = WINDOW_ALPHA_DEACTIVE;
213
214 ControllerFadeAlpha* controller = createControllerFadeAlpha(alpha, WINDOW_SPEED_COEF, true);
215 ControllerManager::getInstance().addItem(this, controller);
216 }
217
218 void Window::setAutoAlpha(bool _auto)
219 {
220 mIsAutoAlpha = _auto;
221 if (!_auto)
222 setAlpha(ALPHA_MAX);
223 else
224 {
225 if (mKeyRootFocus)
226 setAlpha(WINDOW_ALPHA_ACTIVE);
227 else if (mMouseRootFocus)
228 setAlpha(WINDOW_ALPHA_FOCUS);
229 else
230 setAlpha(WINDOW_ALPHA_DEACTIVE);
231 }
232 }
233
234 void Window::setPosition(const IntPoint& _point)
235 {
236 IntPoint point = _point;
237 // прилепляем к краям
238 if (mSnap)
239 {
240 IntCoord coord(point, mCoord.size());
241 getSnappedCoord(coord, Snap::Position);
242 point = coord.point();
243 }
244
245 Base::setPosition(point);
246 }
247
248 void Window::setSize(const IntSize& _size)
249 {
250 IntSize size = _size;
251 // прилепляем к краям
252
253 if (size.width < mMinmax.left)
254 size.width = mMinmax.left;
255 else if (size.width > mMinmax.right)
256 size.width = mMinmax.right;
257 if (size.height < mMinmax.top)
258 size.height = mMinmax.top;
259 else if (size.height > mMinmax.bottom)
260 size.height = mMinmax.bottom;
261 if ((size.width == mCoord.width) && (size.height == mCoord.height))
262 return;
263
264 if (mSnap)
265 {
266 IntCoord coord(mCoord.point(), size);
267 getSnappedCoord(coord, Snap::Size);
268 size = coord.size();
269 }
270
271 Base::setSize(size);
272 }
273
274 void Window::setCoord(const IntCoord& _coord)
275 {
276 IntPoint pos = _coord.point();
277 IntSize size = _coord.size();
278
279 if (size.width < mMinmax.left)
280 {
281 int offset = mMinmax.left - size.width;
282 size.width = mMinmax.left;
283 if ((pos.left - mCoord.left) > offset)
284 pos.left -= offset;
285 else
286 pos.left = mCoord.left;
287 }
288 else if (size.width > mMinmax.right)
289 {
290 int offset = mMinmax.right - size.width;
291 size.width = mMinmax.right;
292 if ((pos.left - mCoord.left) < offset)
293 pos.left -= offset;
294 else
295 pos.left = mCoord.left;
296 }
297 if (size.height < mMinmax.top)
298 {
299 int offset = mMinmax.top - size.height;
300 size.height = mMinmax.top;
301 if ((pos.top - mCoord.top) > offset)
302 pos.top -= offset;
303 else
304 pos.top = mCoord.top;
305 }
306 else if (size.height > mMinmax.bottom)
307 {
308 int offset = mMinmax.bottom - size.height;
309 size.height = mMinmax.bottom;
310 if ((pos.top - mCoord.top) < offset)
311 pos.top -= offset;
312 else
313 pos.top = mCoord.top;
314 }
315
316 IntCoord coord(pos, size);
317 if (mSnap)
318 {
319 // prefer size change over position change
320 getSnappedCoord(coord, Snap::Size);
321 }
322
323 if (coord == mCoord)
324 return;
325
326 Base::setCoord(coord);
327 }
328
329 void Window::setCaption(const UString& _caption)
330 {
331 if (mWidgetCaption != nullptr)
332 mWidgetCaption->setCaption(_caption);
333 else
334 Base::setCaption(_caption);
335 }
336
337 const UString& Window::getCaption() const
338 {
339 if (mWidgetCaption != nullptr)
340 return mWidgetCaption->getCaption();
341 return Base::getCaption();
342 }
343
344 void Window::destroySmooth()
345 {
346 ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MIN, WINDOW_SPEED_COEF, false);
347 controller->eventPostAction += newDelegate(action::actionWidgetDestroy);
348 ControllerManager::getInstance().addItem(this, controller);
349 }
350
351 void Window::animateStop(Widget* _widget, ControllerItem* _controller)
352 {
353 if (mAnimateSmooth)
354 {
355 ControllerManager::getInstance().removeItem(this);
356 mAnimateSmooth = false;
357 }
358 }
359
360 void Window::setVisible(bool _visible)
361 {
362 if (mAnimateSmooth)
363 {
364 ControllerManager::getInstance().removeItem(this);
365 setAlpha(getAlphaVisible());
366 setEnabledSilent(true);
367 mAnimateSmooth = false;
368 }
369
370 Base::setVisible(_visible);
371 }
372
373 float Window::getAlphaVisible() const
374 {
375 return (mIsAutoAlpha && !mKeyRootFocus) ? WINDOW_ALPHA_DEACTIVE : ALPHA_MAX;
376 }
377
378 void Window::getSnappedCoord(IntCoord& _coord, Snap snapMode) const
379 {
380 const IntSize view_size = getParentSize();
381 bool nearLeftSide = abs(_coord.left) <= WINDOW_SNAP_DISTANSE;
382 bool nearTopSide = abs(_coord.top) <= WINDOW_SNAP_DISTANSE;
383 bool nearRightSide = abs(_coord.left + _coord.width - view_size.width) <= WINDOW_SNAP_DISTANSE;
384 bool nearBottomSide = abs(_coord.top + _coord.height - view_size.height) <= WINDOW_SNAP_DISTANSE;
385
386 switch (snapMode)
387 {
388 case Snap::Position:
389 if (nearLeftSide)
390 _coord.left = 0;
391 if (nearTopSide)
392 _coord.top = 0;
393
394 if (nearRightSide)
395 _coord.left = view_size.width - _coord.width;
396 if (nearBottomSide)
397 _coord.top = view_size.height - _coord.height;
398 break;
399 case Snap::Size:
400 if (nearLeftSide)
401 {
402 _coord.width = _coord.right();
403 _coord.left = 0;
404 }
405 if (nearTopSide)
406 {
407 _coord.height = _coord.bottom();
408 _coord.top = 0;
409 }
410
411 if (nearRightSide)
412 _coord.width = view_size.width - _coord.left;
413 if (nearBottomSide)
414 _coord.height = view_size.height - _coord.top;
415 break;
416 }
417 }
418
419 void Window::setVisibleSmooth(bool _visible)
420 {
421 mAnimateSmooth = true;
422 ControllerManager::getInstance().removeItem(this);
423
424 if (_visible)
425 {
426 setEnabledSilent(true);
427 if (!getVisible())
428 {
429 setAlpha(ALPHA_MIN);
430 Base::setVisible(true);
431 }
432 ControllerFadeAlpha* controller = createControllerFadeAlpha(getAlphaVisible(), WINDOW_SPEED_COEF, true);
433 controller->eventPostAction += newDelegate(this, &Window::animateStop);
434 ControllerManager::getInstance().addItem(this, controller);
435 }
436 else
437 {
438 setEnabledSilent(false);
439 ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MIN, WINDOW_SPEED_COEF, false);
440 controller->eventPostAction += newDelegate(action::actionWidgetHide);
441 ControllerManager::getInstance().addItem(this, controller);
442 }
443 }
444
445 ControllerFadeAlpha* Window::createControllerFadeAlpha(float _alpha, float _coef, bool _enable)
446 {
447 ControllerItem* item = ControllerManager::getInstance().createItem(ControllerFadeAlpha::getClassTypeName());
448 ControllerFadeAlpha* controller = item->castType<ControllerFadeAlpha>();
449
450 controller->setAlpha(_alpha);
451 controller->setCoef(_coef);
452 controller->setEnabled(_enable);
453
454 return controller;
455 }
456
457 void Window::setMinSize(const IntSize& _value)
458 {
459 mMinmax.left = _value.width;
460 mMinmax.top = _value.height;
461 }
462
463 IntSize Window::getMinSize() const
464 {
465 return IntSize(mMinmax.left, mMinmax.top);
466 }
467
468 void Window::setMaxSize(const IntSize& _value)
469 {
470 mMinmax.right = _value.width;
471 mMinmax.bottom = _value.height;
472 }
473
474 IntSize Window::getMaxSize() const
475 {
476 return IntSize(mMinmax.right, mMinmax.bottom);
477 }
478
479 void Window::setPropertyOverride(const std::string& _key, const std::string& _value)
480 {
482 if (_key == "AutoAlpha")
483 setAutoAlpha(utility::parseValue<bool>(_value));
484
486 else if (_key == "Snap")
487 setSnap(utility::parseValue<bool>(_value));
488
490 else if (_key == "MinSize")
491 setMinSize(utility::parseValue<IntSize>(_value));
492
494 else if (_key == "MaxSize")
495 setMaxSize(utility::parseValue<IntSize>(_value));
496
498 else if (_key == "Movable")
499 setMovable(utility::parseValue<bool>(_value));
500
501 else
502 {
503 Base::setPropertyOverride(_key, _value);
504 return;
505 }
506
507 eventChangeProperty(this, _key, _value);
508 }
509
510 const IntCoord& Window::getActionScale() const
511 {
512 return mCurrentActionScale;
513 }
514
515 bool Window::getAutoAlpha() const
516 {
517 return mIsAutoAlpha;
518 }
519
520 TextBox* Window::getCaptionWidget() const
521 {
522 return mWidgetCaption;
523 }
524
525 void Window::setMinSize(int _width, int _height)
526 {
527 setMinSize(IntSize(_width, _height));
528 }
529
530 void Window::setMaxSize(int _width, int _height)
531 {
532 setMaxSize(IntSize(_width, _height));
533 }
534
535 bool Window::getSnap() const
536 {
537 return mSnap;
538 }
539
540 void Window::setSnap(bool _value)
541 {
542 mSnap = _value;
543 }
544
545 void Window::notifyMouseReleased(MyGUI::Widget* _sender, int _left, int _top, MouseButton _id)
546 {
547 if (MouseButton::Left == _id)
548 {
549 mCurrentActionScale.clear();
550 }
551 }
552
553 IntCoord Window::_getActionScale(Widget* _widget) const
554 {
555 if (_widget->isUserString("Scale"))
556 {
557 IntCoord result = IntCoord::parse(_widget->getUserString("Scale"));
558
559 if (result == IntCoord(1, 1, 0, 0) && !mMovable)
560 result.clear();
561
562 return result;
563 }
564 else if (_widget->isUserString("Action"))
565 {
566 const std::string& action = _widget->getUserString("Action");
567 if (action == "Move")
568 {
569 if (mMovable)
570 return IntCoord(1, 1, 0, 0);
571 else
572 return IntCoord();
573 }
574
575 IntCoord coord;
576 Align align = Align::parse(action);
577
578 if (align.isLeft())
579 {
580 coord.left = 1;
581 coord.width = -1;
582 }
583 else if (align.isRight())
584 {
585 coord.width = 1;
586 }
587
588 if (align.isTop())
589 {
590 coord.top = 1;
591 coord.height = -1;
592 }
593 else if (align.isBottom())
594 {
595 coord.height = 1;
596 }
597
598 return coord;
599 }
600
601 return IntCoord();
602 }
603
604 void Window::setMovable(bool _value)
605 {
606 mMovable = _value;
607 }
608
609 bool Window::getMovable() const
610 {
611 return mMovable;
612 }
613
614 void Window::notifyMouseWheel(MyGUI::Widget* _sender, int _rel)
615 {
616 onMouseWheel(_rel);
617 eventMouseWheel(_sender, _rel);
618 }
619
620} // namespace MyGUI
MyGUI_ControllerManager.h
MyGUI_Gui.h
MyGUI_InputManager.h
MyGUI_Macros.h
MyGUI_Precompiled.h
MyGUI_ResourceSkin.h
MyGUI_WidgetManager.h
MyGUI_Window.h
MyGUI::ControllerFadeAlpha
Definition MyGUI_ControllerFadeAlpha.h:20
MyGUI::ControllerFadeAlpha::getClassTypeName
static const std::string & getClassTypeName()
Definition MyGUI_ControllerFadeAlpha.h:21
MyGUI::ControllerFadeAlpha::setAlpha
void setAlpha(float _value)
Definition MyGUI_ControllerFadeAlpha.cpp:92
MyGUI::ControllerFadeAlpha::setCoef
void setCoef(float _value)
Definition MyGUI_ControllerFadeAlpha.cpp:97
MyGUI::ControllerFadeAlpha::setEnabled
void setEnabled(bool _value)
Definition MyGUI_ControllerFadeAlpha.cpp:102
MyGUI::ControllerItem
Definition MyGUI_ControllerItem.h:27
MyGUI::ControllerItem::eventPostAction
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > eventPostAction
Definition MyGUI_ControllerItem.h:54
MyGUI::ControllerManager::createItem
ControllerItem * createItem(const std::string &_type)
Definition MyGUI_ControllerManager.cpp:72
MyGUI::ControllerManager::getInstance
static ControllerManager & getInstance()
MyGUI::ControllerManager::removeItem
void removeItem(Widget *_widget)
Definition MyGUI_ControllerManager.cpp:105
MyGUI::ControllerManager::addItem
void addItem(Widget *_widget, ControllerItem *_item)
Definition MyGUI_ControllerManager.cpp:78
MyGUI::ICroppedRectangle::mCoord
IntCoord mCoord
Definition MyGUI_ICroppedRectangle.h:245
MyGUI::IObject::castType
Type * castType(bool _throw=true)
Definition MyGUI_IObject.h:18
MyGUI::InputManager::getLastPressedPosition
const IntPoint & getLastPressedPosition(MouseButton _id) const
Definition MyGUI_InputManager.cpp:657
MyGUI::InputManager::getInstance
static InputManager & getInstance()
MyGUI::TextBox
widget description should be here.
Definition MyGUI_TextBox.h:21
MyGUI::TextBox::getCaption
virtual const UString & getCaption() const
Definition MyGUI_TextBox.cpp:83
MyGUI::TextBox::setCaption
virtual void setCaption(const UString &_value)
Definition MyGUI_TextBox.cpp:77
MyGUI::UString
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
Definition MyGUI_UString.h:145
MyGUI::UserData::isUserString
bool isUserString(const std::string &_key) const
Definition MyGUI_WidgetUserData.cpp:44
MyGUI::UserData::getUserString
const std::string & getUserString(const std::string &_key) const
Definition MyGUI_WidgetUserData.cpp:20
MyGUI::UserData::setUserString
void setUserString(const std::string &_key, const std::string &_value)
Definition MyGUI_WidgetUserData.cpp:14
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:37
MyGUI::Widget::getSkinWidgetsByName
VectorWidgetPtr getSkinWidgetsByName(const std::string &_name) const
Definition MyGUI_Widget.cpp:1089
MyGUI::Widget::setAlpha
void setAlpha(float _value)
Definition MyGUI_Widget.cpp:434
MyGUI::Widget::eventChangeProperty
EventHandle_WidgetStringString eventChangeProperty
Definition MyGUI_Widget.h:268
MyGUI::Widget::assignWidget
void assignWidget(T *&_widget, const std::string &_name)
Definition MyGUI_Widget.h:336
MyGUI::Widget::getParentSize
IntSize getParentSize() const
Definition MyGUI_Widget.cpp:1019
MyGUI::Widget::getVisible
bool getVisible() const
Definition MyGUI_Widget.cpp:1250
MyGUI::Widget::getClientWidget
Widget * getClientWidget()
Definition MyGUI_Widget.cpp:1290
MyGUI::Widget::setEnabledSilent
void setEnabledSilent(bool _value)
Definition MyGUI_Widget.cpp:1280
MyGUI::WidgetInput::eventMouseButtonReleased
EventHandle_WidgetIntIntButton eventMouseButtonReleased
Definition MyGUI_WidgetInput.h:163
MyGUI::WidgetInput::setNeedKeyFocus
void setNeedKeyFocus(bool _value)
Definition MyGUI_WidgetInput.cpp:152
MyGUI::WidgetInput::onMouseWheel
virtual void onMouseWheel(int _rel)
Definition MyGUI_WidgetInput.cpp:218
MyGUI::WidgetInput::eventMouseButtonPressed
EventHandle_WidgetIntIntButton eventMouseButtonPressed
Definition MyGUI_WidgetInput.h:154
MyGUI::WidgetInput::eventMouseDrag
EventPairAddParameter< EventHandle_WidgetIntInt, EventHandle_WidgetIntIntButton > eventMouseDrag
Definition MyGUI_WidgetInput.h:130
MyGUI::WidgetInput::eventMouseWheel
EventHandle_WidgetInt eventMouseWheel
Definition MyGUI_WidgetInput.h:145
MyGUI::Window::onKeyChangeRootFocus
void onKeyChangeRootFocus(bool _focus) override
Definition MyGUI_Window.cpp:130
MyGUI::Window::setMovable
void setMovable(bool _value)
Definition MyGUI_Window.cpp:604
MyGUI::Window::setVisibleSmooth
void setVisibleSmooth(bool _value)
Definition MyGUI_Window.cpp:419
MyGUI::Window::setSnap
void setSnap(bool _value)
Definition MyGUI_Window.cpp:540
MyGUI::Window::eventWindowChangeCoord
EventPair< EventHandle_WidgetVoid, EventHandle_WindowPtr > eventWindowChangeCoord
Definition MyGUI_Window.h:107
MyGUI::Window::onMouseButtonReleased
void onMouseButtonReleased(int _left, int _top, MouseButton _id) override
Definition MyGUI_Window.cpp:153
MyGUI::Window::getMaxSize
IntSize getMaxSize() const
Definition MyGUI_Window.cpp:474
MyGUI::Window::Window
Window()
Definition MyGUI_Window.cpp:25
MyGUI::Window::setMinSize
void setMinSize(const IntSize &_value)
Definition MyGUI_Window.cpp:457
MyGUI::Window::notifyMousePressed
void notifyMousePressed(MyGUI::Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_Window.cpp:160
MyGUI::Window::getCaption
const UString & getCaption() const override
Definition MyGUI_Window.cpp:337
MyGUI::Window::setPosition
void setPosition(const IntPoint &_value) override
Definition MyGUI_Window.cpp:234
MyGUI::Window::animateStop
void animateStop(Widget *_widget, ControllerItem *_controller)
Definition MyGUI_Window.cpp:351
MyGUI::Window::notifyPressedButtonEvent
void notifyPressedButtonEvent(MyGUI::Widget *_sender)
Definition MyGUI_Window.cpp:169
MyGUI::Window::onMouseButtonPressed
void onMouseButtonPressed(int _left, int _top, MouseButton _id) override
Definition MyGUI_Window.cpp:146
MyGUI::Window::getActionScale
const IntCoord & getActionScale() const
Definition MyGUI_Window.cpp:510
MyGUI::Window::setCaption
void setCaption(const UString &_value) override
Definition MyGUI_Window.cpp:329
MyGUI::Window::setMaxSize
void setMaxSize(const IntSize &_value)
Definition MyGUI_Window.cpp:468
MyGUI::Window::onMouseChangeRootFocus
void onMouseChangeRootFocus(bool _focus) override
Definition MyGUI_Window.cpp:122
MyGUI::Window::notifyMouseReleased
void notifyMouseReleased(MyGUI::Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_Window.cpp:545
MyGUI::Window::getCaptionWidget
TextBox * getCaptionWidget() const
Definition MyGUI_Window.cpp:520
MyGUI::Window::notifyMouseDrag
void notifyMouseDrag(MyGUI::Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_Window.cpp:174
MyGUI::Window::setCoord
void setCoord(const IntCoord &_value) override
Definition MyGUI_Window.cpp:274
MyGUI::Window::updateAlpha
void updateAlpha()
Definition MyGUI_Window.cpp:201
MyGUI::Window::notifyMouseWheel
void notifyMouseWheel(MyGUI::Widget *_sender, int _rel)
Definition MyGUI_Window.cpp:614
MyGUI::Window::getSnap
bool getSnap() const
Definition MyGUI_Window.cpp:535
MyGUI::Window::setVisible
void setVisible(bool _value) override
Definition MyGUI_Window.cpp:360
MyGUI::Window::onMouseDrag
void onMouseDrag(int _left, int _top, MouseButton _id) override
Definition MyGUI_Window.cpp:138
MyGUI::Window::getMovable
bool getMovable() const
Definition MyGUI_Window.cpp:609
MyGUI::Window::shutdownOverride
void shutdownOverride() override
Definition MyGUI_Window.cpp:115
MyGUI::Window::eventWindowButtonPressed
EventPair< EventHandle_WidgetString, EventHandle_WindowPtrCStringRef > eventWindowButtonPressed
Definition MyGUI_Window.h:101
MyGUI::Window::destroySmooth
void destroySmooth()
Definition MyGUI_Window.cpp:344
MyGUI::Window::initialiseOverride
void initialiseOverride() override
Definition MyGUI_Window.cpp:36
MyGUI::Window::setPropertyOverride
void setPropertyOverride(const std::string &_key, const std::string &_value) override
Definition MyGUI_Window.cpp:479
MyGUI::Window::setAutoAlpha
void setAutoAlpha(bool _value)
Definition MyGUI_Window.cpp:218
MyGUI::Window::getMinSize
IntSize getMinSize() const
Definition MyGUI_Window.cpp:463
MyGUI::Window::getAutoAlpha
bool getAutoAlpha() const
Definition MyGUI_Window.cpp:515
MyGUI::Window::setSize
void setSize(const IntSize &_value) override
Definition MyGUI_Window.cpp:248
MyGUI::action::actionWidgetDestroy
void actionWidgetDestroy(Widget *_widget, ControllerItem *_controller)
Definition MyGUI_ActionController.cpp:28
MyGUI::action::actionWidgetHide
void actionWidgetHide(Widget *_widget, ControllerItem *_controller)
Definition MyGUI_ActionController.cpp:18
MyGUI::utility::parseValue
T parseValue(const std::string &_value)
Definition MyGUI_StringUtility.h:112
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::WINDOW_ALPHA_FOCUS
const float WINDOW_ALPHA_FOCUS
Definition MyGUI_Window.cpp:19
MyGUI::WINDOW_SPEED_COEF
const float WINDOW_SPEED_COEF
Definition MyGUI_Window.cpp:21
MyGUI::WINDOW_ALPHA_ACTIVE
const float WINDOW_ALPHA_ACTIVE
Definition MyGUI_Window.cpp:18
MyGUI::ALPHA_MIN
const float ALPHA_MIN
Definition MyGUI_Macros.h:21
MyGUI::WINDOW_ALPHA_DEACTIVE
const float WINDOW_ALPHA_DEACTIVE
Definition MyGUI_Window.cpp:20
MyGUI::IntCoord
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:36
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::WINDOW_SNAP_DISTANSE
const int WINDOW_SNAP_DISTANSE
Definition MyGUI_Window.cpp:23
MyGUI::ALPHA_MAX
const float ALPHA_MAX
Definition MyGUI_Macros.h:20
MyGUI::newDelegate
delegates::DelegateFunction< Args... > * newDelegate(void(*_func)(Args... args))
Definition MyGUI_Delegate.h:99
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition MyGUI_WidgetDefines.h:20
MyGUI::Align::parse
static Align parse(const std::string &_value)
Definition MyGUI_Align.h:127
MyGUI::MouseButton
Definition MyGUI_MouseButton.h:16
MyGUI::MouseButton::Left
@ Left
Definition MyGUI_MouseButton.h:21
MyGUI::types::TCoord< int >
MyGUI::types::TCoord::height
T height
Definition MyGUI_TCoord.h:25
MyGUI::types::TCoord::empty
bool empty() const
Definition MyGUI_TCoord.h:180
MyGUI::types::TCoord::width
T width
Definition MyGUI_TCoord.h:24
MyGUI::types::TCoord::top
T top
Definition MyGUI_TCoord.h:23
MyGUI::types::TCoord::point
TPoint< T > point() const
Definition MyGUI_TCoord.h:185
MyGUI::types::TCoord::size
TSize< T > size() const
Definition MyGUI_TCoord.h:190
MyGUI::types::TCoord< int >::parse
static TCoord< int > parse(const std::string &_value)
Definition MyGUI_TCoord.h:207
MyGUI::types::TCoord::left
T left
Definition MyGUI_TCoord.h:22
MyGUI::types::TCoord::clear
void clear()
Definition MyGUI_TCoord.h:160
MyGUI::types::TPoint< int >
MyGUI::types::TPoint::left
T left
Definition MyGUI_TPoint.h:20
MyGUI::types::TPoint::top
T top
Definition MyGUI_TPoint.h:21
MyGUI::types::TRect::right
T right
Definition MyGUI_TRect.h:22
MyGUI::types::TRect::set
void set(T const &_left, T const &_top, T const &_right, T const &_bottom)
Definition MyGUI_TRect.h:121
MyGUI::types::TRect::left
T left
Definition MyGUI_TRect.h:20
MyGUI::types::TRect::bottom
T bottom
Definition MyGUI_TRect.h:23
MyGUI::types::TRect::top
T top
Definition MyGUI_TRect.h:21
MyGUI::types::TSize< int >
MyGUI::types::TSize::width
T width
Definition MyGUI_TSize.h:20
MyGUI::types::TSize::height
T height
Definition MyGUI_TSize.h:21