MyGUI_ScrollBar.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_ScrollBar.h"
#include "MyGUI_InputManager.h"
#include "MyGUI_Button.h"
#include "MyGUI_ResourceSkin.h"
#include "MyGUI_ControllerRepeatClick.h"
#include "MyGUI_ControllerManager.h"
namespace MyGUI
{
void ScrollBar::initialiseOverride()
{
Base::initialiseOverride();
// при нуле, будет игнорировать кнопки
mScrollPage = 1;
mScrollViewPage = 1;
mScrollWheelPage = 1;
mMinTrackSize = 0;
mSkinRangeStart = 0;
mSkinRangeEnd = 0;
mRepeatTriggerTime = 0.5f;
mRepeatStepTime = 0.1f;
assignWidget(mWidgetStart, "Start");
if (mWidgetStart != nullptr)
{
mWidgetStart->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
mWidgetStart->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
mWidgetStart->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
}
assignWidget(mWidgetEnd, "End");
if (mWidgetEnd != nullptr)
{
mWidgetEnd->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
mWidgetEnd->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
mWidgetEnd->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
}
assignWidget(mWidgetTrack, "Track");
if (mWidgetTrack)
{
mWidgetTrack->eventMouseDrag += newDelegate(this, &ScrollBar::notifyMouseDrag);
mWidgetTrack->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
mWidgetTrack->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
mWidgetTrack->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
mWidgetTrack->setVisible(false);
}
assignWidget(mWidgetFirstPart, "FirstPart");
if (mWidgetFirstPart != nullptr)
{
mWidgetFirstPart->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
mWidgetFirstPart->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
mWidgetFirstPart->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
}
assignWidget(mWidgetSecondPart, "SecondPart");
if (mWidgetSecondPart != nullptr)
{
mWidgetSecondPart->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
mWidgetSecondPart->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
mWidgetSecondPart->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
}
if (isUserString("MinTrackSize"))
mMinTrackSize = utility::parseValue<int>(getUserString("MinTrackSize"));
if (isUserString("TrackRangeMargins"))
utility::parseComplex<size_t>(getUserString("TrackRangeMargins"), mSkinRangeStart, mSkinRangeEnd);
if (mWidgetTrack != nullptr)
{
if (mWidgetTrack->isUserString("MinTrackSize"))
mMinTrackSize = utility::parseValue<int>(mWidgetTrack->getUserString("MinTrackSize"));
}
}
void ScrollBar::shutdownOverride()
{
mWidgetStart = nullptr;
mWidgetEnd = nullptr;
mWidgetTrack = nullptr;
mWidgetFirstPart = nullptr;
mWidgetSecondPart = nullptr;
Base::shutdownOverride();
}
void ScrollBar::updateTrack()
{
if (mWidgetTrack == nullptr)
return;
_forcePick(mWidgetTrack);
// размер диапазана в пикселях
int pos = getLineSize();
if (mVerticalAlignment)
{
// скрываем если диапазан маленький или места мало
if ((mScrollRange < 2) || (pos <= mWidgetTrack->getHeight()))
{
mWidgetTrack->setVisible(false);
if (nullptr != mWidgetFirstPart)
mWidgetFirstPart->setSize(mWidgetFirstPart->getWidth(), pos / 2);
if (nullptr != mWidgetSecondPart)
mWidgetSecondPart->setCoord(
mWidgetSecondPart->getLeft(),
pos / 2 + (int)mSkinRangeStart,
mWidgetSecondPart->getWidth(),
pos - pos / 2);
return;
}
// если скрыт то покажем
if (!mWidgetTrack->getVisible())
mWidgetTrack->setVisible(true);
// и обновляем позицию
pos = (int)(((size_t)(pos - getTrackSize()) * mScrollPosition) / (mScrollRange - 1) + mSkinRangeStart);
mWidgetTrack->setPosition(mWidgetTrack->getLeft(), pos);
if (nullptr != mWidgetFirstPart)
{
int height = pos - mWidgetFirstPart->getTop();
mWidgetFirstPart->setSize(mWidgetFirstPart->getWidth(), height);
}
if (nullptr != mWidgetSecondPart)
{
int top = pos + mWidgetTrack->getHeight();
int height = getTrackPlaceLength() - top;
mWidgetSecondPart->setCoord(mWidgetSecondPart->getLeft(), top, mWidgetSecondPart->getWidth(), height);
}
}
else
{
// скрываем если диапазан маленький или места мало
if ((mScrollRange < 2) || (pos <= mWidgetTrack->getWidth()))
{
mWidgetTrack->setVisible(false);
if (nullptr != mWidgetFirstPart)
mWidgetFirstPart->setSize(pos / 2, mWidgetFirstPart->getHeight());
if (nullptr != mWidgetSecondPart)
mWidgetSecondPart->setCoord(
pos / 2 + (int)mSkinRangeStart,
mWidgetSecondPart->getTop(),
pos - pos / 2,
mWidgetSecondPart->getHeight());
return;
}
// если скрыт то покажем
if (!mWidgetTrack->getVisible())
mWidgetTrack->setVisible(true);
// и обновляем позицию
pos = (int)(((size_t)(pos - getTrackSize()) * mScrollPosition) / (mScrollRange - 1) + mSkinRangeStart);
mWidgetTrack->setPosition(pos, mWidgetTrack->getTop());
if (nullptr != mWidgetFirstPart)
{
int height = pos - mWidgetFirstPart->getLeft();
mWidgetFirstPart->setSize(height, mWidgetFirstPart->getHeight());
}
if (nullptr != mWidgetSecondPart)
{
int left = pos + mWidgetTrack->getWidth();
int width = getTrackPlaceLength() - left;
mWidgetSecondPart->setCoord(left, mWidgetSecondPart->getTop(), width, mWidgetSecondPart->getHeight());
}
}
}
void ScrollBar::TrackMove(int _left, int _top)
{
if (mWidgetTrack == nullptr)
return;
const IntPoint& point = InputManager::getInstance().getLastPressedPosition(MouseButton::Left);
if (mVerticalAlignment)
{
// расчитываем позицию виджета
int start = mPreActionOffset.top + (_top - point.top);
if (start < (int)mSkinRangeStart)
start = (int)mSkinRangeStart;
else if (start > (getTrackPlaceLength() - (int)mSkinRangeEnd - mWidgetTrack->getHeight()))
start = (getTrackPlaceLength() - (int)mSkinRangeEnd - mWidgetTrack->getHeight());
if (mWidgetTrack->getTop() != start)
mWidgetTrack->setPosition(mWidgetTrack->getLeft(), start);
int pos = 0;
if (mScrollRange >= 2)
{
// расчитываем положение соответствующее позиции
// плюс пол позиции
pos = start - (int)mSkinRangeStart + (getLineSize() - getTrackSize()) / (((int)mScrollRange - 1) * 2);
// высчитываем ближайшее значение и обновляем
pos = pos * (int)(mScrollRange - 1) / (getLineSize() - getTrackSize());
}
// проверяем на выходы и изменения
if (pos < 0)
pos = 0;
else if (pos >= (int)mScrollRange)
pos = (int)mScrollRange - 1;
if (pos == (int)mScrollPosition)
return;
mScrollPosition = pos;
}
else
{
// расчитываем позицию виджета
int start = mPreActionOffset.left + (_left - point.left);
if (start < (int)mSkinRangeStart)
start = (int)mSkinRangeStart;
else if (start > (getTrackPlaceLength() - (int)mSkinRangeEnd - mWidgetTrack->getWidth()))
start = (getTrackPlaceLength() - (int)mSkinRangeEnd - mWidgetTrack->getWidth());
if (mWidgetTrack->getLeft() != start)
mWidgetTrack->setPosition(IntPoint(start, mWidgetTrack->getTop()));
int pos = 0;
if (mScrollRange >= 2)
{
// расчитываем положение соответствующее позиции
// плюс пол позиции
pos = start - (int)mSkinRangeStart + (getLineSize() - getTrackSize()) / (((int)mScrollRange - 1) * 2);
// высчитываем ближайшее значение и обновляем
pos = pos * (int)(mScrollRange - 1) / (getLineSize() - getTrackSize());
}
// проверяем на выходы и изменения
if (pos < 0)
pos = 0;
else if (pos >= (int)mScrollRange)
pos = (int)mScrollRange - 1;
if (pos == (int)mScrollPosition)
return;
mScrollPosition = pos;
}
updateTrack();
// отсылаем событие
eventScrollChangePosition(this, (int)mScrollPosition);
}
void ScrollBar::notifyMousePressed(Widget* _sender, int _left, int _top, MouseButton _id)
{
// диспечерезируем нажатие своих детей как свое
eventMouseButtonPressed(this, _left, _top, _id);
if (MouseButton::Left != _id)
return;
if (mEnableRepeat && _sender != mWidgetTrack &&
((_sender != mWidgetFirstPart && _sender != mWidgetSecondPart) || !mMoveToClick))
{
ControllerItem* item =
ControllerManager::getInstance().createItem(ControllerRepeatClick::getClassTypeName());
ControllerRepeatClick* controller = item->castType<ControllerRepeatClick>();
controller->eventRepeatClick += newDelegate(this, &ScrollBar::repeatClick);
controller->setRepeat(mRepeatTriggerTime, mRepeatStepTime);
ControllerManager::getInstance().addItem(_sender, controller);
}
if (mMoveToClick && _sender != mWidgetTrack && _sender != mWidgetStart && _sender != mWidgetEnd)
{
if (mWidgetTrack != nullptr)
{
mPreActionOffset = InputManager::getInstance().getLastPressedPosition(MouseButton::Left);
const IntPoint& point = InputManager::getInstance().getMousePositionByLayer() -
mWidgetTrack->getParent()->getAbsolutePosition();
mPreActionOffset.left -= getTrackSize() / 2;
mPreActionOffset.top -= getTrackSize() / 2;
TrackMove(point.left, point.top);
}
}
else if (_sender == mWidgetStart)
{
widgetStartPressed();
}
else if (_sender == mWidgetEnd)
{
widgetEndPressed();
}
else if (_sender == mWidgetFirstPart)
{
widgetFirstPartPressed();
}
else if (_sender == mWidgetSecondPart)
{
widgetSecondPartPressed();
}
else if (_sender == mWidgetTrack)
{
mPreActionOffset.left = _sender->getLeft();
mPreActionOffset.top = _sender->getTop();
}
}
void ScrollBar::notifyMouseReleased(Widget* _sender, int _left, int _top, MouseButton _id)
{
updateTrack();
MyGUI::ControllerManager::getInstance().removeItem(_sender);
}
void ScrollBar::notifyMouseDrag(Widget* _sender, int _left, int _top, MouseButton _id)
{
if (mScrollRange < 2)
return;
if (_id == MouseButton::Left)
TrackMove(_left, _top);
}
void ScrollBar::setScrollRange(size_t _range)
{
if (_range == mScrollRange)
return;
mScrollRange = _range;
mScrollPosition = (mScrollPosition < mScrollRange) ? mScrollPosition : 0;
updateTrack();
}
void ScrollBar::setScrollPosition(size_t _position)
{
if (_position == mScrollPosition)
return;
if (_position >= mScrollRange)
_position = 0;
mScrollPosition = _position;
updateTrack();
}
void ScrollBar::setPosition(const IntPoint& _point)
{
Base::setPosition(_point);
}
void ScrollBar::setSize(const IntSize& _size)
{
Base::setSize(_size);
// обновляем трек
updateTrack();
}
void ScrollBar::setCoord(const IntCoord& _coord)
{
Base::setCoord(_coord);
// обновляем трек
updateTrack();
}
void ScrollBar::setTrackSize(int _size)
{
if (mWidgetTrack != nullptr)
{
if (mVerticalAlignment)
mWidgetTrack->setSize(
mWidgetTrack->getWidth(),
((int)_size < (int)mMinTrackSize) ? (int)mMinTrackSize : (int)_size);
else
mWidgetTrack->setSize(
((int)_size < (int)mMinTrackSize) ? (int)mMinTrackSize : (int)_size,
mWidgetTrack->getHeight());
}
updateTrack();
}
void ScrollBar::setRepeatTriggerTime(float time)
{
mRepeatTriggerTime = time;
}
void ScrollBar::setRepeatStepTime(float time)
{
mRepeatStepTime = time;
}
float ScrollBar::getRepeatTriggerTime(float time) const
{
return mRepeatTriggerTime;
}
float ScrollBar::getRepeatStepTime(float time) const
{
return mRepeatStepTime;
}
void ScrollBar::setRepeatEnabled(bool enabled)
{
mEnableRepeat = enabled;
}
bool ScrollBar::getRepeatEnabled() const
{
return mEnableRepeat;
}
int ScrollBar::getTrackSize() const
{
if (mWidgetTrack != nullptr)
{
if (mVerticalAlignment)
return mWidgetTrack->getHeight();
return mWidgetTrack->getWidth();
}
return 1;
}
int ScrollBar::getLineSize() const
{
return getTrackPlaceLength() - (int)(mSkinRangeStart + mSkinRangeEnd);
}
void ScrollBar::onMouseWheel(int _rel)
{
notifyMouseWheel(nullptr, _rel);
Base::onMouseWheel(_rel);
}
void ScrollBar::notifyMouseWheel(Widget* _sender, int _rel)
{
if (mScrollRange < 2)
return;
int offset = mScrollPosition;
if (_rel < 0)
offset += mScrollWheelPage;
else
offset -= mScrollWheelPage;
if (offset < 0)
offset = 0;
else if (offset > (int)(mScrollRange - 1))
offset = mScrollRange - 1;
if ((size_t)offset != mScrollPosition)
{
mScrollPosition = offset;
// оповещаем
eventScrollChangePosition(this, (int)mScrollPosition);
updateTrack();
}
}
void ScrollBar::repeatClick(Widget* _widget, ControllerItem* _controller)
{
if (_widget == mWidgetStart)
widgetStartPressed();
else if (_widget == mWidgetEnd)
widgetEndPressed();
else if (_widget == mWidgetFirstPart)
widgetFirstPartPressed();
else if (_widget == mWidgetSecondPart)
widgetSecondPartPressed();
}
void ScrollBar::widgetStartPressed()
{
// минимальное значение
if (mScrollPosition == 0)
return;
// расчитываем следующее положение
if (mScrollPosition > mScrollPage)
mScrollPosition -= mScrollPage;
else
mScrollPosition = 0;
// оповещаем
eventScrollChangePosition(this, (int)mScrollPosition);
updateTrack();
}
void ScrollBar::widgetEndPressed()
{
// максимальное значение
if ((mScrollRange < 2) || (mScrollPosition >= (mScrollRange - 1)))
return;
// расчитываем следующее положение
if ((mScrollPosition + mScrollPage) < (mScrollRange - 1))
mScrollPosition += mScrollPage;
else
mScrollPosition = mScrollRange - 1;
// оповещаем
eventScrollChangePosition(this, (int)mScrollPosition);
updateTrack();
}
void ScrollBar::widgetFirstPartPressed()
{
// минимальное значение
if (mScrollPosition == 0)
return;
// расчитываем следующее положение
if (mScrollPosition > mScrollViewPage)
mScrollPosition -= mScrollViewPage;
else
mScrollPosition = 0;
// оповещаем
eventScrollChangePosition(this, (int)mScrollPosition);
updateTrack();
}
void ScrollBar::widgetSecondPartPressed()
{
// максимальное значение
if ((mScrollRange < 2) || (mScrollPosition >= (mScrollRange - 1)))
return;
// расчитываем следующее положение
if ((mScrollPosition + mScrollViewPage) < (mScrollRange - 1))
mScrollPosition += mScrollViewPage;
else
mScrollPosition = mScrollRange - 1;
// оповещаем
eventScrollChangePosition(this, (int)mScrollPosition);
updateTrack();
}
void ScrollBar::setPropertyOverride(std::string_view _key, std::string_view _value)
{
if (_key == "Range")
setScrollRange(utility::parseValue<size_t>(_value));
else if (_key == "RangePosition")
setScrollPosition(utility::parseValue<size_t>(_value));
else if (_key == "Page")
setScrollPage(utility::parseValue<size_t>(_value));
else if (_key == "ViewPage")
setScrollViewPage(utility::parseValue<size_t>(_value));
else if (_key == "WheelPage")
setScrollWheelPage(utility::parseValue<size_t>(_value));
else if (_key == "MoveToClick")
setMoveToClick(utility::parseValue<bool>(_value));
else if (_key == "VerticalAlignment")
setVerticalAlignment(utility::parseValue<bool>(_value));
else if (_key == "Repeat")
setRepeatEnabled(utility::parseValue<bool>(_value));
else if (_key == "RepeatTriggerTime")
setRepeatTriggerTime(utility::parseValue<float>(_value));
else if (_key == "RepeatStepTime")
setRepeatStepTime(utility::parseValue<float>(_value));
else
{
Base::setPropertyOverride(_key, _value);
return;
}
eventChangeProperty(this, _key, _value);
}
size_t ScrollBar::getScrollRange() const
{
return mScrollRange;
}
size_t ScrollBar::getScrollPosition() const
{
return mScrollPosition;
}
void ScrollBar::setScrollPage(size_t _value)
{
mScrollPage = _value;
}
size_t ScrollBar::getScrollPage() const
{
return mScrollPage;
}
void ScrollBar::setScrollViewPage(size_t _value)
{
mScrollViewPage = _value;
}
size_t ScrollBar::getScrollViewPage() const
{
return mScrollViewPage;
}
void ScrollBar::setScrollWheelPage(size_t _value)
{
mScrollWheelPage = _value;
}
size_t ScrollBar::getScrollWheelPage() const
{
return mScrollWheelPage;
}
void ScrollBar::setMinTrackSize(int _value)
{
mMinTrackSize = _value;
}
int ScrollBar::getMinTrackSize() const
{
return mMinTrackSize;
}
void ScrollBar::setMoveToClick(bool _value)
{
mMoveToClick = _value;
}
bool ScrollBar::getMoveToClick() const
{
return mMoveToClick;
}
int ScrollBar::getTrackPlaceLength() const
{
if (mWidgetTrack != nullptr)
{
if (mVerticalAlignment)
return mWidgetTrack->getParent()->getHeight();
return mWidgetTrack->getParent()->getWidth();
}
return 0;
}
void ScrollBar::setVerticalAlignment(bool _value)
{
mVerticalAlignment = _value;
updateTrack();
}
bool ScrollBar::getVerticalAlignment() const
{
return mVerticalAlignment;
}
} // namespace MyGUI
MyGUI_Button.h
MyGUI_ControllerManager.h
MyGUI_ControllerRepeatClick.h
MyGUI_InputManager.h
MyGUI_Precompiled.h
MyGUI_ResourceSkin.h
MyGUI_ScrollBar.h
MyGUI::ControllerItem
Definition MyGUI_ControllerItem.h:26
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::ControllerRepeatClick
Definition MyGUI_ControllerRepeatClick.h:22
MyGUI::ControllerRepeatClick::eventRepeatClick
EventHandle_RepeatClick eventRepeatClick
Definition MyGUI_ControllerRepeatClick.h:41
MyGUI::ControllerRepeatClick::getClassTypeName
static std::string_view getClassTypeName()
Definition MyGUI_ControllerRepeatClick.h:23
MyGUI::ControllerRepeatClick::setRepeat
void setRepeat(float init, float step)
Definition MyGUI_ControllerRepeatClick.cpp:30
MyGUI::ICroppedRectangle::getTop
int getTop() const
Definition MyGUI_ICroppedRectangle.h:103
MyGUI::ICroppedRectangle::getWidth
int getWidth() const
Definition MyGUI_ICroppedRectangle.h:113
MyGUI::ICroppedRectangle::getHeight
int getHeight() const
Definition MyGUI_ICroppedRectangle.h:118
MyGUI::ICroppedRectangle::getLeft
int getLeft() const
Definition MyGUI_ICroppedRectangle.h:93
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::InputManager::getMousePositionByLayer
IntPoint getMousePositionByLayer() const
Definition MyGUI_InputManager.cpp:606
MyGUI::ScrollBar::mScrollViewPage
size_t mScrollViewPage
Definition MyGUI_ScrollBar.h:169
MyGUI::ScrollBar::getMinTrackSize
int getMinTrackSize() const
Definition MyGUI_ScrollBar.cpp:643
MyGUI::ScrollBar::setVerticalAlignment
void setVerticalAlignment(bool _value)
Definition MyGUI_ScrollBar.cpp:669
MyGUI::ScrollBar::setRepeatEnabled
void setRepeatEnabled(bool enabled)
Definition MyGUI_ScrollBar.cpp:410
MyGUI::ScrollBar::eventScrollChangePosition
EventHandle_ScrollBarPtrSizeT eventScrollChangePosition
Definition MyGUI_ScrollBar.h:123
MyGUI::ScrollBar::setMoveToClick
void setMoveToClick(bool _value)
Definition MyGUI_ScrollBar.cpp:648
MyGUI::ScrollBar::shutdownOverride
void shutdownOverride() override
Definition MyGUI_ScrollBar.cpp:93
MyGUI::ScrollBar::mMinTrackSize
int mMinTrackSize
Definition MyGUI_ScrollBar.h:176
MyGUI::ScrollBar::getLineSize
int getLineSize() const
Definition MyGUI_ScrollBar.cpp:431
MyGUI::ScrollBar::setScrollWheelPage
void setScrollWheelPage(size_t _value)
Definition MyGUI_ScrollBar.cpp:629
MyGUI::ScrollBar::initialiseOverride
void initialiseOverride() override
Definition MyGUI_ScrollBar.cpp:18
MyGUI::ScrollBar::setMinTrackSize
void setMinTrackSize(int _value)
Definition MyGUI_ScrollBar.cpp:638
MyGUI::ScrollBar::getScrollPage
size_t getScrollPage() const
Definition MyGUI_ScrollBar.cpp:614
MyGUI::ScrollBar::mScrollWheelPage
size_t mScrollWheelPage
Definition MyGUI_ScrollBar.h:170
MyGUI::ScrollBar::setTrackSize
void setTrackSize(int _size)
Definition MyGUI_ScrollBar.cpp:374
MyGUI::ScrollBar::notifyMousePressed
void notifyMousePressed(Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_ScrollBar.cpp:263
MyGUI::ScrollBar::setRepeatTriggerTime
void setRepeatTriggerTime(float time)
Definition MyGUI_ScrollBar.cpp:390
MyGUI::ScrollBar::setRepeatStepTime
void setRepeatStepTime(float time)
Definition MyGUI_ScrollBar.cpp:395
MyGUI::ScrollBar::mWidgetFirstPart
Widget * mWidgetFirstPart
Definition MyGUI_ScrollBar.h:156
MyGUI::ScrollBar::getVerticalAlignment
bool getVerticalAlignment() const
Definition MyGUI_ScrollBar.cpp:676
MyGUI::ScrollBar::getRepeatEnabled
bool getRepeatEnabled() const
Definition MyGUI_ScrollBar.cpp:415
MyGUI::ScrollBar::getScrollPosition
size_t getScrollPosition() const
Definition MyGUI_ScrollBar.cpp:604
MyGUI::ScrollBar::mSkinRangeEnd
size_t mSkinRangeEnd
Definition MyGUI_ScrollBar.h:164
MyGUI::ScrollBar::TrackMove
void TrackMove(int _left, int _top)
Definition MyGUI_ScrollBar.cpp:187
MyGUI::ScrollBar::notifyMouseReleased
void notifyMouseReleased(Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_ScrollBar.cpp:319
MyGUI::ScrollBar::mWidgetSecondPart
Widget * mWidgetSecondPart
Definition MyGUI_ScrollBar.h:157
MyGUI::ScrollBar::mScrollRange
size_t mScrollRange
Definition MyGUI_ScrollBar.h:166
MyGUI::ScrollBar::getScrollViewPage
size_t getScrollViewPage() const
Definition MyGUI_ScrollBar.cpp:624
MyGUI::ScrollBar::setScrollPosition
void setScrollPosition(size_t _position)
Definition MyGUI_ScrollBar.cpp:343
MyGUI::ScrollBar::mScrollPage
size_t mScrollPage
Definition MyGUI_ScrollBar.h:168
MyGUI::ScrollBar::getScrollRange
size_t getScrollRange() const
Definition MyGUI_ScrollBar.cpp:599
MyGUI::ScrollBar::getTrackPlaceLength
int getTrackPlaceLength() const
Definition MyGUI_ScrollBar.cpp:658
MyGUI::ScrollBar::setScrollViewPage
void setScrollViewPage(size_t _value)
Definition MyGUI_ScrollBar.cpp:619
MyGUI::ScrollBar::getMoveToClick
bool getMoveToClick() const
Definition MyGUI_ScrollBar.cpp:653
MyGUI::ScrollBar::setCoord
void setCoord(const IntCoord &_coord) override
Definition MyGUI_ScrollBar.cpp:367
MyGUI::ScrollBar::mVerticalAlignment
bool mVerticalAlignment
Definition MyGUI_ScrollBar.h:179
MyGUI::ScrollBar::mEnableRepeat
bool mEnableRepeat
Definition MyGUI_ScrollBar.h:172
MyGUI::ScrollBar::notifyMouseDrag
void notifyMouseDrag(Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_ScrollBar.cpp:325
MyGUI::ScrollBar::setSize
void setSize(const IntSize &_size) override
Definition MyGUI_ScrollBar.cpp:360
MyGUI::ScrollBar::getTrackSize
int getTrackSize() const
Definition MyGUI_ScrollBar.cpp:420
MyGUI::ScrollBar::setPosition
void setPosition(const IntPoint &_point) override
Definition MyGUI_ScrollBar.cpp:355
MyGUI::ScrollBar::mWidgetStart
Button * mWidgetStart
Definition MyGUI_ScrollBar.h:152
MyGUI::ScrollBar::mMoveToClick
bool mMoveToClick
Definition MyGUI_ScrollBar.h:177
MyGUI::ScrollBar::onMouseWheel
void onMouseWheel(int _rel) override
Definition MyGUI_ScrollBar.cpp:436
MyGUI::ScrollBar::setScrollRange
void setScrollRange(size_t _range)
Definition MyGUI_ScrollBar.cpp:333
MyGUI::ScrollBar::getRepeatTriggerTime
float getRepeatTriggerTime(float time) const
Definition MyGUI_ScrollBar.cpp:400
MyGUI::ScrollBar::setScrollPage
void setScrollPage(size_t _value)
Definition MyGUI_ScrollBar.cpp:609
MyGUI::ScrollBar::mPreActionOffset
IntPoint mPreActionOffset
Definition MyGUI_ScrollBar.h:160
MyGUI::ScrollBar::getScrollWheelPage
size_t getScrollWheelPage() const
Definition MyGUI_ScrollBar.cpp:633
MyGUI::ScrollBar::mRepeatTriggerTime
float mRepeatTriggerTime
Definition MyGUI_ScrollBar.h:173
MyGUI::ScrollBar::notifyMouseWheel
void notifyMouseWheel(Widget *_sender, int _rel)
Definition MyGUI_ScrollBar.cpp:443
MyGUI::ScrollBar::mWidgetTrack
Button * mWidgetTrack
Definition MyGUI_ScrollBar.h:154
MyGUI::ScrollBar::getRepeatStepTime
float getRepeatStepTime(float time) const
Definition MyGUI_ScrollBar.cpp:405
MyGUI::ScrollBar::mWidgetEnd
Button * mWidgetEnd
Definition MyGUI_ScrollBar.h:153
MyGUI::ScrollBar::updateTrack
void updateTrack()
Definition MyGUI_ScrollBar.cpp:104
MyGUI::ScrollBar::mScrollPosition
size_t mScrollPosition
Definition MyGUI_ScrollBar.h:167
MyGUI::ScrollBar::mRepeatStepTime
float mRepeatStepTime
Definition MyGUI_ScrollBar.h:174
MyGUI::ScrollBar::setPropertyOverride
void setPropertyOverride(std::string_view _key, std::string_view _value) override
Definition MyGUI_ScrollBar.cpp:548
MyGUI::ScrollBar::mSkinRangeStart
size_t mSkinRangeStart
Definition MyGUI_ScrollBar.h:163
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::Widget
widget description should be here.
Definition MyGUI_Widget.h:40
MyGUI::Widget::eventChangeProperty
EventHandle_WidgetStringString eventChangeProperty
Definition MyGUI_Widget.h:324
MyGUI::Widget::assignWidget
void assignWidget(T *&_widget, std::string_view _name)
Definition MyGUI_Widget.h:413
MyGUI::Widget::_forcePick
void _forcePick(Widget *_widget)
Definition MyGUI_Widget.cpp:547
MyGUI::WidgetInput::eventMouseButtonPressed
EventHandle_WidgetIntIntButton eventMouseButtonPressed
Definition MyGUI_WidgetInput.h:153
MyGUI::utility::parseValue
T parseValue(std::string_view _value)
Definition MyGUI_StringUtility.h:60
MyGUI::utility::parseComplex
bool parseComplex(std::string_view _value, Args &... args)
Definition MyGUI_StringUtility.h:161
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::IntPoint
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
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::MouseButton
Definition MyGUI_MouseButton.h:16
MyGUI::MouseButton::Left
@ Left
Definition MyGUI_MouseButton.h:21
MyGUI::types::TPoint::left
T left
Definition MyGUI_TPoint.h:19
MyGUI::types::TPoint::top
T top
Definition MyGUI_TPoint.h:20