42 mMouseRootFocus(false),
46 mAnimateSmooth(false),
61 (std::numeric_limits<int>::min)(),
62 (std::numeric_limits<int>::min)(),
63 (std::numeric_limits<int>::max)(),
64 (std::numeric_limits<int>::max)());
66 bool main_move =
false;
74 if (mClient !=
nullptr)
87 if (mWidgetCaption !=
nullptr)
96 for (VectorWidgetPtr::iterator iter = buttons.begin(); iter != buttons.end(); ++iter)
102 for (VectorWidgetPtr::iterator iter = actions.begin(); iter != actions.end(); ++iter)
109 const size_t countNames = 8;
110 const char* resizers[2][countNames] =
112 {
"ResizeLeftTop",
"ResizeTop",
"ResizeRightTop",
"ResizeRight",
"ResizeRightBottom",
"ResizeBottom",
"ResizeLeftBottom",
"ResizeLeft"},
113 {
"Left Top",
"Top",
"Right Top",
"Right",
"Right Bottom",
"Bottom",
"Left Bottom",
"Left"}
116 for (
size_t index = 0; index < countNames; ++ index)
120 if (widget !=
nullptr)
133 mWidgetCaption =
nullptr;
140 mMouseRootFocus = _focus;
148 mKeyRootFocus = _focus;
181 mCurrentActionScale = _getActionScale(_sender);
197 IntCoord coord = mCurrentActionScale;
199 coord.
top *= (_top - point.
top);
206 if (coord.
left == 0 && coord.
top == 0)
207 setSize((mPreActionCoord + coord).size());
225 else if (mMouseRootFocus)
236 mIsAutoAlpha = _auto;
243 else if (mMouseRootFocus)
257 getSnappedCoord(coord);
258 point = coord.point();
283 getSnappedCoord(coord);
336 getSnappedCoord(coord);
349 if (mWidgetCaption !=
nullptr)
357 if (mWidgetCaption !=
nullptr)
374 mAnimateSmooth =
false;
385 mAnimateSmooth =
false;
391 float Window::getAlphaVisible()
const
396 void Window::getSnappedCoord(
IntCoord& _coord)
404 _coord.left = view_size.width - _coord.width;
406 _coord.top = view_size.height - _coord.height;
411 mAnimateSmooth =
true;
435 ControllerFadeAlpha* Window::createControllerFadeAlpha(
float _alpha,
float _coef,
bool _enable)
471 if (_key ==
"AutoAlpha")
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));
491 return mCurrentActionScale;
501 return mWidgetCaption;
543 mCurrentActionScale.
clear();
553 if (result ==
IntCoord(1, 1, 0, 0) && !mMovable)
560 const std::string& action = _widget->
getUserString(
"Action");
561 if (action ==
"Move")
577 else if (align.isRight())
587 else if (align.isBottom())