MyGUI_ItemBox.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_ItemBox.h"
#include "MyGUI_Button.h"
#include "MyGUI_ScrollBar.h"
#include "MyGUI_ResourceSkin.h"
#include "MyGUI_InputManager.h"
#include "MyGUI_Gui.h"
#include "MyGUI_WidgetManager.h"
namespace MyGUI
{
ItemBox::ItemBox()
{
mChangeContentByResize = true;
}
void ItemBox::initialiseOverride()
{
Base::initialiseOverride();
// FIXME нам нужен фокус клавы
setNeedKeyFocus(true);
mDragLayer = "DragAndDrop";
if (isUserString("DragLayer"))
mDragLayer = getUserString("DragLayer");
assignWidget(mScrollViewClient, "Client");
if (getClientWidget() != nullptr)
{
getClientWidget()->eventMouseWheel += newDelegate(this, &ItemBox::notifyMouseWheel);
getClientWidget()->eventMouseButtonPressed += newDelegate(this, &ItemBox::notifyMouseButtonPressed);
getClientWidget()->eventMouseButtonReleased += newDelegate(this, &ItemBox::notifyMouseButtonReleased);
}
assignWidget(mVScroll, "VScroll");
if (mVScroll != nullptr)
{
mVScroll->eventScrollChangePosition += newDelegate(this, &ItemBox::notifyScrollChangePosition);
}
assignWidget(mHScroll, "HScroll");
if (mHScroll != nullptr)
{
mHScroll->eventScrollChangePosition += newDelegate(this, &ItemBox::notifyScrollChangePosition);
}
// подписываем клиент для драгэндропа
if (getClientWidget() != nullptr)
getClientWidget()->_setContainer(this);
requestItemSize();
updateScrollSize();
updateScrollPosition();
}
void ItemBox::shutdownOverride()
{
mVScroll = nullptr;
mHScroll = nullptr;
Base::shutdownOverride();
}
void ItemBox::setPosition(const IntPoint& _point)
{
Base::setPosition(_point);
}
void ItemBox::setSize(const IntSize& _size)
{
Base::setSize(_size);
updateFromResize();
}
void ItemBox::setCoord(const IntCoord& _coord)
{
Base::setCoord(_coord);
updateFromResize();
}
void ItemBox::requestItemSize()
{
IntCoord coord(0, 0, 1, 1);
// спрашиваем размер иконок
requestCoordItem(this, coord, false);
mSizeItem = coord.size();
MYGUI_ASSERT(
(mSizeItem.width > 0 && mSizeItem.height > 0),
"(mSizeItem.width > 0 && mSizeItem.height > 0) at requestCoordWidgetItem");
}
void ItemBox::updateFromResize()
{
requestItemSize();
updateScrollSize();
updateScrollPosition();
_updateAllVisible(true);
_resetContainer(true);
}
void ItemBox::_updateAllVisible(bool _redraw)
{
int count_visible = 0;
if (mAlignVert)
{
count_visible = (_getClientWidget()->getHeight() / mSizeItem.height) + 2;
}
else
{
count_visible = (_getClientWidget()->getWidth() / mSizeItem.width) + 2;
}
size_t start = (mFirstVisibleIndex * mCountItemInLine);
size_t count = (count_visible * mCountItemInLine) + start;
size_t index = 0;
for (size_t pos = start; pos < count; ++pos, ++index)
{
// дальше нет айтемов
if (pos >= mItemsInfo.size())
break;
Widget* item = getItemWidget(index);
if (mAlignVert)
{
item->setPosition(
((int)index % mCountItemInLine) * mSizeItem.width - mContentPosition.left,
(((int)index / mCountItemInLine) * mSizeItem.height) - mFirstOffsetIndex);
}
else
{
item->setPosition(
(((int)index / mCountItemInLine) * mSizeItem.width) - mFirstOffsetIndex,
((int)index % mCountItemInLine) * mSizeItem.height - mContentPosition.top);
}
item->setSize(mSizeItem);
item->setVisible(true);
if (_redraw)
{
IBDrawItemInfo data(pos, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, true, false);
requestDrawItem(this, item, data);
}
}
// все виджеты еще есть, то их надо бы скрыть
while (index < mVectorItems.size())
{
mVectorItems[index]->setVisible(false);
index++;
}
}
Widget* ItemBox::getItemWidget(size_t _index)
{
// еще нет такого виджета, нуно создать
if (_index == mVectorItems.size())
{
requestItemSize();
Widget* item = _getClientWidget()->createWidget<Widget>(
"Default",
IntCoord(0, 0, mSizeItem.width, mSizeItem.height),
Align::Default);
// вызываем запрос на создание виджета
requestCreateWidgetItem(this, item);
item->eventMouseWheel += newDelegate(this, &ItemBox::notifyMouseWheel);
item->eventRootMouseChangeFocus += newDelegate(this, &ItemBox::notifyRootMouseChangeFocus);
item->eventMouseButtonPressed += newDelegate(this, &ItemBox::notifyMouseButtonPressed);
item->eventMouseButtonReleased += newDelegate(this, &ItemBox::notifyMouseButtonReleased);
item->eventMouseButtonDoubleClick += newDelegate(this, &ItemBox::notifyMouseButtonDoubleClick);
item->eventMouseDrag += newDelegate(this, &ItemBox::notifyMouseDrag);
item->_setContainer(this);
item->eventKeyButtonPressed += newDelegate(this, &ItemBox::notifyKeyButtonPressed);
item->eventKeyButtonReleased += newDelegate(this, &ItemBox::notifyKeyButtonReleased);
item->_setInternalData((size_t)mVectorItems.size());
mVectorItems.push_back(item);
}
// запрашивать только последовательно
MYGUI_ASSERT_RANGE(_index, mVectorItems.size(), "ItemBox::getItemWidget");
return mVectorItems[_index];
}
void ItemBox::onMouseWheel(int _rel)
{
notifyMouseWheel(nullptr, _rel);
Base::onMouseWheel(_rel);
}
void ItemBox::onKeySetFocus(Widget* _old)
{
mIsFocus = true;
Base::onKeySetFocus(_old);
}
void ItemBox::onKeyLostFocus(Widget* _new)
{
mIsFocus = false;
Base::onKeyLostFocus(_new);
}
void ItemBox::resetCurrentActiveItem()
{
// сбрасываем старую подсветку
if (mIndexActive != ITEM_NONE)
{
size_t start = (size_t)(mFirstVisibleIndex * mCountItemInLine);
size_t index = mIndexActive;
mIndexActive = ITEM_NONE;
// если видим, то обновляем
if ((mIndexActive >= start) && (mIndexActive < (start + mVectorItems.size())))
{
IBDrawItemInfo data(index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, false, false);
requestDrawItem(this, mVectorItems[mIndexActive - start], data);
}
}
}
void ItemBox::findCurrentActiveItem()
{
MYGUI_DEBUG_ASSERT(mIndexActive == ITEM_NONE, "use : resetCurrentActiveItem() before findCurrentActiveItem()");
const IntPoint& point = InputManager::getInstance().getMousePositionByLayer();
// сначала проверяем клиентскую зону
const IntRect& rect = _getClientWidget()->getAbsoluteRect();
if ((point.left < rect.left) || (point.left > rect.right) || (point.top < rect.top) ||
(point.top > rect.bottom))
{
return;
}
for (const auto& item : mVectorItems)
{
const IntRect& abs_rect = item->getAbsoluteRect();
if ((point.left >= abs_rect.left) && (point.left <= abs_rect.right) && (point.top >= abs_rect.top) &&
(point.top <= abs_rect.bottom))
{
size_t index = calcIndexByWidget(item);
// при переборе индекс может быть больше, так как может создасться сколько угодно
if (index < mItemsInfo.size())
{
mIndexActive = index;
IBDrawItemInfo data(index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, false, false);
requestDrawItem(this, item, data);
}
break;
}
}
}
size_t ItemBox::_getItemIndex(Widget* _item) const
{
if (_item == _getClientWidget())
return ITEM_NONE;
size_t index = calcIndexByWidget(_item);
if (index < mItemsInfo.size())
return index;
return ITEM_NONE;
}
void ItemBox::_setContainerItemInfo(size_t _index, bool _set, bool _accept)
{
if (_index == ITEM_NONE)
return;
MYGUI_ASSERT_RANGE(_index, mItemsInfo.size(), "ItemBox::_setContainerItemInfo");
mIndexAccept = (_set && _accept) ? _index : ITEM_NONE;
mIndexRefuse = (_set && !_accept) ? _index : ITEM_NONE;
size_t start = (size_t)(mFirstVisibleIndex * mCountItemInLine);
if ((_index >= start) && (_index < (start + mVectorItems.size())))
{
IBDrawItemInfo data(_index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, false, false);
requestDrawItem(this, mVectorItems[_index - start], data);
}
}
void ItemBox::setItemDataAt(size_t _index, Any _data)
{
MYGUI_ASSERT_RANGE(_index, mItemsInfo.size(), "ItemBox::setItemData");
mItemsInfo[_index].data = std::move(_data);
size_t start = (size_t)(mFirstVisibleIndex * mCountItemInLine);
if ((_index >= start) && (_index < (start + mVectorItems.size())))
{
IBDrawItemInfo data(_index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, true, false);
requestDrawItem(this, mVectorItems[_index - start], data);
}
_resetContainer(true);
}
void ItemBox::insertItemAt(size_t _index, Any _data, bool update)
{
MYGUI_ASSERT_RANGE_INSERT(_index, mItemsInfo.size(), "ItemBox::insertItemAt");
if (_index == ITEM_NONE)
_index = mItemsInfo.size();
_resetContainer(false);
resetCurrentActiveItem();
mItemsInfo.insert(mItemsInfo.begin() + _index, ItemDataInfo(_data));
// расчитываем новый индекс выделения
if (mIndexSelect != ITEM_NONE)
{
if (mIndexSelect >= _index)
{
mIndexSelect++;
}
}
if (update)
{
updateScrollSize();
updateScrollPosition();
findCurrentActiveItem();
_updateAllVisible(true);
}
}
void ItemBox::removeItemAt(size_t _index, bool update)
{
MYGUI_ASSERT_RANGE(_index, mItemsInfo.size(), "ItemBox::removeItemAt");
_resetContainer(false);
resetCurrentActiveItem();
mItemsInfo.erase(mItemsInfo.begin() + _index);
// расчитываем новый индекс выделения
if (mIndexSelect != ITEM_NONE)
{
if (mItemsInfo.empty())
{
mIndexSelect = ITEM_NONE;
}
else if ((mIndexSelect > _index) || (mIndexSelect == mItemsInfo.size()))
{
mIndexSelect--;
}
}
if (update)
{
updateScrollSize();
updateScrollPosition();
findCurrentActiveItem();
_updateAllVisible(true);
}
}
void ItemBox::removeAllItems()
{
if (mItemsInfo.empty())
return;
_resetContainer(false);
mItemsInfo.clear();
mIndexSelect = ITEM_NONE;
mIndexActive = ITEM_NONE;
updateScrollSize();
updateScrollPosition();
_updateAllVisible(true);
}
void ItemBox::redrawItemAt(size_t _index)
{
MYGUI_ASSERT_RANGE(_index, mItemsInfo.size(), "ItemBox::redrawItemAt");
size_t start = (size_t)(mFirstVisibleIndex * mCountItemInLine);
if ((_index >= start) && (_index < (start + mVectorItems.size())))
{
IBDrawItemInfo data(_index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, true, false);
requestDrawItem(this, mVectorItems[_index - start], data);
}
}
void ItemBox::setIndexSelected(size_t _index)
{
MYGUI_ASSERT_RANGE_AND_NONE(_index, mItemsInfo.size(), "ItemBox::setIndexSelected");
if (_index == mIndexSelect)
return;
size_t start = (size_t)(mFirstVisibleIndex * mCountItemInLine);
// сбрасываем старое выделение
if (mIndexSelect != ITEM_NONE)
{
size_t index = mIndexSelect;
mIndexSelect = ITEM_NONE;
if ((index >= start) && (index < (start + mVectorItems.size())))
{
IBDrawItemInfo data(index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, false, false);
requestDrawItem(this, mVectorItems[index - start], data);
}
}
mIndexSelect = _index;
if (mIndexSelect != ITEM_NONE)
{
if ((_index >= start) && (_index < (start + mVectorItems.size())))
{
IBDrawItemInfo data(_index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, false, false);
requestDrawItem(this, mVectorItems[_index - start], data);
}
}
}
void ItemBox::notifyMouseButtonDoubleClick(Widget* _sender)
{
size_t index = getIndexByWidget(_sender);
eventSelectItemAccept(this, index);
}
void ItemBox::setVerticalAlignment(bool _vert)
{
if (mAlignVert == _vert)
return;
mAlignVert = _vert;
mCountItemInLine = -1;
updateFromResize();
}
void ItemBox::notifyKeyButtonPressed(Widget* _sender, KeyCode _key, Char _char)
{
eventNotifyItem(this, IBNotifyItemData(getIndexByWidget(_sender), IBNotifyItemData::KeyPressed, _key, _char));
}
void ItemBox::notifyKeyButtonReleased(Widget* _sender, KeyCode _key)
{
eventNotifyItem(this, IBNotifyItemData(getIndexByWidget(_sender), IBNotifyItemData::KeyReleased, _key));
}
size_t ItemBox::getIndexByWidget(Widget* _widget) const
{
MYGUI_ASSERT(_widget, "ItemBox::getIndexByWidget : Widget == nullptr");
if (_widget == _getClientWidget())
return ITEM_NONE;
MYGUI_ASSERT(_widget->getParent() == _getClientWidget(), "ItemBox::getIndexByWidget : Widget is not child");
size_t index = calcIndexByWidget(_widget);
MYGUI_ASSERT_RANGE(index, mItemsInfo.size(), "ItemBox::getIndexByWidget");
return index;
}
size_t ItemBox::_getContainerIndex(const IntPoint& _point) const
{
for (const auto& item : mVectorItems)
{
if (item->getVisible())
{
if (item->getAbsoluteRect().inside(_point))
{
return getIndexByWidget(item);
}
}
}
return ITEM_NONE;
}
void ItemBox::_resetContainer(bool _update)
{
// обязательно у базового
Base::_resetContainer(_update);
if (!_update)
{
WidgetManager& instance = WidgetManager::getInstance();
for (auto& vectorItem : mVectorItems)
{
instance.unlinkFromUnlinkers(vectorItem);
}
}
}
Widget* ItemBox::getWidgetByIndex(size_t _index)
{
for (const auto& vectorItem : mVectorItems)
{
if (vectorItem->getVisible())
{
size_t index = getIndexByWidget(vectorItem);
if (index == _index)
return vectorItem;
}
}
return nullptr;
}
void ItemBox::onMouseButtonPressed(int _left, int _top, MouseButton _id)
{
Base::onMouseButtonPressed(_left, _top, _id);
}
void ItemBox::onMouseButtonReleased(int _left, int _top, MouseButton _id)
{
Base::onMouseButtonReleased(_left, _top, _id);
}
void ItemBox::onMouseDrag(int _left, int _top, MouseButton _id)
{
Base::onMouseDrag(_left, _top, _id);
}
void ItemBox::removeDropItems()
{
if (mItemDrag)
mItemDrag->setVisible(false);
}
void ItemBox::updateDropItems()
{
if (nullptr == mItemDrag)
{
// спрашиваем размер иконок
IntCoord coord;
requestCoordItem(this, coord, true);
mPointDragOffset = coord.point();
// создаем и запрашиваем детей
mItemDrag = Gui::getInstance().createWidget<Widget>(
"Default",
IntCoord(0, 0, coord.width, coord.height),
Align::Default,
mDragLayer);
requestCreateWidgetItem(this, mItemDrag);
}
const IntPoint& point = InputManager::getInstance().getMousePosition();
mItemDrag->setPosition(
point.left - mClickInWidget.left + mPointDragOffset.left,
point.top - mClickInWidget.top + mPointDragOffset.top);
mItemDrag->setVisible(true);
}
void ItemBox::updateDropItemsState(const DDWidgetState& _state)
{
IBDrawItemInfo data;
data.drop_accept = _state.accept;
data.drop_refuse = _state.refuse;
data.select = false;
data.active = false;
data.index = mDropSenderIndex;
data.update = _state.update;
data.drag = true;
requestDrawItem(this, mItemDrag, data);
}
void ItemBox::notifyMouseDrag(Widget* _sender, int _left, int _top, MouseButton _id)
{
mouseDrag(_id);
}
void ItemBox::notifyMouseButtonPressed(Widget* _sender, int _left, int _top, MouseButton _id)
{
mouseButtonPressed(_id);
if (MouseButton::Left == _id)
{
size_t old = mIndexSelect;
if (_sender == _getClientWidget())
{
// сбрасываем выделение
setIndexSelected(ITEM_NONE);
}
else
{
// индекс отправителя
mDropSenderIndex = getIndexByWidget(_sender);
// выделенный елемент
setIndexSelected(mDropSenderIndex);
}
// смещение внутри виджета, куда кликнули мышкой
mClickInWidget =
InputManager::getInstance().getLastPressedPosition(MouseButton::Left) - _sender->getAbsolutePosition();
// отсылаем событие
eventMouseItemActivate(this, mIndexSelect);
// смену позиции отсылаем только при реальном изменении
if (old != mIndexSelect)
eventChangeItemPosition(this, mIndexSelect);
}
eventNotifyItem(
this,
IBNotifyItemData(getIndexByWidget(_sender), IBNotifyItemData::MousePressed, _left, _top, _id));
}
void ItemBox::notifyMouseButtonReleased(Widget* _sender, int _left, int _top, MouseButton _id)
{
bool needEvent = !mStartDrop;
mouseButtonReleased(_id);
if (needEvent)
eventNotifyItem(
this,
IBNotifyItemData(getIndexByWidget(_sender), IBNotifyItemData::MouseReleased, _left, _top, _id));
}
void ItemBox::notifyRootMouseChangeFocus(Widget* _sender, bool _focus)
{
size_t index = calcIndexByWidget(_sender);
if (_focus)
{
MYGUI_ASSERT_RANGE(index, mItemsInfo.size(), "ItemBox::notifyRootMouseChangeFocus");
// сбрасываем старый
if (mIndexActive != ITEM_NONE)
{
size_t old_index = mIndexActive;
mIndexActive = ITEM_NONE;
IBDrawItemInfo data(old_index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, false, false);
requestDrawItem(this, mVectorItems[old_index - (mFirstVisibleIndex * mCountItemInLine)], data);
}
mIndexActive = index;
IBDrawItemInfo data(index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, false, false);
requestDrawItem(this, mVectorItems[*_sender->_getInternalData<size_t>()], data);
}
else
{
// при сбросе виджет может быть уже скрыт, и соответсвенно отсутсвовать индекс
// сбрасываем индекс, только если мы и есть актив
if (index < mItemsInfo.size() && mIndexActive == index)
{
mIndexActive = ITEM_NONE;
IBDrawItemInfo data(index, mIndexSelect, mIndexActive, mIndexAccept, mIndexRefuse, false, false);
requestDrawItem(this, mVectorItems[*_sender->_getInternalData<size_t>()], data);
}
}
}
void ItemBox::updateMetrics()
{
if (mAlignVert)
{
// колличество айтемов на одной строке
mCountItemInLine = _getClientWidget()->getWidth() / mSizeItem.width;
}
else
{
// колличество айтемов на одной строке
mCountItemInLine = _getClientWidget()->getHeight() / mSizeItem.height;
}
if (1 > mCountItemInLine)
mCountItemInLine = 1;
// колличество строк
mCountLines = int(mItemsInfo.size() / mCountItemInLine);
if (0 != (mItemsInfo.size() % mCountItemInLine))
mCountLines++;
if (mAlignVert)
{
mContentSize.width = (mSizeItem.width * mCountItemInLine);
mContentSize.height = (mSizeItem.height * mCountLines);
}
else
{
mContentSize.width = (mSizeItem.width * mCountLines);
mContentSize.height = (mSizeItem.height * mCountItemInLine);
}
}
void ItemBox::notifyScrollChangePosition(ScrollBar* _sender, size_t _index)
{
if (_sender == mVScroll)
{
mContentPosition.top = (int)_index;
}
else if (_sender == mHScroll)
{
mContentPosition.left = (int)_index;
}
setContentPosition(mContentPosition);
}
void ItemBox::notifyMouseWheel(Widget* _sender, int _rel)
{
if (mAlignVert)
{
if (mContentSize.height <= 0)
return;
int offset = mContentPosition.top;
if (_rel < 0)
offset += mSizeItem.height;
else
offset -= mSizeItem.height;
if (mContentSize.height <= _getClientWidget()->getHeight())
offset = 0;
else if (offset >= mContentSize.height - _getClientWidget()->getHeight())
offset = mContentSize.height - _getClientWidget()->getHeight();
else if (offset < 0)
offset = 0;
if (mContentPosition.top == offset)
return;
// сбрасываем старую подсветку
// так как при прокрутке, мышь может находиться над окном
resetCurrentActiveItem();
mContentPosition.top = offset;
}
else
{
if (mContentSize.width <= 0)
return;
int offset = mContentPosition.left;
if (_rel < 0)
offset += mSizeItem.width;
else
offset -= mSizeItem.width;
if (mContentSize.width <= _getClientWidget()->getWidth())
offset = 0;
else if (offset >= mContentSize.width - _getClientWidget()->getWidth())
offset = mContentSize.width - _getClientWidget()->getWidth();
else if (offset < 0)
offset = 0;
if (mContentPosition.left == offset)
return;
// сбрасываем старую подсветку
// так как при прокрутке, мышь может находиться над окном
resetCurrentActiveItem();
mContentPosition.left = offset;
}
setContentPosition(mContentPosition);
// заново ищем и подсвечиваем айтем
if (!mNeedDrop)
findCurrentActiveItem();
if (nullptr != mVScroll)
mVScroll->setScrollPosition(mContentPosition.top);
if (nullptr != mHScroll)
mHScroll->setScrollPosition(mContentPosition.left);
}
void ItemBox::setContentPosition(const IntPoint& _point)
{
mContentPosition = _point;
int old = mFirstVisibleIndex;
if (mAlignVert)
{
mFirstVisibleIndex = mContentPosition.top / mSizeItem.height;
mFirstOffsetIndex = mContentPosition.top % mSizeItem.height;
}
else
{
mFirstVisibleIndex = mContentPosition.left / mSizeItem.width;
mFirstOffsetIndex = mContentPosition.left % mSizeItem.width;
}
_updateAllVisible(old != mFirstVisibleIndex);
_resetContainer(true);
}
void ItemBox::redrawAllItems()
{
_updateAllVisible(true);
}
void ItemBox::resetDrag()
{
endDrop(true);
}
size_t ItemBox::calcIndexByWidget(Widget* _widget) const
{
return *_widget->_getInternalData<size_t>() + (mFirstVisibleIndex * mCountItemInLine);
}
IntSize ItemBox::getContentSize() const
{
return mContentSize;
}
IntPoint ItemBox::getContentPosition() const
{
return mContentPosition;
}
IntSize ItemBox::getViewSize() const
{
return _getClientWidget()->getSize();
}
void ItemBox::eraseContent()
{
updateMetrics();
}
size_t ItemBox::getHScrollPage() const
{
return mSizeItem.width;
}
size_t ItemBox::getVScrollPage() const
{
return mSizeItem.height;
}
Align ItemBox::getContentAlign() const
{
return Align::Default;
}
size_t ItemBox::getItemCount() const
{
return mItemsInfo.size();
}
void ItemBox::addItem(Any _data, bool update)
{
insertItemAt(ITEM_NONE, _data, update);
}
size_t ItemBox::getIndexSelected() const
{
return mIndexSelect;
}
void ItemBox::clearIndexSelected()
{
setIndexSelected(ITEM_NONE);
}
void ItemBox::clearItemDataAt(size_t _index)
{
setItemDataAt(_index, Any::Null);
}
bool ItemBox::getVerticalAlignment() const
{
return mAlignVert;
}
Widget* ItemBox::getWidgetDrag() const
{
return mItemDrag;
}
void ItemBox::setVisibleVScroll(bool _value)
{
mVisibleVScroll = _value;
updateFromResize();
}
void ItemBox::setVisibleHScroll(bool _value)
{
mVisibleHScroll = _value;
updateFromResize();
}
bool ItemBox::isVisibleVScroll() const
{
return mVisibleVScroll;
}
bool ItemBox::isVisibleHScroll() const
{
return mVisibleHScroll;
}
void ItemBox::setPropertyOverride(std::string_view _key, std::string_view _value)
{
if (_key == "VerticalAlignment")
setVerticalAlignment(utility::parseValue<bool>(_value));
else if (_key == "VisibleVScroll")
setVisibleVScroll(utility::parseValue<bool>(_value));
else if (_key == "VisibleHScroll")
setVisibleHScroll(utility::parseValue<bool>(_value));
else
{
Base::setPropertyOverride(_key, _value);
return;
}
eventChangeProperty(this, _key, _value);
}
void ItemBox::setViewOffset(const IntPoint& _value)
{
if (mAlignVert)
{
if (mContentSize.height <= 0)
return;
int offset = _value.top;
if (mContentSize.height <= _getClientWidget()->getHeight())
offset = 0;
else if (offset >= mContentSize.height - _getClientWidget()->getHeight())
offset = mContentSize.height - _getClientWidget()->getHeight();
else if (offset < 0)
offset = 0;
if (mContentPosition.top == offset)
return;
// сбрасываем старую подсветку
// так как при прокрутке, мышь может находиться над окном
resetCurrentActiveItem();
mContentPosition.top = offset;
}
else
{
if (mContentSize.width <= 0)
return;
int offset = _value.left;
if (mContentSize.width <= _getClientWidget()->getWidth())
offset = 0;
else if (offset >= mContentSize.width - _getClientWidget()->getWidth())
offset = mContentSize.width - _getClientWidget()->getWidth();
else if (offset < 0)
offset = 0;
if (mContentPosition.left == offset)
return;
// сбрасываем старую подсветку
// так как при прокрутке, мышь может находиться над окном
resetCurrentActiveItem();
mContentPosition.left = offset;
}
setContentPosition(mContentPosition);
// заново ищем и подсвечиваем айтем
if (!mNeedDrop)
findCurrentActiveItem();
if (nullptr != mVScroll)
mVScroll->setScrollPosition(mContentPosition.top);
if (nullptr != mHScroll)
mHScroll->setScrollPosition(mContentPosition.left);
}
IntPoint ItemBox::getViewOffset() const
{
return getContentPosition();
}
void ItemBox::onKeyButtonPressed(KeyCode _key, Char _char)
{
Base::onKeyButtonPressed(_key, _char);
eventNotifyItem(this, IBNotifyItemData(ITEM_NONE, IBNotifyItemData::KeyPressed, _key, _char));
}
void ItemBox::onKeyButtonReleased(KeyCode _key)
{
Base::onKeyButtonReleased(_key);
eventNotifyItem(this, IBNotifyItemData(ITEM_NONE, IBNotifyItemData::KeyReleased, _key));
}
} // namespace MyGUI
MyGUI_Button.h
MYGUI_ASSERT
#define MYGUI_ASSERT(exp, dest)
Definition MyGUI_Diagnostic.h:31
MYGUI_DEBUG_ASSERT
#define MYGUI_DEBUG_ASSERT(exp, dest)
Definition MyGUI_Diagnostic.h:62
MYGUI_ASSERT_RANGE_INSERT
#define MYGUI_ASSERT_RANGE_INSERT(index, size, owner)
Definition MyGUI_Diagnostic.h:50
MYGUI_ASSERT_RANGE
#define MYGUI_ASSERT_RANGE(index, size, owner)
Definition MyGUI_Diagnostic.h:44
MYGUI_ASSERT_RANGE_AND_NONE
#define MYGUI_ASSERT_RANGE_AND_NONE(index, size, owner)
Definition MyGUI_Diagnostic.h:46
MyGUI_Gui.h
MyGUI_InputManager.h
MyGUI_ItemBox.h
MyGUI_Precompiled.h
MyGUI_ResourceSkin.h
MyGUI_ScrollBar.h
MyGUI_WidgetManager.h
MyGUI::Any
Definition MyGUI_Any.h:56
MyGUI::Any::Null
static const Any Null
Definition MyGUI_Any.h:58
MyGUI::DDContainer::mDropSenderIndex
size_t mDropSenderIndex
Definition MyGUI_DDContainer.h:131
MyGUI::DDContainer::mouseButtonPressed
void mouseButtonPressed(MouseButton _id)
Definition MyGUI_DDContainer.cpp:39
MyGUI::DDContainer::mStartDrop
bool mStartDrop
Definition MyGUI_DDContainer.h:125
MyGUI::DDContainer::mClickInWidget
IntPoint mClickInWidget
Definition MyGUI_DDContainer.h:137
MyGUI::DDContainer::mouseButtonReleased
void mouseButtonReleased(MouseButton _id)
Definition MyGUI_DDContainer.cpp:59
MyGUI::DDContainer::mNeedDrop
bool mNeedDrop
Definition MyGUI_DDContainer.h:124
MyGUI::DDContainer::mouseDrag
void mouseDrag(MouseButton _id)
Definition MyGUI_DDContainer.cpp:67
MyGUI::DDContainer::endDrop
void endDrop(bool _reset)
Definition MyGUI_DDContainer.cpp:184
MyGUI::Gui::createWidget
T * createWidget(std::string_view _skin, const IntCoord &_coord, Align _align, std::string_view _layer, std::string_view _name={})
Definition MyGUI_Gui.h:98
MyGUI::Gui::getInstance
static Gui & getInstance()
Definition MyGUI_Gui.cpp:34
MyGUI::ICroppedRectangle::getAbsolutePosition
const IntPoint & getAbsolutePosition() const
Definition MyGUI_ICroppedRectangle.h:62
MyGUI::ICroppedRectangle::getWidth
int getWidth() const
Definition MyGUI_ICroppedRectangle.h:113
MyGUI::ICroppedRectangle::getHeight
int getHeight() const
Definition MyGUI_ICroppedRectangle.h:118
MyGUI::ICroppedRectangle::getAbsoluteRect
IntRect getAbsoluteRect() const
Definition MyGUI_ICroppedRectangle.h:67
MyGUI::ICroppedRectangle::getSize
IntSize getSize() const
Definition MyGUI_ICroppedRectangle.h:51
MyGUI::InputManager::getLastPressedPosition
const IntPoint & getLastPressedPosition(MouseButton _id) const
Definition MyGUI_InputManager.cpp:648
MyGUI::InputManager::getMousePosition
const IntPoint & getMousePosition() const
Definition MyGUI_InputManager.cpp:657
MyGUI::InputManager::getInstance
static InputManager & getInstance()
MyGUI::InputManager::getMousePositionByLayer
IntPoint getMousePositionByLayer() const
Definition MyGUI_InputManager.cpp:606
MyGUI::ItemBox::onMouseButtonPressed
void onMouseButtonPressed(int _left, int _top, MouseButton _id) override
Definition MyGUI_ItemBox.cpp:534
MyGUI::ItemBox::onKeyButtonPressed
void onKeyButtonPressed(KeyCode _key, Char _char) override
Definition MyGUI_ItemBox.cpp:1019
MyGUI::ItemBox::clearItemDataAt
void clearItemDataAt(size_t _index)
Clear an item data at a specified position.
Definition MyGUI_ItemBox.cpp:893
MyGUI::ItemBox::notifyMouseDrag
void notifyMouseDrag(Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_ItemBox.cpp:599
MyGUI::ItemBox::setVisibleHScroll
void setVisibleHScroll(bool _value)
Definition MyGUI_ItemBox.cpp:914
MyGUI::ItemBox::getIndexByWidget
size_t getIndexByWidget(Widget *_widget) const
Definition MyGUI_ItemBox.cpp:476
MyGUI::ItemBox::notifyMouseButtonReleased
void notifyMouseButtonReleased(Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_ItemBox.cpp:642
MyGUI::ItemBox::getItemCount
size_t getItemCount() const
Get number of items.
Definition MyGUI_ItemBox.cpp:873
MyGUI::ItemBox::requestDrawItem
EventHandle_ItemBoxPtrWidgetPtrCIBCellDrawInfoRef requestDrawItem
Definition MyGUI_ItemBox.h:164
MyGUI::ItemBox::getViewOffset
IntPoint getViewOffset() const
Definition MyGUI_ItemBox.cpp:1014
MyGUI::ItemBox::notifyMouseWheel
void notifyMouseWheel(Widget *_sender, int _rel)
Definition MyGUI_ItemBox.cpp:733
MyGUI::ItemBox::updateFromResize
void updateFromResize()
Definition MyGUI_ItemBox.cpp:106
MyGUI::ItemBox::shutdownOverride
void shutdownOverride() override
Definition MyGUI_ItemBox.cpp:68
MyGUI::ItemBox::setVisibleVScroll
void setVisibleVScroll(bool _value)
Definition MyGUI_ItemBox.cpp:908
MyGUI::ItemBox::removeItemAt
void removeItemAt(size_t _index, bool update=true)
Remove item at a specified position.
Definition MyGUI_ItemBox.cpp:355
MyGUI::ItemBox::notifyMouseButtonDoubleClick
void notifyMouseButtonDoubleClick(Widget *_sender)
Definition MyGUI_ItemBox.cpp:449
MyGUI::ItemBox::getVerticalAlignment
bool getVerticalAlignment() const
Definition MyGUI_ItemBox.cpp:898
MyGUI::ItemBox::isVisibleHScroll
bool isVisibleHScroll() const
Definition MyGUI_ItemBox.cpp:925
MyGUI::ItemBox::onKeySetFocus
void onKeySetFocus(Widget *_old) override
Definition MyGUI_ItemBox.cpp:214
MyGUI::ItemBox::redrawItemAt
void redrawItemAt(size_t _index)
Redraw at a specified position.
Definition MyGUI_ItemBox.cpp:405
MyGUI::ItemBox::setCoord
void setCoord(const IntCoord &_coord) override
Definition MyGUI_ItemBox.cpp:87
MyGUI::ItemBox::onMouseWheel
void onMouseWheel(int _rel) override
Definition MyGUI_ItemBox.cpp:207
MyGUI::ItemBox::onKeyButtonReleased
void onKeyButtonReleased(KeyCode _key) override
Definition MyGUI_ItemBox.cpp:1026
MyGUI::ItemBox::getWidgetDrag
Widget * getWidgetDrag() const
Definition MyGUI_ItemBox.cpp:903
MyGUI::ItemBox::notifyScrollChangePosition
void notifyScrollChangePosition(ScrollBar *_sender, size_t _index)
Definition MyGUI_ItemBox.cpp:719
MyGUI::ItemBox::setViewOffset
void setViewOffset(const IntPoint &_value)
Definition MyGUI_ItemBox.cpp:953
MyGUI::ItemBox::getItemWidget
Widget * getItemWidget(size_t _index)
Definition MyGUI_ItemBox.cpp:171
MyGUI::ItemBox::ItemBox
ItemBox()
Definition MyGUI_ItemBox.cpp:19
MyGUI::ItemBox::setIndexSelected
void setIndexSelected(size_t _index)
Select specified _index.
Definition MyGUI_ItemBox.cpp:417
MyGUI::ItemBox::setVerticalAlignment
void setVerticalAlignment(bool _vert)
Definition MyGUI_ItemBox.cpp:456
MyGUI::ItemBox::redrawAllItems
void redrawAllItems()
Redraw all items.
Definition MyGUI_ItemBox.cpp:823
MyGUI::ItemBox::initialiseOverride
void initialiseOverride() override
Definition MyGUI_ItemBox.cpp:24
MyGUI::ItemBox::resetCurrentActiveItem
void resetCurrentActiveItem()
Definition MyGUI_ItemBox.cpp:228
MyGUI::ItemBox::onMouseDrag
void onMouseDrag(int _left, int _top, MouseButton _id) override
Definition MyGUI_ItemBox.cpp:544
MyGUI::ItemBox::onKeyLostFocus
void onKeyLostFocus(Widget *_new) override
Definition MyGUI_ItemBox.cpp:221
MyGUI::ItemBox::insertItemAt
void insertItemAt(size_t _index, Any _data=Any::Null, bool update=true)
Insert an item into a array at a specified position.
Definition MyGUI_ItemBox.cpp:324
MyGUI::ItemBox::_getContainerIndex
size_t _getContainerIndex(const IntPoint &_point) const override
Definition MyGUI_ItemBox.cpp:489
MyGUI::ItemBox::getViewSize
IntSize getViewSize() const override
Definition MyGUI_ItemBox.cpp:848
MyGUI::ItemBox::notifyMouseButtonPressed
void notifyMouseButtonPressed(Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_ItemBox.cpp:604
MyGUI::ItemBox::setPropertyOverride
void setPropertyOverride(std::string_view _key, std::string_view _value) override
Definition MyGUI_ItemBox.cpp:930
MyGUI::ItemBox::eventMouseItemActivate
EventHandle_ItemBoxPtrSizeT eventMouseItemActivate
Definition MyGUI_ItemBox.h:185
MyGUI::ItemBox::updateMetrics
void updateMetrics()
Definition MyGUI_ItemBox.cpp:686
MyGUI::ItemBox::requestCreateWidgetItem
EventHandle_ItemBoxPtrWidgetPtr requestCreateWidgetItem
Definition MyGUI_ItemBox.h:148
MyGUI::ItemBox::resetDrag
void resetDrag()
Definition MyGUI_ItemBox.cpp:828
MyGUI::ItemBox::eventSelectItemAccept
EventHandle_ItemBoxPtrSizeT eventSelectItemAccept
Definition MyGUI_ItemBox.h:171
MyGUI::ItemBox::notifyKeyButtonReleased
void notifyKeyButtonReleased(Widget *_sender, KeyCode _key)
Definition MyGUI_ItemBox.cpp:471
MyGUI::ItemBox::setItemDataAt
void setItemDataAt(size_t _index, Any _data)
Replace an item data at a specified position.
Definition MyGUI_ItemBox.cpp:309
MyGUI::ItemBox::getWidgetByIndex
Widget * getWidgetByIndex(size_t _index)
Definition MyGUI_ItemBox.cpp:519
MyGUI::ItemBox::updateDropItems
void updateDropItems() override
Definition MyGUI_ItemBox.cpp:555
MyGUI::ItemBox::_getItemIndex
size_t _getItemIndex(Widget *_item) const override
Definition MyGUI_ItemBox.cpp:282
MyGUI::ItemBox::_updateAllVisible
void _updateAllVisible(bool _redraw)
Definition MyGUI_ItemBox.cpp:117
MyGUI::ItemBox::updateDropItemsState
void updateDropItemsState(const DDWidgetState &_state) override
Definition MyGUI_ItemBox.cpp:583
MyGUI::ItemBox::getIndexSelected
size_t getIndexSelected() const
Get index of selected item (ITEM_NONE if none selected).
Definition MyGUI_ItemBox.cpp:883
MyGUI::ItemBox::_resetContainer
void _resetContainer(bool _update) override
Definition MyGUI_ItemBox.cpp:504
MyGUI::ItemBox::notifyRootMouseChangeFocus
void notifyRootMouseChangeFocus(Widget *_sender, bool _focus)
Definition MyGUI_ItemBox.cpp:653
MyGUI::ItemBox::findCurrentActiveItem
void findCurrentActiveItem()
Definition MyGUI_ItemBox.cpp:247
MyGUI::ItemBox::setSize
void setSize(const IntSize &_size) override
Definition MyGUI_ItemBox.cpp:81
MyGUI::ItemBox::onMouseButtonReleased
void onMouseButtonReleased(int _left, int _top, MouseButton _id) override
Definition MyGUI_ItemBox.cpp:539
MyGUI::ItemBox::removeAllItems
void removeAllItems()
Remove all items.
Definition MyGUI_ItemBox.cpp:388
MyGUI::ItemBox::notifyKeyButtonPressed
void notifyKeyButtonPressed(Widget *_sender, KeyCode _key, Char _char)
Definition MyGUI_ItemBox.cpp:466
MyGUI::ItemBox::removeDropItems
void removeDropItems() override
Definition MyGUI_ItemBox.cpp:549
MyGUI::ItemBox::_setContainerItemInfo
void _setContainerItemInfo(size_t _index, bool _set, bool _accept) override
Definition MyGUI_ItemBox.cpp:292
MyGUI::ItemBox::setPosition
void setPosition(const IntPoint &_point) override
Definition MyGUI_ItemBox.cpp:76
MyGUI::ItemBox::isVisibleVScroll
bool isVisibleVScroll() const
Definition MyGUI_ItemBox.cpp:920
MyGUI::ItemBox::clearIndexSelected
void clearIndexSelected()
Clear item selection.
Definition MyGUI_ItemBox.cpp:888
MyGUI::ItemBox::addItem
void addItem(Any _data=Any::Null, bool update=true)
Add an item to the end of a array.
Definition MyGUI_ItemBox.cpp:878
MyGUI::ItemBox::requestCoordItem
EventHandle_ItemBoxPtrIntCoordRefBool requestCoordItem
Definition MyGUI_ItemBox.h:156
MyGUI::ItemBox::eventNotifyItem
EventHandle_ItemBoxPtrCIBNotifyCellDataRef eventNotifyItem
Definition MyGUI_ItemBox.h:192
MyGUI::ItemBox::eventChangeItemPosition
EventHandle_ItemBoxPtrSizeT eventChangeItemPosition
Definition MyGUI_ItemBox.h:178
MyGUI::ScrollBar
widget description should be here.
Definition MyGUI_ScrollBar.h:24
MyGUI::ScrollViewBase::mHScroll
ScrollBar * mHScroll
Definition MyGUI_ScrollViewBase.h:44
MyGUI::ScrollViewBase::getHScrollPage
virtual size_t getHScrollPage() const
Definition MyGUI_ScrollViewBase.cpp:334
MyGUI::ScrollViewBase::updateScrollPosition
void updateScrollPosition()
Definition MyGUI_ScrollViewBase.cpp:234
MyGUI::ScrollViewBase::mScrollViewClient
Widget * mScrollViewClient
Definition MyGUI_ScrollViewBase.h:45
MyGUI::ScrollViewBase::mVisibleVScroll
bool mVisibleVScroll
Definition MyGUI_ScrollViewBase.h:48
MyGUI::ScrollViewBase::getContentPosition
virtual IntPoint getContentPosition() const
Definition MyGUI_ScrollViewBase.cpp:320
MyGUI::ScrollViewBase::mChangeContentByResize
bool mChangeContentByResize
Definition MyGUI_ScrollViewBase.h:54
MyGUI::ScrollViewBase::mVisibleHScroll
bool mVisibleHScroll
Definition MyGUI_ScrollViewBase.h:47
MyGUI::ScrollViewBase::getContentAlign
virtual Align getContentAlign() const
Definition MyGUI_ScrollViewBase.cpp:344
MyGUI::ScrollViewBase::getContentSize
virtual IntSize getContentSize() const
Definition MyGUI_ScrollViewBase.cpp:315
MyGUI::ScrollViewBase::updateScrollSize
void updateScrollSize()
Definition MyGUI_ScrollViewBase.cpp:14
MyGUI::ScrollViewBase::mVScroll
ScrollBar * mVScroll
Definition MyGUI_ScrollViewBase.h:43
MyGUI::ScrollViewBase::eraseContent
virtual void eraseContent()
Definition MyGUI_ScrollViewBase.cpp:349
MyGUI::ScrollViewBase::getVScrollPage
virtual size_t getVScrollPage() const
Definition MyGUI_ScrollViewBase.cpp:339
MyGUI::UserData::isUserString
bool isUserString(std::string_view _key) const
Definition MyGUI_WidgetUserData.cpp:44
MyGUI::UserData::getUserString
std::string_view getUserString(std::string_view _key) const
Definition MyGUI_WidgetUserData.cpp:20
MyGUI::UserData::_setInternalData
void _setInternalData(Any _data)
Definition MyGUI_WidgetUserData.cpp:59
MyGUI::UserData::_getInternalData
ValueType * _getInternalData(bool _throw=true) const
Definition MyGUI_WidgetUserData.h:54
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:40
MyGUI::Widget::getParent
Widget * getParent() const
Definition MyGUI_Widget.cpp:1352
MyGUI::Widget::setSize
void setSize(const IntSize &_size) override
Definition MyGUI_Widget.cpp:693
MyGUI::Widget::eventChangeProperty
EventHandle_WidgetStringString eventChangeProperty
Definition MyGUI_Widget.h:324
MyGUI::Widget::setVisible
virtual void setVisible(bool _value)
Definition MyGUI_Widget.cpp:1022
MyGUI::Widget::setPosition
void setPosition(const IntPoint &_point) override
Definition MyGUI_Widget.cpp:676
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::createWidget
T * createWidget(std::string_view _skin, const IntCoord &_coord, Align _align, std::string_view _name={})
Definition MyGUI_Widget.h:94
MyGUI::Widget::_setContainer
void _setContainer(Widget *_value)
Definition MyGUI_Widget.cpp:1387
MyGUI::Widget::_getClientWidget
Widget * _getClientWidget()
If there is client widget return it, otherwise return this.
Definition MyGUI_Widget.cpp:1196
MyGUI::WidgetInput::eventMouseButtonDoubleClick
EventHandle_WidgetVoid eventMouseButtonDoubleClick
Definition MyGUI_WidgetInput.h:174
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::eventMouseButtonPressed
EventHandle_WidgetIntIntButton eventMouseButtonPressed
Definition MyGUI_WidgetInput.h:153
MyGUI::WidgetInput::eventKeyButtonPressed
EventHandle_WidgetKeyCodeChar eventKeyButtonPressed
Definition MyGUI_WidgetInput.h:196
MyGUI::WidgetInput::eventRootMouseChangeFocus
EventHandle_WidgetBool eventRootMouseChangeFocus
Definition MyGUI_WidgetInput.h:211
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::WidgetInput::eventKeyButtonReleased
EventHandle_WidgetKeyCode eventKeyButtonReleased
Definition MyGUI_WidgetInput.h:203
MyGUI::WidgetManager
Definition MyGUI_WidgetManager.h:21
MyGUI::WidgetManager::getInstance
static WidgetManager & getInstance()
MyGUI::WidgetManager::unlinkFromUnlinkers
void unlinkFromUnlinkers(Widget *_widget)
Definition MyGUI_WidgetManager.cpp:152
MyGUI::utility::parseValue
T parseValue(std::string_view _value)
Definition MyGUI_StringUtility.h:60
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::IntRect
types::TRect< int > IntRect
Definition MyGUI_Types.h:33
MyGUI::IntPoint
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
MyGUI::Char
unsigned int Char
Definition MyGUI_Types.h:50
MyGUI::ITEM_NONE
constexpr size_t ITEM_NONE
Definition MyGUI_Macros.h:19
MyGUI::IntCoord
types::TCoord< int > IntCoord
Definition MyGUI_Types.h:36
MyGUI::IntSize
types::TSize< int > IntSize
Definition MyGUI_Types.h:30
MyGUI::newDelegate
delegates::DelegateFunction< Args... > * newDelegate(void(*_func)(Args... args))
Definition MyGUI_Delegate.h:100
MyGUI::Align
Definition MyGUI_Align.h:20
MyGUI::Align::Default
@ Default
Definition MyGUI_Align.h:36
MyGUI::DDWidgetState
Definition MyGUI_DDItemInfo.h:100
MyGUI::DDWidgetState::update
bool update
Definition MyGUI_DDItemInfo.h:109
MyGUI::DDWidgetState::accept
bool accept
Definition MyGUI_DDItemInfo.h:111
MyGUI::DDWidgetState::refuse
bool refuse
Definition MyGUI_DDItemInfo.h:113
MyGUI::IBDrawItemInfo
Definition MyGUI_IBItemInfo.h:21
MyGUI::IBDrawItemInfo::index
size_t index
Definition MyGUI_IBItemInfo.h:52
MyGUI::IBDrawItemInfo::drop_refuse
bool drop_refuse
Definition MyGUI_IBItemInfo.h:64
MyGUI::IBDrawItemInfo::select
bool select
Definition MyGUI_IBItemInfo.h:56
MyGUI::IBDrawItemInfo::update
bool update
Definition MyGUI_IBItemInfo.h:54
MyGUI::IBDrawItemInfo::drag
bool drag
Definition MyGUI_IBItemInfo.h:60
MyGUI::IBDrawItemInfo::drop_accept
bool drop_accept
Definition MyGUI_IBItemInfo.h:62
MyGUI::IBDrawItemInfo::active
bool active
Definition MyGUI_IBItemInfo.h:58
MyGUI::IBNotifyItemData
Definition MyGUI_IBItemInfo.h:68
MyGUI::IBNotifyItemData::KeyReleased
@ KeyReleased
Definition MyGUI_IBItemInfo.h:74
MyGUI::IBNotifyItemData::KeyPressed
@ KeyPressed
Definition MyGUI_IBItemInfo.h:73
MyGUI::IBNotifyItemData::MousePressed
@ MousePressed
Definition MyGUI_IBItemInfo.h:71
MyGUI::IBNotifyItemData::MouseReleased
@ MouseReleased
Definition MyGUI_IBItemInfo.h:72
MyGUI::ItemBox::ItemDataInfo
Definition MyGUI_ItemBox.h:202
MyGUI::KeyCode
Definition MyGUI_KeyCode.h:16
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::width
T width
Definition MyGUI_TCoord.h:22
MyGUI::types::TCoord::point
TPoint< T > point() const
Definition MyGUI_TCoord.h:160
MyGUI::types::TPoint::left
T left
Definition MyGUI_TPoint.h:19
MyGUI::types::TPoint::top
T top
Definition MyGUI_TPoint.h:20
MyGUI::types::TRect::right
T right
Definition MyGUI_TRect.h:21
MyGUI::types::TRect::left
T left
Definition MyGUI_TRect.h:19
MyGUI::types::TRect::bottom
T bottom
Definition MyGUI_TRect.h:22
MyGUI::types::TRect::top
T top
Definition MyGUI_TRect.h:20
MyGUI::types::TSize::width
T width
Definition MyGUI_TSize.h:19
MyGUI::types::TSize::height
T height
Definition MyGUI_TSize.h:20