MyGUI_Window.cpp
Go to the documentation of this file.
/*
* This source file is part of MyGUI. For the latest info, see http://mygui.info/
* Distributed under the MIT License
* (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
*/
#include "MyGUI_Precompiled.h"
#include "MyGUI_Window.h"
#include "MyGUI_Macros.h"
#include "MyGUI_Gui.h"
#include "MyGUI_ControllerManager.h"
#include "MyGUI_InputManager.h"
#include "MyGUI_WidgetManager.h"
#include "MyGUI_ResourceSkin.h"
#include <array>
namespace MyGUI
{
const float WINDOW_ALPHA_ACTIVE = ALPHA_MAX;
const float WINDOW_ALPHA_FOCUS = 0.7f;
const float WINDOW_ALPHA_DEACTIVE = 0.3f;
const float WINDOW_SPEED_COEF = 3.0f;
const int WINDOW_SNAP_DISTANSE = 10;
void Window::initialiseOverride()
{
Base::initialiseOverride();
// FIXME нам нужен фокус клавы
setNeedKeyFocus(true);
// дефолтные размеры
mMinmax.set(
(std::numeric_limits<int>::min)(),
(std::numeric_limits<int>::min)(),
(std::numeric_limits<int>::max)(),
(std::numeric_limits<int>::max)());
bool main_move = false;
if (isUserString("MainMove"))
{
setUserString("Scale", "1 1 0 0");
main_move = true;
}
if (getClientWidget() != nullptr)
{
if (main_move)
{
getClientWidget()->setUserString("Scale", "1 1 0 0");
getClientWidget()->eventMouseButtonPressed += newDelegate(this, &Window::notifyMousePressed);
getClientWidget()->eventMouseButtonReleased += newDelegate(this, &Window::notifyMouseReleased);
getClientWidget()->eventMouseDrag += newDelegate(this, &Window::notifyMouseDrag);
}
}
assignWidget(mWidgetCaption, "Caption");
if (mWidgetCaption != nullptr)
{
mWidgetCaption->setUserString("Scale", "1 1 0 0");
mWidgetCaption->eventMouseButtonPressed += newDelegate(this, &Window::notifyMousePressed);
mWidgetCaption->eventMouseButtonReleased += newDelegate(this, &Window::notifyMouseReleased);
mWidgetCaption->eventMouseDrag += newDelegate(this, &Window::notifyMouseDrag);
}
VectorWidgetPtr buttons = getSkinWidgetsByName("Button");
for (auto& button : buttons)
{
button->eventMouseButtonClick += newDelegate(this, &Window::notifyPressedButtonEvent);
}
VectorWidgetPtr actions = getSkinWidgetsByName("Action");
for (auto& action : actions)
{
action->eventMouseButtonPressed += newDelegate(this, &Window::notifyMousePressed);
action->eventMouseButtonReleased += newDelegate(this, &Window::notifyMouseReleased);
action->eventMouseDrag += newDelegate(this, &Window::notifyMouseDrag);
action->eventMouseWheel += newDelegate(this, &Window::notifyMouseWheel);
}
constexpr size_t countNames = 8;
const std::array<std::pair<std::string_view, std::string_view>, countNames> resizers{
{{"ResizeLeftTop", "Left Top"},
{"ResizeTop", "Top"},
{"ResizeRightTop", "Right Top"},
{"ResizeRight", "Right"},
{"ResizeRightBottom", "Right Bottom"},
{"ResizeBottom", "Bottom"},
{"ResizeLeftBottom", "Left Bottom"},
{"ResizeLeft", "Left"}}};
for (const auto& resizer : resizers)
{
Widget* widget = nullptr;
assignWidget(widget, resizer.first);
if (widget != nullptr)
{
widget->eventMouseButtonPressed += newDelegate(this, &Window::notifyMousePressed);
widget->eventMouseButtonReleased += newDelegate(this, &Window::notifyMouseReleased);
widget->eventMouseDrag += newDelegate(this, &Window::notifyMouseDrag);
widget->eventMouseWheel += newDelegate(this, &Window::notifyMouseWheel);
widget->setUserString("Action", resizer.second);
}
}
}
void Window::shutdownOverride()
{
mWidgetCaption = nullptr;
Base::shutdownOverride();
}
void Window::onMouseChangeRootFocus(bool _focus)
{
mMouseRootFocus = _focus;
updateAlpha();
Base::onMouseChangeRootFocus(_focus);
}
void Window::onKeyChangeRootFocus(bool _focus)
{
mKeyRootFocus = _focus;
updateAlpha();
Base::onKeyChangeRootFocus(_focus);
}
void Window::onMouseDrag(int _left, int _top, MouseButton _id)
{
// на тот случай, если двигать окно, можно за любое место виджета
notifyMouseDrag(this, _left, _top, _id);
Base::onMouseDrag(_left, _top, _id);
}
void Window::onMouseButtonPressed(int _left, int _top, MouseButton _id)
{
notifyMousePressed(this, _left, _top, _id);
Base::onMouseButtonPressed(_left, _top, _id);
}
void Window::onMouseButtonReleased(int _left, int _top, MouseButton _id)
{
notifyMouseReleased(this, _left, _top, _id);
Base::onMouseButtonReleased(_left, _top, _id);
}
void Window::notifyMousePressed(MyGUI::Widget* _sender, int _left, int _top, MouseButton _id)
{
if (MouseButton::Left == _id)
{
mPreActionCoord = mCoord;
mCurrentActionScale = _getActionScale(_sender);
}
}
void Window::notifyPressedButtonEvent(MyGUI::Widget* _sender)
{
eventWindowButtonPressed(this, _sender->getUserString("Event"));
}
void Window::notifyMouseDrag(MyGUI::Widget* _sender, int _left, int _top, MouseButton _id)
{
if (_id != MouseButton::Left)
return;
const IntPoint& point = InputManager::getInstance().getLastPressedPosition(MouseButton::Left);
IntCoord coord = mCurrentActionScale;
coord.left *= (_left - point.left);
coord.top *= (_top - point.top);
coord.width *= (_left - point.left);
coord.height *= (_top - point.top);
if (coord.empty())
return;
if (coord.left == 0 && coord.top == 0)
setSize((mPreActionCoord + coord).size());
else if (coord.width == 0 && coord.height == 0)
setPosition((mPreActionCoord + coord).point());
else
setCoord(mPreActionCoord + coord);
// посылаем событие о изменении позиции и размере
eventWindowChangeCoord(this);
}
void Window::updateAlpha()
{
if (!mIsAutoAlpha)
return;
float alpha;
if (mKeyRootFocus)
alpha = WINDOW_ALPHA_ACTIVE;
else if (mMouseRootFocus)
alpha = WINDOW_ALPHA_FOCUS;
else
alpha = WINDOW_ALPHA_DEACTIVE;
ControllerFadeAlpha* controller = createControllerFadeAlpha(alpha, WINDOW_SPEED_COEF, true);
ControllerManager::getInstance().addItem(this, controller);
}
void Window::setAutoAlpha(bool _auto)
{
mIsAutoAlpha = _auto;
if (!_auto)
setAlpha(ALPHA_MAX);
else
{
if (mKeyRootFocus)
setAlpha(WINDOW_ALPHA_ACTIVE);
else if (mMouseRootFocus)
setAlpha(WINDOW_ALPHA_FOCUS);
else
setAlpha(WINDOW_ALPHA_DEACTIVE);
}
}
void Window::setPosition(const IntPoint& _point)
{
IntPoint point = _point;
// прилепляем к краям
if (mSnap)
{
IntCoord coord(point, mCoord.size());
getSnappedCoord(coord, Snap::Position);
point = coord.point();
}
Base::setPosition(point);
}
void Window::setSize(const IntSize& _size)
{
IntSize size = _size;
// прилепляем к краям
if (size.width < mMinmax.left)
size.width = mMinmax.left;
else if (size.width > mMinmax.right)
size.width = mMinmax.right;
if (size.height < mMinmax.top)
size.height = mMinmax.top;
else if (size.height > mMinmax.bottom)
size.height = mMinmax.bottom;
if ((size.width == mCoord.width) && (size.height == mCoord.height))
return;
if (mSnap)
{
IntCoord coord(mCoord.point(), size);
getSnappedCoord(coord, Snap::Size);
size = coord.size();
}
Base::setSize(size);
}
void Window::setCoord(const IntCoord& _coord)
{
IntPoint pos = _coord.point();
IntSize size = _coord.size();
if (size.width < mMinmax.left)
{
int offset = mMinmax.left - size.width;
size.width = mMinmax.left;
if ((pos.left - mCoord.left) > offset)
pos.left -= offset;
else
pos.left = mCoord.left;
}
else if (size.width > mMinmax.right)
{
int offset = mMinmax.right - size.width;
size.width = mMinmax.right;
if ((pos.left - mCoord.left) < offset)
pos.left -= offset;
else
pos.left = mCoord.left;
}
if (size.height < mMinmax.top)
{
int offset = mMinmax.top - size.height;
size.height = mMinmax.top;
if ((pos.top - mCoord.top) > offset)
pos.top -= offset;
else
pos.top = mCoord.top;
}
else if (size.height > mMinmax.bottom)
{
int offset = mMinmax.bottom - size.height;
size.height = mMinmax.bottom;
if ((pos.top - mCoord.top) < offset)
pos.top -= offset;
else
pos.top = mCoord.top;
}
IntCoord coord(pos, size);
if (mSnap)
{
// prefer size change over position change
getSnappedCoord(coord, Snap::Size);
}
if (coord == mCoord)
return;
Base::setCoord(coord);
}
void Window::setCaption(const UString& _caption)
{
if (mWidgetCaption != nullptr)
mWidgetCaption->setCaption(_caption);
else
Base::setCaption(_caption);
}
const UString& Window::getCaption() const
{
if (mWidgetCaption != nullptr)
return mWidgetCaption->getCaption();
return Base::getCaption();
}
void Window::destroySmooth()
{
ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MIN, WINDOW_SPEED_COEF, false);
controller->eventPostAction += newDelegate(action::actionWidgetDestroy);
ControllerManager::getInstance().addItem(this, controller);
}
void Window::animateStop(Widget* _widget, ControllerItem* _controller)
{
if (mAnimateSmooth)
{
ControllerManager::getInstance().removeItem(this);
mAnimateSmooth = false;
}
}
void Window::setVisible(bool _visible)
{
if (mAnimateSmooth)
{
ControllerManager::getInstance().removeItem(this);
setAlpha(getAlphaVisible());
setEnabledSilent(true);
mAnimateSmooth = false;
}
Base::setVisible(_visible);
}
float Window::getAlphaVisible() const
{
return (mIsAutoAlpha && !mKeyRootFocus) ? WINDOW_ALPHA_DEACTIVE : ALPHA_MAX;
}
void Window::getSnappedCoord(IntCoord& _coord, Snap snapMode) const
{
const IntSize view_size = getParentSize();
bool nearLeftSide = abs(_coord.left) <= WINDOW_SNAP_DISTANSE;
bool nearTopSide = abs(_coord.top) <= WINDOW_SNAP_DISTANSE;
bool nearRightSide = abs(_coord.left + _coord.width - view_size.width) <= WINDOW_SNAP_DISTANSE;
bool nearBottomSide = abs(_coord.top + _coord.height - view_size.height) <= WINDOW_SNAP_DISTANSE;
switch (snapMode)
{
case Snap::Position:
if (nearLeftSide)
_coord.left = 0;
if (nearTopSide)
_coord.top = 0;
if (nearRightSide)
_coord.left = view_size.width - _coord.width;
if (nearBottomSide)
_coord.top = view_size.height - _coord.height;
break;
case Snap::Size:
if (nearLeftSide)
{
_coord.width = _coord.right();
_coord.left = 0;
}
if (nearTopSide)
{
_coord.height = _coord.bottom();
_coord.top = 0;
}
if (nearRightSide)
_coord.width = view_size.width - _coord.left;
if (nearBottomSide)
_coord.height = view_size.height - _coord.top;
break;
}
}
void Window::setVisibleSmooth(bool _visible)
{
mAnimateSmooth = true;
ControllerManager::getInstance().removeItem(this);
if (_visible)
{
setEnabledSilent(true);
if (!getVisible())
{
setAlpha(ALPHA_MIN);
Base::setVisible(true);
}
ControllerFadeAlpha* controller = createControllerFadeAlpha(getAlphaVisible(), WINDOW_SPEED_COEF, true);
controller->eventPostAction += newDelegate(this, &Window::animateStop);
ControllerManager::getInstance().addItem(this, controller);
}
else
{
setEnabledSilent(false);
ControllerFadeAlpha* controller = createControllerFadeAlpha(ALPHA_MIN, WINDOW_SPEED_COEF, false);
controller->eventPostAction += newDelegate(action::actionWidgetHide);
ControllerManager::getInstance().addItem(this, controller);
}
}
ControllerFadeAlpha* Window::createControllerFadeAlpha(float _alpha, float _coef, bool _enable)
{
ControllerItem* item = ControllerManager::getInstance().createItem(ControllerFadeAlpha::getClassTypeName());
ControllerFadeAlpha* controller = item->castType<ControllerFadeAlpha>();
controller->setAlpha(_alpha);
controller->setCoef(_coef);
controller->setEnabled(_enable);
return controller;
}
void Window::setMinSize(const IntSize& _value)
{
mMinmax.left = _value.width;
mMinmax.top = _value.height;
}
IntSize Window::getMinSize() const
{
return {mMinmax.left, mMinmax.top};
}
void Window::setMaxSize(const IntSize& _value)
{
mMinmax.right = _value.width;
mMinmax.bottom = _value.height;
}
IntSize Window::getMaxSize() const
{
return {mMinmax.right, mMinmax.bottom};
}
void Window::setPropertyOverride(std::string_view _key, std::string_view _value)
{
if (_key == "AutoAlpha")
setAutoAlpha(utility::parseValue<bool>(_value));
else if (_key == "Snap")
setSnap(utility::parseValue<bool>(_value));
else if (_key == "MinSize")
setMinSize(utility::parseValue<IntSize>(_value));
else if (_key == "MaxSize")
setMaxSize(utility::parseValue<IntSize>(_value));
else if (_key == "Movable")
setMovable(utility::parseValue<bool>(_value));
else
{
Base::setPropertyOverride(_key, _value);
return;
}
eventChangeProperty(this, _key, _value);
}
const IntCoord& Window::getActionScale() const
{
return mCurrentActionScale;
}
bool Window::getAutoAlpha() const
{
return mIsAutoAlpha;
}
TextBox* Window::getCaptionWidget() const
{
return mWidgetCaption;
}
void Window::setMinSize(int _width, int _height)
{
setMinSize(IntSize(_width, _height));
}
void Window::setMaxSize(int _width, int _height)
{
setMaxSize(IntSize(_width, _height));
}
bool Window::getSnap() const
{
return mSnap;
}
void Window::setSnap(bool _value)
{
mSnap = _value;
}
void Window::notifyMouseReleased(MyGUI::Widget* _sender, int _left, int _top, MouseButton _id)
{
if (MouseButton::Left == _id)
{
mCurrentActionScale.clear();
}
}
IntCoord Window::_getActionScale(Widget* _widget) const
{
if (_widget->isUserString("Scale"))
{
IntCoord result = IntCoord::parse(_widget->getUserString("Scale"));
if (result == IntCoord(1, 1, 0, 0) && !mMovable)
result.clear();
return result;
}
if (_widget->isUserString("Action"))
{
std::string_view action = _widget->getUserString("Action");
if (action == "Move")
{
if (mMovable)
return {1, 1, 0, 0};
return {};
}
IntCoord coord;
Align align = Align::parse(action);
if (align.isLeft())
{
coord.left = 1;
coord.width = -1;
}
else if (align.isRight())
{
coord.width = 1;
}
if (align.isTop())
{
coord.top = 1;
coord.height = -1;
}
else if (align.isBottom())
{
coord.height = 1;
}
return coord;
}
return {};
}
void Window::setMovable(bool _value)
{
mMovable = _value;
}
bool Window::getMovable() const
{
return mMovable;
}
void Window::notifyMouseWheel(MyGUI::Widget* _sender, int _rel)
{
onMouseWheel(_rel);
eventMouseWheel(_sender, _rel);
}
} // 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