MyGUI 3.2.0

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

- File List
- Globals

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