27 mMouseRootFocus(false),
31 mAnimateSmooth(false),
39 Base::initialiseOverride();
46 (std::numeric_limits<int>::min)(),
47 (std::numeric_limits<int>::min)(),
48 (std::numeric_limits<int>::max)(),
49 (std::numeric_limits<int>::max)());
51 bool main_move =
false;
60 if (mClient !=
nullptr)
74 if (mWidgetCaption !=
nullptr)
83 for (VectorWidgetPtr::iterator iter = buttons.begin(); iter != buttons.end(); ++iter)
89 for (VectorWidgetPtr::iterator iter = actions.begin(); iter != actions.end(); ++iter)
97 const size_t countNames = 8;
98 const char* resizers[2][countNames] =
100 {
"ResizeLeftTop",
"ResizeTop",
"ResizeRightTop",
"ResizeRight",
"ResizeRightBottom",
"ResizeBottom",
"ResizeLeftBottom",
"ResizeLeft"},
101 {
"Left Top",
"Top",
"Right Top",
"Right",
"Right Bottom",
"Bottom",
"Left Bottom",
"Left"}
104 for (
size_t index = 0; index < countNames; ++ index)
108 if (widget !=
nullptr)
122 mWidgetCaption =
nullptr;
124 Base::shutdownOverride();
129 mMouseRootFocus = _focus;
132 Base::onMouseChangeRootFocus(_focus);
137 mKeyRootFocus = _focus;
140 Base::onKeyChangeRootFocus(_focus);
148 Base::onMouseDrag(_left, _top, _id);
155 Base::onMouseButtonPressed(_left, _top, _id);
162 Base::onMouseButtonReleased(_left, _top, _id);
170 mCurrentActionScale = _getActionScale(_sender);
186 IntCoord coord = mCurrentActionScale;
188 coord.
top *= (_top - point.
top);
195 if (coord.
left == 0 && coord.
top == 0)
196 setSize((mPreActionCoord + coord).size());
214 else if (mMouseRootFocus)
225 mIsAutoAlpha = _auto;
232 else if (mMouseRootFocus)
246 getSnappedCoord(coord);
247 point = coord.point();
250 Base::setPosition(point);
272 getSnappedCoord(coord);
325 getSnappedCoord(coord);
333 Base::setCoord(coord);
338 if (mWidgetCaption !=
nullptr)
341 Base::setCaption(_caption);
346 if (mWidgetCaption !=
nullptr)
348 return Base::getCaption();
363 mAnimateSmooth =
false;
374 mAnimateSmooth =
false;
377 Base::setVisible(_visible);
380 float Window::getAlphaVisible()
const
385 void Window::getSnappedCoord(
IntCoord& _coord)
393 _coord.left = view_size.width - _coord.width;
395 _coord.top = view_size.height - _coord.height;
400 mAnimateSmooth =
true;
409 Base::setVisible(
true);
424 ControllerFadeAlpha* Window::createControllerFadeAlpha(
float _alpha,
float _coef,
bool _enable)
461 if (_key ==
"AutoAlpha")
465 else if (_key ==
"Snap")
466 setSnap(utility::parseValue<bool>(_value));
469 else if (_key ==
"MinSize")
470 setMinSize(utility::parseValue<IntSize>(_value));
473 else if (_key ==
"MaxSize")
474 setMaxSize(utility::parseValue<IntSize>(_value));
477 else if (_key ==
"Movable")
478 setMovable(utility::parseValue<bool>(_value));
482 Base::setPropertyOverride(_key, _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())