MyGUI: MyGUI_Window.cpp Source File

MyGUI 3.4.3

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