MyGUI  3.4.0
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"
12 #include "MyGUI_InputManager.h"
13 #include "MyGUI_WidgetManager.h"
14 #include "MyGUI_ResourceSkin.h"
15 
16 namespace MyGUI
17 {
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 
26  mWidgetCaption(nullptr),
27  mMouseRootFocus(false),
28  mKeyRootFocus(false),
29  mIsAutoAlpha(false),
30  mSnap(false),
31  mAnimateSmooth(false),
32  mMovable(true)
33  {
34  }
35 
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");
65  }
66  }
67 
69  assignWidget(mWidgetCaption, "Caption");
70  if (mWidgetCaption != nullptr)
71  {
72  mWidgetCaption->setUserString("Scale", "1 1 0 0");
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  {
110  widget->setUserString("Action", resizers[1][index]);
111  }
112  }
113  }
114 
116  {
117  mWidgetCaption = nullptr;
118 
119  Base::shutdownOverride();
120  }
121 
123  {
124  mMouseRootFocus = _focus;
125  updateAlpha();
126 
127  Base::onMouseChangeRootFocus(_focus);
128  }
129 
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 
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 
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  // посылаем событие о изменении позиции и размере
199  }
200 
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)
223  else
224  {
225  if (mKeyRootFocus)
227  else if (mMouseRootFocus)
229  else
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);
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);
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  // прилепляем к краям
317  if (mSnap)
318  {
319  IntCoord coord(pos, size);
320  getSnappedCoord(coord);
321  size = coord.size();
322  }
323 
324  IntCoord coord(pos, size);
325  if (coord == mCoord)
326  return;
327 
328  Base::setCoord(coord);
329  }
330 
331  void Window::setCaption(const UString& _caption)
332  {
333  if (mWidgetCaption != nullptr)
334  mWidgetCaption->setCaption(_caption);
335  else
336  Base::setCaption(_caption);
337  }
338 
340  {
341  if (mWidgetCaption != nullptr)
342  return mWidgetCaption->getCaption();
343  return Base::getCaption();
344  }
345 
347  {
348  ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MIN, WINDOW_SPEED_COEF, false);
350  ControllerManager::getInstance().addItem(this, controller);
351  }
352 
353  void Window::animateStop(Widget* _widget, ControllerItem* _controller)
354  {
355  if (mAnimateSmooth)
356  {
358  mAnimateSmooth = false;
359  }
360  }
361 
362  void Window::setVisible(bool _visible)
363  {
364  if (mAnimateSmooth)
365  {
367  setAlpha(getAlphaVisible());
368  setEnabledSilent(true);
369  mAnimateSmooth = false;
370  }
371 
372  Base::setVisible(_visible);
373  }
374 
375  float Window::getAlphaVisible() const
376  {
377  return (mIsAutoAlpha && !mKeyRootFocus) ? WINDOW_ALPHA_DEACTIVE : ALPHA_MAX;
378  }
379 
380  void Window::getSnappedCoord(IntCoord& _coord)
381  {
382  if (abs(_coord.left) <= WINDOW_SNAP_DISTANSE) _coord.left = 0;
383  if (abs(_coord.top) <= WINDOW_SNAP_DISTANSE) _coord.top = 0;
384 
385  const IntSize view_size = getParentSize();
386 
387  if ( abs(_coord.left + _coord.width - view_size.width) < WINDOW_SNAP_DISTANSE)
388  _coord.left = view_size.width - _coord.width;
389  if ( abs(_coord.top + _coord.height - view_size.height) < WINDOW_SNAP_DISTANSE)
390  _coord.top = view_size.height - _coord.height;
391  }
392 
393  void Window::setVisibleSmooth(bool _visible)
394  {
395  mAnimateSmooth = true;
397 
398  if (_visible)
399  {
400  setEnabledSilent(true);
401  if (!getVisible())
402  {
404  Base::setVisible(true);
405  }
406  ControllerFadeAlpha* controller = createControllerFadeAlpha(getAlphaVisible(), WINDOW_SPEED_COEF, true);
407  controller->eventPostAction += newDelegate(this, &Window::animateStop);
408  ControllerManager::getInstance().addItem(this, controller);
409  }
410  else
411  {
412  setEnabledSilent(false);
413  ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MIN, WINDOW_SPEED_COEF, false);
415  ControllerManager::getInstance().addItem(this, controller);
416  }
417  }
418 
419  ControllerFadeAlpha* Window::createControllerFadeAlpha(float _alpha, float _coef, bool _enable)
420  {
422  ControllerFadeAlpha* controller = item->castType<ControllerFadeAlpha>();
423 
424  controller->setAlpha(_alpha);
425  controller->setCoef(_coef);
426  controller->setEnabled(_enable);
427 
428  return controller;
429  }
430 
431  void Window::setMinSize(const IntSize& _value)
432  {
433  mMinmax.left = _value.width;
434  mMinmax.top = _value.height;
435  }
436 
438  {
439  return IntSize(mMinmax.left, mMinmax.top);
440  }
441 
442  void Window::setMaxSize(const IntSize& _value)
443  {
444  mMinmax.right = _value.width;
445  mMinmax.bottom = _value.height;
446  }
447 
449  {
450  return IntSize(mMinmax.right, mMinmax.bottom);
451  }
452 
453  void Window::setPropertyOverride(const std::string& _key, const std::string& _value)
454  {
456  if (_key == "AutoAlpha")
457  setAutoAlpha(utility::parseValue<bool>(_value));
458 
460  else if (_key == "Snap")
461  setSnap(utility::parseValue<bool>(_value));
462 
464  else if (_key == "MinSize")
465  setMinSize(utility::parseValue<IntSize>(_value));
466 
468  else if (_key == "MaxSize")
469  setMaxSize(utility::parseValue<IntSize>(_value));
470 
472  else if (_key == "Movable")
473  setMovable(utility::parseValue<bool>(_value));
474 
475  else
476  {
477  Base::setPropertyOverride(_key, _value);
478  return;
479  }
480 
481  eventChangeProperty(this, _key, _value);
482  }
483 
485  {
486  return mCurrentActionScale;
487  }
488 
489  bool Window::getAutoAlpha() const
490  {
491  return mIsAutoAlpha;
492  }
493 
495  {
496  return mWidgetCaption;
497  }
498 
499  void Window::setMinSize(int _width, int _height)
500  {
501  setMinSize(IntSize(_width, _height));
502  }
503 
504  void Window::setMaxSize(int _width, int _height)
505  {
506  setMaxSize(IntSize(_width, _height));
507  }
508 
509  bool Window::getSnap() const
510  {
511  return mSnap;
512  }
513 
514  void Window::setSnap(bool _value)
515  {
516  mSnap = _value;
517  }
518 
519  void Window::notifyMouseReleased(MyGUI::Widget* _sender, int _left, int _top, MouseButton _id)
520  {
521  if (MouseButton::Left == _id)
522  {
523  mCurrentActionScale.clear();
524  }
525  }
526 
527  IntCoord Window::_getActionScale(Widget* _widget)
528  {
529  if (_widget->isUserString("Scale"))
530  {
531  IntCoord result = IntCoord::parse(_widget->getUserString("Scale"));
532 
533  if (result == IntCoord(1, 1, 0, 0) && !mMovable)
534  result.clear();
535 
536  return result;
537  }
538  else if (_widget->isUserString("Action"))
539  {
540  const std::string& action = _widget->getUserString("Action");
541  if (action == "Move")
542  {
543  if (mMovable)
544  return IntCoord(1, 1, 0, 0);
545  else
546  return IntCoord();
547  }
548 
549  IntCoord coord;
550  Align align = Align::parse(action);
551 
552  if (align.isLeft())
553  {
554  coord.left = 1;
555  coord.width = -1;
556  }
557  else if (align.isRight())
558  {
559  coord.width = 1;
560  }
561 
562  if (align.isTop())
563  {
564  coord.top = 1;
565  coord.height = -1;
566  }
567  else if (align.isBottom())
568  {
569  coord.height = 1;
570  }
571 
572  return coord;
573  }
574 
575  return IntCoord();
576  }
577 
578  void Window::setMovable(bool _value)
579  {
580  mMovable = _value;
581  }
582 
583  bool Window::getMovable() const
584  {
585  return mMovable;
586  }
587 
588  void Window::notifyMouseWheel(MyGUI::Widget* _sender, int _rel)
589  {
590  onMouseWheel(_rel);
591  eventMouseWheel(_sender, _rel);
592  }
593 
594 } // namespace MyGUI
MyGUI::WidgetInput::setNeedKeyFocus
void setNeedKeyFocus(bool _value)
Definition: MyGUI_WidgetInput.cpp:152
MyGUI::Singleton< InputManager >::getInstance
static InputManager & getInstance()
Definition: MyGUI_Singleton.h:44
MyGUI::WINDOW_ALPHA_ACTIVE
const float WINDOW_ALPHA_ACTIVE
Definition: MyGUI_Window.cpp:18
MyGUI::types::TRect::bottom
T bottom
Definition: MyGUI_TRect.h:23
MyGUI::WidgetInput::eventMouseButtonReleased
EventHandle_WidgetIntIntButton eventMouseButtonReleased
Definition: MyGUI_WidgetInput.h:163
MyGUI::WidgetInput::eventMouseButtonPressed
EventHandle_WidgetIntIntButton eventMouseButtonPressed
Definition: MyGUI_WidgetInput.h:154
MyGUI_Window.h
MyGUI_Gui.h
MyGUI::types::TCoord< int >::parse
static TCoord< int > parse(const std::string &_value)
Definition: MyGUI_TCoord.h:207
MyGUI::types::TSize::height
T height
Definition: MyGUI_TSize.h:21
MyGUI_ControllerManager.h
MyGUI::Window::onKeyChangeRootFocus
void onKeyChangeRootFocus(bool _focus) override
Definition: MyGUI_Window.cpp:130
MyGUI::Window::setCoord
void setCoord(const IntCoord &_value) override
Definition: MyGUI_Widget.cpp:684
MyGUI::Window::onMouseButtonReleased
void onMouseButtonReleased(int _left, int _top, MouseButton _id) override
Definition: MyGUI_Window.cpp:153
MyGUI::types::TCoord::left
T left
Definition: MyGUI_TCoord.h:22
MyGUI::Window::onMouseChangeRootFocus
void onMouseChangeRootFocus(bool _focus) override
Definition: MyGUI_Window.cpp:122
MyGUI::types::TPoint::top
T top
Definition: MyGUI_TPoint.h:21
MyGUI::Widget::setEnabledSilent
void setEnabledSilent(bool _value)
Definition: MyGUI_Widget.cpp:1279
MyGUI::types::TCoord::top
T top
Definition: MyGUI_TCoord.h:23
MyGUI::types::TRect::set
void set(T const &_left, T const &_top, T const &_right, T const &_bottom)
Definition: MyGUI_TRect.h:121
MyGUI::WINDOW_SNAP_DISTANSE
const int WINDOW_SNAP_DISTANSE
Definition: MyGUI_Window.cpp:23
MyGUI::UserData::setUserString
void setUserString(const std::string &_key, const std::string &_value)
Definition: MyGUI_WidgetUserData.cpp:14
MyGUI::action::actionWidgetDestroy
void actionWidgetDestroy(Widget *_widget, ControllerItem *_controller)
Definition: MyGUI_ActionController.cpp:28
MyGUI::Widget::getSkinWidgetsByName
VectorWidgetPtr getSkinWidgetsByName(const std::string &_name)
Definition: MyGUI_Widget.cpp:1087
MyGUI::Window::notifyMouseReleased
void notifyMouseReleased(MyGUI::Widget *_sender, int _left, int _top, MouseButton _id)
Definition: MyGUI_Window.cpp:519
MyGUI::Widget::eventChangeProperty
EventHandle_WidgetStringString eventChangeProperty
Definition: MyGUI_Widget.h:267
MyGUI::ALPHA_MAX
const float ALPHA_MAX
Definition: MyGUI_Macros.h:19
MyGUI::types::TRect::right
T right
Definition: MyGUI_TRect.h:22
MyGUI::ControllerFadeAlpha::getClassTypeName
static const std::string & getClassTypeName()
Definition: MyGUI_ControllerFadeAlpha.h:21
MyGUI::Window::notifyMouseWheel
void notifyMouseWheel(MyGUI::Widget *_sender, int _rel)
Definition: MyGUI_Window.cpp:588
MyGUI::IntCoord
types::TCoord< int > IntCoord
Definition: MyGUI_Types.h:35
MyGUI::Widget
Widget properties. Skin childs. Widget widget description should be here.
Definition: MyGUI_Widget.h:37
MyGUI::types::TPoint< int >
MyGUI::ControllerItem
Definition: MyGUI_ControllerItem.h:27
MyGUI::action::actionWidgetHide
void actionWidgetHide(Widget *_widget, ControllerItem *_controller)
Definition: MyGUI_ActionController.cpp:18
MyGUI::types::TSize::width
T width
Definition: MyGUI_TSize.h:20
MyGUI::ControllerFadeAlpha::setEnabled
void setEnabled(bool _value)
Definition: MyGUI_ControllerFadeAlpha.cpp:102
MyGUI::types::TRect::left
T left
Definition: MyGUI_TRect.h:20
MyGUI::Widget::getParentSize
IntSize getParentSize() const
Definition: MyGUI_Widget.cpp:1017
MyGUI::UserData::getUserString
const std::string & getUserString(const std::string &_key) const
Definition: MyGUI_WidgetUserData.cpp:20
MyGUI::Align::parse
static Align parse(const std::string &_value)
Definition: MyGUI_Align.h:127
MyGUI::Widget::setAlpha
void setAlpha(float _value)
Definition: MyGUI_Widget.cpp:432
MyGUI::UString
A UTF-16 string with implicit conversion to/from std::string and std::wstring.
Definition: MyGUI_UString.h:168
MyGUI::newDelegate
delegates::DelegateFunction< Args... > * newDelegate(void(*_func)(Args... args))
Definition: MyGUI_Delegate.h:99
MyGUI_Precompiled.h
MyGUI::Window::shutdownOverride
void shutdownOverride() override
Definition: MyGUI_Window.cpp:115
MyGUI::Window::setAutoAlpha
void setAutoAlpha(bool _value)
Definition: MyGUI_Window.cpp:218
MyGUI::Window::setSnap
void setSnap(bool _value)
Definition: MyGUI_Window.cpp:514
MyGUI::Window::notifyMousePressed
void notifyMousePressed(MyGUI::Widget *_sender, int _left, int _top, MouseButton _id)
Definition: MyGUI_Window.cpp:160
MyGUI::Window::initialiseOverride
void initialiseOverride() override
Definition: MyGUI_Window.cpp:36
MyGUI::MouseButton
Definition: MyGUI_MouseButton.h:16
MyGUI::Window::getMovable
bool getMovable() const
Definition: MyGUI_Window.cpp:583
MyGUI::Window::getMinSize
IntSize getMinSize()
Definition: MyGUI_Window.cpp:437
MyGUI::Window::setPosition
void setPosition(const IntPoint &_value) override
Definition: MyGUI_Widget.cpp:630
MyGUI::ICroppedRectangle::mCoord
IntCoord mCoord
Definition: MyGUI_ICroppedRectangle.h:245
MyGUI_InputManager.h
MyGUI::Window::notifyPressedButtonEvent
void notifyPressedButtonEvent(MyGUI::Widget *_sender)
Definition: MyGUI_Window.cpp:169
MyGUI::types::TPoint::left
T left
Definition: MyGUI_TPoint.h:20
MyGUI::TextBox
TextBox properties. Skin childs. TextBox widget description should be here.
Definition: MyGUI_TextBox.h:21
MyGUI::Window::getCaption
const UString & getCaption() override
Definition: MyGUI_Window.cpp:339
MyGUI::Window::onMouseButtonPressed
void onMouseButtonPressed(int _left, int _top, MouseButton _id) override
Definition: MyGUI_Window.cpp:146
MyGUI::Window::getCaptionWidget
TextBox * getCaptionWidget()
Definition: MyGUI_Window.cpp:494
MyGUI::WidgetInput::eventMouseDrag
EventPairAddParameter< EventHandle_WidgetIntInt, EventHandle_WidgetIntIntButton > eventMouseDrag
Definition: MyGUI_WidgetInput.h:130
MyGUI::IObject::castType
Type * castType(bool _throw=true)
Definition: MyGUI_IObject.h:18
MyGUI::types::TCoord::empty
bool empty() const
Definition: MyGUI_TCoord.h:180
MyGUI_WidgetManager.h
MyGUI::Window::setCaption
void setCaption(const UString &_value) override
Definition: MyGUI_Window.cpp:331
MyGUI::Window::destroySmooth
void destroySmooth()
Definition: MyGUI_Window.cpp:346
MyGUI::ControllerItem::eventPostAction
EventPairAddParameter< EventHandle_WidgetPtr, EventHandle_WidgetPtrControllerItemPtr > eventPostAction
Definition: MyGUI_ControllerItem.h:54
MyGUI::Window::setMaxSize
void setMaxSize(const IntSize &_value)
Definition: MyGUI_Window.cpp:442
MyGUI::Window::eventWindowButtonPressed
EventPair< EventHandle_WidgetString, EventHandle_WindowPtrCStringRef > eventWindowButtonPressed
Definition: MyGUI_Window.h:101
MyGUI::Window::animateStop
void animateStop(Widget *_widget, ControllerItem *_controller)
Definition: MyGUI_Window.cpp:353
MyGUI::UserData::isUserString
bool isUserString(const std::string &_key) const
Definition: MyGUI_WidgetUserData.cpp:44
MyGUI::TextBox::setCaption
virtual void setCaption(const UString &_value)
Definition: MyGUI_TextBox.cpp:77
MyGUI::Window::setVisible
void setVisible(bool _value) override
Definition: MyGUI_Window.cpp:362
MyGUI::Window::getSnap
bool getSnap() const
Definition: MyGUI_Window.cpp:509
MyGUI::types::TSize< int >
MyGUI::WINDOW_ALPHA_FOCUS
const float WINDOW_ALPHA_FOCUS
Definition: MyGUI_Window.cpp:19
MyGUI::ControllerFadeAlpha::setCoef
void setCoef(float _value)
Definition: MyGUI_ControllerFadeAlpha.cpp:97
MyGUI::Widget::assignWidget
void assignWidget(T *&_widget, const std::string &_name)
Definition: MyGUI_Widget.h:329
MyGUI::ControllerManager::createItem
ControllerItem * createItem(const std::string &_type)
Definition: MyGUI_ControllerManager.cpp:72
MyGUI::types::TCoord::point
TPoint< T > point() const
Definition: MyGUI_TCoord.h:185
MyGUI::Window::notifyMouseDrag
void notifyMouseDrag(MyGUI::Widget *_sender, int _left, int _top, MouseButton _id)
Definition: MyGUI_Window.cpp:174
MyGUI::Window::setSize
void setSize(const IntSize &_value) override
Definition: MyGUI_Widget.cpp:647
MyGUI::types::TRect::top
T top
Definition: MyGUI_TRect.h:21
MyGUI::ControllerManager::addItem
void addItem(Widget *_widget, ControllerItem *_item)
Definition: MyGUI_ControllerManager.cpp:78
MyGUI::types::TCoord::width
T width
Definition: MyGUI_TCoord.h:24
MyGUI::TextBox::getCaption
virtual const UString & getCaption()
Definition: MyGUI_TextBox.cpp:83
MyGUI::Widget::getClientWidget
Widget * getClientWidget()
Definition: MyGUI_Widget.cpp:1289
MyGUI::types::TCoord::clear
void clear()
Definition: MyGUI_TCoord.h:160
MyGUI::WINDOW_ALPHA_DEACTIVE
const float WINDOW_ALPHA_DEACTIVE
Definition: MyGUI_Window.cpp:20
MyGUI::Window::eventWindowChangeCoord
EventPair< EventHandle_WidgetVoid, EventHandle_WindowPtr > eventWindowChangeCoord
Definition: MyGUI_Window.h:107
MyGUI::InputManager::getLastPressedPosition
const IntPoint & getLastPressedPosition(MouseButton _id) const
Definition: MyGUI_InputManager.cpp:644
MyGUI::Window::onMouseDrag
void onMouseDrag(int _left, int _top, MouseButton _id) override
Definition: MyGUI_Window.cpp:138
MyGUI::IntSize
types::TSize< int > IntSize
Definition: MyGUI_Types.h:29
MyGUI::Widget::getVisible
bool getVisible() const
Definition: MyGUI_Widget.cpp:1249
MyGUI::Window::Window
Window()
Definition: MyGUI_Window.cpp:25
MyGUI::ControllerFadeAlpha
Definition: MyGUI_ControllerFadeAlpha.h:20
MyGUI::ControllerFadeAlpha::setAlpha
void setAlpha(float _value)
Definition: MyGUI_ControllerFadeAlpha.cpp:92
MyGUI::MouseButton::Left
@ Left
Definition: MyGUI_MouseButton.h:21
MyGUI::Window::setMinSize
void setMinSize(const IntSize &_value)
Definition: MyGUI_Window.cpp:431
MyGUI::Window::getActionScale
const IntCoord & getActionScale() const
Definition: MyGUI_Window.cpp:484
MyGUI::types::TCoord< int >
MyGUI::Window::setVisibleSmooth
void setVisibleSmooth(bool _value)
Definition: MyGUI_Window.cpp:393
MyGUI_Macros.h
MyGUI::WidgetInput::eventMouseWheel
EventHandle_WidgetInt eventMouseWheel
Definition: MyGUI_WidgetInput.h:145
MyGUI::types::TCoord::height
T height
Definition: MyGUI_TCoord.h:25
MyGUI
Definition: MyGUI_ActionController.h:15
MyGUI::Window::getAutoAlpha
bool getAutoAlpha() const
Definition: MyGUI_Window.cpp:489
MyGUI::Window::updateAlpha
void updateAlpha()
Definition: MyGUI_Window.cpp:201
MyGUI::VectorWidgetPtr
std::vector< Widget * > VectorWidgetPtr
Definition: MyGUI_WidgetDefines.h:20
MyGUI::ControllerManager::removeItem
void removeItem(Widget *_widget)
Definition: MyGUI_ControllerManager.cpp:105
MyGUI::ALPHA_MIN
const float ALPHA_MIN
Definition: MyGUI_Macros.h:20
MyGUI::WINDOW_SPEED_COEF
const float WINDOW_SPEED_COEF
Definition: MyGUI_Window.cpp:21
MyGUI::types::TCoord::size
TSize< T > size() const
Definition: MyGUI_TCoord.h:190
MyGUI::Window::getMaxSize
IntSize getMaxSize()
Definition: MyGUI_Window.cpp:448
MyGUI::Window::setPropertyOverride
void setPropertyOverride(const std::string &_key, const std::string &_value) override
Definition: MyGUI_Window.cpp:453
MyGUI_ResourceSkin.h
MyGUI::Window::setMovable
void setMovable(bool _value)
Definition: MyGUI_Window.cpp:578
MyGUI::WidgetInput::onMouseWheel
virtual void onMouseWheel(int _rel)
Definition: MyGUI_WidgetInput.cpp:218