MyGUI: MyGUI_ScrollBar.cpp Source File

MyGUI 3.4.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

- File List
- Globals

MyGUI_ScrollBar.cpp
Go to the documentation of this file.
1/*
2 * This source file is part of MyGUI. For the latest info, see http://mygui.info/
3 * Distributed under the MIT License
4 * (See accompanying file COPYING.MIT or copy at http://opensource.org/licenses/MIT)
5 */
6
7#include "MyGUI_Precompiled.h"
8#include "MyGUI_ScrollBar.h"
9#include "MyGUI_InputManager.h"
10#include "MyGUI_Button.h"
11#include "MyGUI_ResourceSkin.h"
12#include "MyGUI_ControllerRepeatClick.h"
13#include "MyGUI_ControllerManager.h"
14
15namespace MyGUI
16{
17
18 ScrollBar::ScrollBar() :
19 mWidgetStart(nullptr),
20 mWidgetEnd(nullptr),
21 mWidgetTrack(nullptr),
22 mWidgetFirstPart(nullptr),
23 mWidgetSecondPart(nullptr),
24 mSkinRangeStart(0),
25 mSkinRangeEnd(0),
26 mScrollRange(0),
27 mScrollPosition(0),
28 mScrollPage(0),
29 mScrollViewPage(0),
30 mScrollWheelPage(0),
31 mEnableRepeat(true),
32 mRepeatTriggerTime(0.f),
33 mRepeatStepTime(0.f),
34 mMinTrackSize(0),
35 mMoveToClick(false),
36 mVerticalAlignment(true)
37 {
38 }
39
40 void ScrollBar::initialiseOverride()
41 {
42 Base::initialiseOverride();
43
44 // при нуле, будет игнорировать кнопки
45 mScrollPage = 1;
46 mScrollViewPage = 1;
47 mScrollWheelPage = 1;
48 mMinTrackSize = 0;
49 mSkinRangeStart = 0;
50 mSkinRangeEnd = 0;
51
52 mRepeatTriggerTime = 0.5f;
53 mRepeatStepTime = 0.1f;
54
56 assignWidget(mWidgetStart, "Start");
57 if (mWidgetStart != nullptr)
58 {
59 mWidgetStart->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
60 mWidgetStart->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
61 mWidgetStart->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
62 }
63
65 assignWidget(mWidgetEnd, "End");
66 if (mWidgetEnd != nullptr)
67 {
68 mWidgetEnd->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
69 mWidgetEnd->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
70 mWidgetEnd->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
71 }
72
74 assignWidget(mWidgetTrack, "Track");
75 if (mWidgetTrack)
76 {
77 mWidgetTrack->eventMouseDrag += newDelegate(this, &ScrollBar::notifyMouseDrag);
78 mWidgetTrack->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
79 mWidgetTrack->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
80 mWidgetTrack->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
81 mWidgetTrack->setVisible(false);
82 }
83
85 assignWidget(mWidgetFirstPart, "FirstPart");
86 if (mWidgetFirstPart != nullptr)
87 {
88 mWidgetFirstPart->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
89 mWidgetFirstPart->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
90 mWidgetFirstPart->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
91 }
92
94 assignWidget(mWidgetSecondPart, "SecondPart");
95 if (mWidgetSecondPart != nullptr)
96 {
97 mWidgetSecondPart->eventMouseButtonPressed += newDelegate(this, &ScrollBar::notifyMousePressed);
98 mWidgetSecondPart->eventMouseButtonReleased += newDelegate(this, &ScrollBar::notifyMouseReleased);
99 mWidgetSecondPart->eventMouseWheel += newDelegate(this, &ScrollBar::notifyMouseWheel);
100 }
101
102 if (isUserString("MinTrackSize"))
103 mMinTrackSize = utility::parseValue<int>(getUserString("MinTrackSize"));
104
105 if (isUserString("TrackRangeMargins"))
106 utility::parseComplex<size_t>(getUserString("TrackRangeMargins"), mSkinRangeStart, mSkinRangeEnd);
107
108 if (mWidgetTrack != nullptr)
109 {
110 if (mWidgetTrack->isUserString("MinTrackSize"))
111 mMinTrackSize = utility::parseValue<int>(mWidgetTrack->getUserString("MinTrackSize"));
112 }
113 }
114
115 void ScrollBar::shutdownOverride()
116 {
117 mWidgetStart = nullptr;
118 mWidgetEnd = nullptr;
119 mWidgetTrack = nullptr;
120 mWidgetFirstPart = nullptr;
121 mWidgetSecondPart = nullptr;
122
123 Base::shutdownOverride();
124 }
125
126 void ScrollBar::updateTrack()
127 {
128 if (mWidgetTrack == nullptr)
129 return;
130
131 _forcePick(mWidgetTrack);
132 // размер диапазана в пикселях
133 int pos = getLineSize();
134
135 if (mVerticalAlignment)
136 {
137 // скрываем если диапазан маленький или места мало
138 if ((mScrollRange < 2) || (pos <= mWidgetTrack->getHeight()))
139 {
140 mWidgetTrack->setVisible(false);
141 if (nullptr != mWidgetFirstPart)
142 mWidgetFirstPart->setSize(mWidgetFirstPart->getWidth(), pos / 2);
143 if (nullptr != mWidgetSecondPart)
144 mWidgetSecondPart->setCoord(mWidgetSecondPart->getLeft(), pos / 2 + (int)mSkinRangeStart, mWidgetSecondPart->getWidth(), pos - pos / 2);
145 return;
146 }
147 // если скрыт то покажем
148 if (!mWidgetTrack->getVisible())
149 mWidgetTrack->setVisible(true);
150
151 // и обновляем позицию
152 pos = (int)(((size_t)(pos - getTrackSize()) * mScrollPosition) / (mScrollRange - 1) + mSkinRangeStart);
153
154 mWidgetTrack->setPosition(mWidgetTrack->getLeft(), pos);
155 if (nullptr != mWidgetFirstPart)
156 {
157 int height = pos - mWidgetFirstPart->getTop();
158 mWidgetFirstPart->setSize(mWidgetFirstPart->getWidth(), height);
159 }
160 if (nullptr != mWidgetSecondPart)
161 {
162 int top = pos + mWidgetTrack->getHeight();
163 int height = getTrackPlaceLength() - top;
164 mWidgetSecondPart->setCoord(mWidgetSecondPart->getLeft(), top, mWidgetSecondPart->getWidth(), height);
165 }
166 }
167 else
168 {
169 // скрываем если диапазан маленький или места мало
170 if ((mScrollRange < 2) || (pos <= mWidgetTrack->getWidth()))
171 {
172 mWidgetTrack->setVisible(false);
173 if (nullptr != mWidgetFirstPart)
174 mWidgetFirstPart->setSize(pos / 2, mWidgetFirstPart->getHeight());
175 if (nullptr != mWidgetSecondPart)
176 mWidgetSecondPart->setCoord(pos / 2 + (int)mSkinRangeStart, mWidgetSecondPart->getTop(), pos - pos / 2, mWidgetSecondPart->getHeight());
177 return;
178 }
179 // если скрыт то покажем
180 if (!mWidgetTrack->getVisible())
181 mWidgetTrack->setVisible(true);
182
183 // и обновляем позицию
184 pos = (int)(((size_t)(pos - getTrackSize()) * mScrollPosition) / (mScrollRange - 1) + mSkinRangeStart);
185
186 mWidgetTrack->setPosition(pos, mWidgetTrack->getTop());
187 if (nullptr != mWidgetFirstPart)
188 {
189 int height = pos - mWidgetFirstPart->getLeft();
190 mWidgetFirstPart->setSize(height, mWidgetFirstPart->getHeight());
191 }
192 if (nullptr != mWidgetSecondPart)
193 {
194 int left = pos + mWidgetTrack->getWidth();
195 int width = getTrackPlaceLength() - left;
196 mWidgetSecondPart->setCoord(left, mWidgetSecondPart->getTop(), width, mWidgetSecondPart->getHeight());
197 }
198 }
199 }
200
201 void ScrollBar::TrackMove(int _left, int _top)
202 {
203 if (mWidgetTrack == nullptr)
204 return;
205
206 const IntPoint& point = InputManager::getInstance().getLastPressedPosition(MouseButton::Left);
207
208 if (mVerticalAlignment)
209 {
210 // расчитываем позицию виджета
211 int start = mPreActionOffset.top + (_top - point.top);
212 if (start < (int)mSkinRangeStart)
213 start = (int)mSkinRangeStart;
214 else if (start > (getTrackPlaceLength() - (int)mSkinRangeEnd - mWidgetTrack->getHeight()))
215 start = (getTrackPlaceLength() - (int)mSkinRangeEnd - mWidgetTrack->getHeight());
216 if (mWidgetTrack->getTop() != start)
217 mWidgetTrack->setPosition(mWidgetTrack->getLeft(), start);
218
219 // расчитываем положение соответствующее позиции
220 // плюс пол позиции
221 int pos = start - (int)mSkinRangeStart + (getLineSize() - getTrackSize()) / (((int)mScrollRange - 1) * 2);
222 // высчитываем ближайшее значение и обновляем
223 pos = pos * (int)(mScrollRange - 1) / (getLineSize() - getTrackSize());
224
225 // проверяем на выходы и изменения
226 if (pos < 0)
227 pos = 0;
228 else if (pos >= (int)mScrollRange)
229 pos = (int)mScrollRange - 1;
230 if (pos == (int)mScrollPosition)
231 return;
232
233 mScrollPosition = pos;
234 }
235 else
236 {
237 // расчитываем позицию виджета
238 int start = mPreActionOffset.left + (_left - point.left);
239 if (start < (int)mSkinRangeStart)
240 start = (int)mSkinRangeStart;
241 else if (start > (getTrackPlaceLength() - (int)mSkinRangeEnd - mWidgetTrack->getWidth()))
242 start = (getTrackPlaceLength() - (int)mSkinRangeEnd - mWidgetTrack->getWidth());
243 if (mWidgetTrack->getLeft() != start)
244 mWidgetTrack->setPosition(IntPoint(start, mWidgetTrack->getTop()));
245
246 // расчитываем положение соответствующее позиции
247 // плюс пол позиции
248 int pos = start - (int)mSkinRangeStart + (getLineSize() - getTrackSize()) / (((int)mScrollRange - 1) * 2);
249 // высчитываем ближайшее значение и обновляем
250 pos = pos * (int)(mScrollRange - 1) / (getLineSize() - getTrackSize());
251
252 // проверяем на выходы и изменения
253 if (pos < 0)
254 pos = 0;
255 else if (pos >= (int)mScrollRange)
256 pos = (int)mScrollRange - 1;
257 if (pos == (int)mScrollPosition)
258 return;
259
260 mScrollPosition = pos;
261 }
262
263 updateTrack();
264
265 // отсылаем событие
266 eventScrollChangePosition(this, (int)mScrollPosition);
267 }
268
269 void ScrollBar::notifyMousePressed(Widget* _sender, int _left, int _top, MouseButton _id)
270 {
271 // диспечерезируем нажатие своих детей как свое
272 eventMouseButtonPressed(this, _left, _top, _id);
273
274 if (MouseButton::Left != _id)
275 return;
276
277 if (mEnableRepeat && _sender != mWidgetTrack
278 && ((_sender != mWidgetFirstPart && _sender != mWidgetSecondPart) || !mMoveToClick))
279 {
280 ControllerItem* item = ControllerManager::getInstance().createItem(ControllerRepeatClick::getClassTypeName());
281 ControllerRepeatClick* controller = item->castType<ControllerRepeatClick>();
282 controller->eventRepeatClick += newDelegate(this, &ScrollBar::repeatClick);
283 controller->setRepeat(mRepeatTriggerTime, mRepeatStepTime);
284 ControllerManager::getInstance().addItem(_sender, controller);
285 }
286
287 if (mMoveToClick &&
288 _sender != mWidgetTrack &&
289 _sender != mWidgetStart &&
290 _sender != mWidgetEnd)
291 {
292 if (mWidgetTrack != nullptr)
293 {
294 mPreActionOffset = InputManager::getInstance().getLastPressedPosition(MouseButton::Left);
295 const IntPoint& point = InputManager::getInstance().getMousePositionByLayer() - mWidgetTrack->getParent()->getAbsolutePosition();
296
297 mPreActionOffset.left -= getTrackSize() / 2;
298 mPreActionOffset.top -= getTrackSize() / 2;
299
300 TrackMove(point.left, point.top);
301 }
302 }
303 else if (_sender == mWidgetStart)
304 {
305 widgetStartPressed();
306 }
307 else if (_sender == mWidgetEnd)
308 {
309 widgetEndPressed();
310 }
311 else if (_sender == mWidgetFirstPart)
312 {
313 widgetFirstPartPressed();
314 }
315 else if (_sender == mWidgetSecondPart)
316 {
317 widgetSecondPartPressed();
318 }
319 else if (_sender == mWidgetTrack)
320 {
321 mPreActionOffset.left = _sender->getLeft();
322 mPreActionOffset.top = _sender->getTop();
323 }
324 }
325
326 void ScrollBar::notifyMouseReleased(Widget* _sender, int _left, int _top, MouseButton _id)
327 {
328 updateTrack();
329 MyGUI::ControllerManager::getInstance().removeItem(_sender);
330 }
331
332 void ScrollBar::notifyMouseDrag(Widget* _sender, int _left, int _top, MouseButton _id)
333 {
334 if (mScrollRange < 2)
335 return;
336 if (_id == MouseButton::Left)
337 TrackMove(_left, _top);
338 }
339
340 void ScrollBar::setScrollRange(size_t _range)
341 {
342 if (_range == mScrollRange)
343 return;
344
345 mScrollRange = _range;
346 mScrollPosition = (mScrollPosition < mScrollRange) ? mScrollPosition : 0;
347 updateTrack();
348 }
349
350 void ScrollBar::setScrollPosition(size_t _position)
351 {
352 if (_position == mScrollPosition)
353 return;
354
355 if (_position >= mScrollRange)
356 _position = 0;
357
358 mScrollPosition = _position;
359 updateTrack();
360 }
361
362 void ScrollBar::setPosition(const IntPoint& _point)
363 {
364 Base::setPosition(_point);
365 }
366
367 void ScrollBar::setSize(const IntSize& _size)
368 {
369 Base::setSize(_size);
370 // обновляем трек
371 updateTrack();
372 }
373
374 void ScrollBar::setCoord(const IntCoord& _coord)
375 {
376 Base::setCoord(_coord);
377 // обновляем трек
378 updateTrack();
379 }
380
381 void ScrollBar::setTrackSize(int _size)
382 {
383 if (mWidgetTrack != nullptr)
384 {
385 if (mVerticalAlignment)
386 mWidgetTrack->setSize(mWidgetTrack->getWidth(), ((int)_size < (int)mMinTrackSize) ? (int)mMinTrackSize : (int)_size);
387 else
388 mWidgetTrack->setSize(((int)_size < (int)mMinTrackSize) ? (int)mMinTrackSize : (int)_size, mWidgetTrack->getHeight());
389 }
390 updateTrack();
391 }
392
393 void ScrollBar::setRepeatTriggerTime(float time)
394 {
395 mRepeatTriggerTime = time;
396 }
397
398 void ScrollBar::setRepeatStepTime(float time)
399 {
400 mRepeatStepTime = time;
401 }
402
403 float ScrollBar::getRepeatTriggerTime(float time) const
404 {
405 return mRepeatTriggerTime;
406 }
407
408 float ScrollBar::getRepeatStepTime(float time) const
409 {
410 return mRepeatStepTime;
411 }
412
413 void ScrollBar::setRepeatEnabled(bool enabled)
414 {
415 mEnableRepeat = enabled;
416 }
417
418 bool ScrollBar::getRepeatEnabled() const
419 {
420 return mEnableRepeat;
421 }
422
423 int ScrollBar::getTrackSize() const
424 {
425 if (mWidgetTrack != nullptr)
426 {
427 if (mVerticalAlignment)
428 return mWidgetTrack->getHeight();
429 else
430 return mWidgetTrack->getWidth();
431 }
432 return 1;
433 }
434
435 int ScrollBar::getLineSize() const
436 {
437 return getTrackPlaceLength() - (int)(mSkinRangeStart + mSkinRangeEnd);
438 }
439
440 void ScrollBar::onMouseWheel(int _rel)
441 {
442 notifyMouseWheel(nullptr, _rel);
443
444 Base::onMouseWheel(_rel);
445 }
446
447 void ScrollBar::notifyMouseWheel(Widget* _sender, int _rel)
448 {
449 if (mScrollRange < 2)
450 return;
451
452 int offset = mScrollPosition;
453 if (_rel < 0)
454 offset += mScrollWheelPage;
455 else
456 offset -= mScrollWheelPage;
457
458 if (offset < 0)
459 offset = 0;
460 else if (offset > (int)(mScrollRange - 1))
461 offset = mScrollRange - 1;
462
463 if ((size_t)offset != mScrollPosition)
464 {
465 mScrollPosition = offset;
466 // оповещаем
467 eventScrollChangePosition(this, (int)mScrollPosition);
468 updateTrack();
469 }
470 }
471
472 void ScrollBar::repeatClick(Widget *_widget, ControllerItem *_controller)
473 {
474 if (_widget == mWidgetStart)
475 widgetStartPressed();
476 else if (_widget == mWidgetEnd)
477 widgetEndPressed();
478 else if (_widget == mWidgetFirstPart)
479 widgetFirstPartPressed();
480 else if (_widget == mWidgetSecondPart)
481 widgetSecondPartPressed();
482 }
483
484 void ScrollBar::widgetStartPressed()
485 {
486 // минимальное значение
487 if (mScrollPosition == 0)
488 return;
489
490 // расчитываем следующее положение
491 if (mScrollPosition > mScrollPage)
492 mScrollPosition -= mScrollPage;
493 else
494 mScrollPosition = 0;
495
496 // оповещаем
497 eventScrollChangePosition(this, (int)mScrollPosition);
498 updateTrack();
499 }
500
501 void ScrollBar::widgetEndPressed()
502 {
503 // максимальное значение
504 if ((mScrollRange < 2) || (mScrollPosition >= (mScrollRange - 1)))
505 return;
506
507 // расчитываем следующее положение
508 if ((mScrollPosition + mScrollPage) < (mScrollRange - 1))
509 mScrollPosition += mScrollPage;
510 else
511 mScrollPosition = mScrollRange - 1;
512
513 // оповещаем
514 eventScrollChangePosition(this, (int)mScrollPosition);
515 updateTrack();
516 }
517
518 void ScrollBar::widgetFirstPartPressed()
519 {
520 // минимальное значение
521 if (mScrollPosition == 0)
522 return;
523
524 // расчитываем следующее положение
525 if (mScrollPosition > mScrollViewPage)
526 mScrollPosition -= mScrollViewPage;
527 else
528 mScrollPosition = 0;
529
530 // оповещаем
531 eventScrollChangePosition(this, (int)mScrollPosition);
532 updateTrack();
533 }
534
535 void ScrollBar::widgetSecondPartPressed()
536 {
537 // максимальное значение
538 if ((mScrollRange < 2) || (mScrollPosition >= (mScrollRange - 1)))
539 return;
540
541 // расчитываем следующее положение
542 if ((mScrollPosition + mScrollViewPage) < (mScrollRange - 1))
543 mScrollPosition += mScrollViewPage;
544 else
545 mScrollPosition = mScrollRange - 1;
546
547 // оповещаем
548 eventScrollChangePosition(this, (int)mScrollPosition);
549 updateTrack();
550 }
551
552 void ScrollBar::setPropertyOverride(const std::string& _key, const std::string& _value)
553 {
555 if (_key == "Range")
556 setScrollRange(utility::parseValue<size_t>(_value));
557
559 else if (_key == "RangePosition")
560 setScrollPosition(utility::parseValue<size_t>(_value));
561
563 else if (_key == "Page")
564 setScrollPage(utility::parseValue<size_t>(_value));
565
567 else if (_key == "ViewPage")
568 setScrollViewPage(utility::parseValue<size_t>(_value));
569
571 else if (_key == "WheelPage")
572 setScrollWheelPage(utility::parseValue<size_t>(_value));
573
575 else if (_key == "MoveToClick")
576 setMoveToClick(utility::parseValue<bool>(_value));
577
579 else if (_key == "VerticalAlignment")
580 setVerticalAlignment(utility::parseValue<bool>(_value));
581
583 else if (_key == "Repeat")
584 setRepeatEnabled(utility::parseValue<bool>(_value));
585
587 else if (_key == "RepeatTriggerTime")
588 setRepeatTriggerTime(utility::parseValue<float>(_value));
589
591 else if (_key == "RepeatStepTime")
592 setRepeatStepTime(utility::parseValue<float>(_value));
593
594 else
595 {
596 Base::setPropertyOverride(_key, _value);
597 return;
598 }
599
600 eventChangeProperty(this, _key, _value);
601 }
602
603 size_t ScrollBar::getScrollRange() const
604 {
605 return mScrollRange;
606 }
607
608 size_t ScrollBar::getScrollPosition() const
609 {
610 return mScrollPosition;
611 }
612
613 void ScrollBar::setScrollPage(size_t _value)
614 {
615 mScrollPage = _value;
616 }
617
618 size_t ScrollBar::getScrollPage() const
619 {
620 return mScrollPage;
621 }
622
623 void ScrollBar::setScrollViewPage(size_t _value)
624 {
625 mScrollViewPage = _value;
626 }
627
628 size_t ScrollBar::getScrollViewPage() const
629 {
630 return mScrollViewPage;
631 }
632
633 void ScrollBar::setScrollWheelPage(size_t _value)
634 {
635 mScrollWheelPage = _value;
636 }
637 size_t ScrollBar::getScrollWheelPage() const
638 {
639 return mScrollWheelPage;
640 }
641
642 void ScrollBar::setMinTrackSize(int _value)
643 {
644 mMinTrackSize = _value;
645 }
646
647 int ScrollBar::getMinTrackSize() const
648 {
649 return mMinTrackSize;
650 }
651
652 void ScrollBar::setMoveToClick(bool _value)
653 {
654 mMoveToClick = _value;
655 }
656
657 bool ScrollBar::getMoveToClick() const
658 {
659 return mMoveToClick;
660 }
661
662 int ScrollBar::getTrackPlaceLength() const
663 {
664 if (mWidgetTrack != nullptr)
665 {
666 if (mVerticalAlignment)
667 return mWidgetTrack->getParent()->getHeight();
668 else
669 return mWidgetTrack->getParent()->getWidth();
670 }
671 return 0;
672 }
673
674 void ScrollBar::setVerticalAlignment(bool _value)
675 {
676 mVerticalAlignment = _value;
677
678 updateTrack();
679 }
680
681 bool ScrollBar::getVerticalAlignment() const
682 {
683 return mVerticalAlignment;
684 }
685
686} // 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:27
MyGUI::ControllerManager::createItem
ControllerItem * createItem(const std::string &_type)
Definition MyGUI_ControllerManager.cpp:72
MyGUI::ControllerManager::getInstance
static ControllerManager & getInstance()
MyGUI::ControllerManager::removeItem
void removeItem(Widget *_widget)
Definition MyGUI_ControllerManager.cpp:105
MyGUI::ControllerManager::addItem
void addItem(Widget *_widget, ControllerItem *_item)
Definition MyGUI_ControllerManager.cpp:78
MyGUI::ControllerRepeatClick
Definition MyGUI_ControllerRepeatClick.h:23
MyGUI::ControllerRepeatClick::eventRepeatClick
EventHandle_RepeatClick eventRepeatClick
Definition MyGUI_ControllerRepeatClick.h:44
MyGUI::ControllerRepeatClick::getClassTypeName
static const std::string & getClassTypeName()
Definition MyGUI_ControllerRepeatClick.h:24
MyGUI::ControllerRepeatClick::setRepeat
void setRepeat(float init, float step)
Definition MyGUI_ControllerRepeatClick.cpp:36
MyGUI::ICroppedRectangle::getTop
int getTop() const
Definition MyGUI_ICroppedRectangle.h:104
MyGUI::ICroppedRectangle::getAbsolutePosition
const IntPoint & getAbsolutePosition() const
Definition MyGUI_ICroppedRectangle.h:67
MyGUI::ICroppedRectangle::getWidth
int getWidth() const
Definition MyGUI_ICroppedRectangle.h:114
MyGUI::ICroppedRectangle::getHeight
int getHeight() const
Definition MyGUI_ICroppedRectangle.h:119
MyGUI::ICroppedRectangle::getLeft
int getLeft() const
Definition MyGUI_ICroppedRectangle.h:94
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:657
MyGUI::InputManager::getInstance
static InputManager & getInstance()
MyGUI::InputManager::getMousePositionByLayer
IntPoint getMousePositionByLayer() const
Definition MyGUI_InputManager.cpp:615
MyGUI::ScrollBar::mScrollViewPage
size_t mScrollViewPage
Definition MyGUI_ScrollBar.h:173
MyGUI::ScrollBar::getMinTrackSize
int getMinTrackSize() const
Definition MyGUI_ScrollBar.cpp:647
MyGUI::ScrollBar::setVerticalAlignment
void setVerticalAlignment(bool _value)
Definition MyGUI_ScrollBar.cpp:674
MyGUI::ScrollBar::setRepeatEnabled
void setRepeatEnabled(bool enabled)
Definition MyGUI_ScrollBar.cpp:413
MyGUI::ScrollBar::eventScrollChangePosition
EventHandle_ScrollBarPtrSizeT eventScrollChangePosition
Definition MyGUI_ScrollBar.h:127
MyGUI::ScrollBar::setMoveToClick
void setMoveToClick(bool _value)
Definition MyGUI_ScrollBar.cpp:652
MyGUI::ScrollBar::shutdownOverride
void shutdownOverride() override
Definition MyGUI_ScrollBar.cpp:115
MyGUI::ScrollBar::mMinTrackSize
int mMinTrackSize
Definition MyGUI_ScrollBar.h:180
MyGUI::ScrollBar::setScrollRange
void setScrollRange(size_t _value)
Definition MyGUI_ScrollBar.cpp:340
MyGUI::ScrollBar::ScrollBar
ScrollBar()
Definition MyGUI_ScrollBar.cpp:18
MyGUI::ScrollBar::getLineSize
int getLineSize() const
Definition MyGUI_ScrollBar.cpp:435
MyGUI::ScrollBar::setScrollWheelPage
void setScrollWheelPage(size_t _value)
Definition MyGUI_ScrollBar.cpp:633
MyGUI::ScrollBar::initialiseOverride
void initialiseOverride() override
Definition MyGUI_ScrollBar.cpp:40
MyGUI::ScrollBar::setTrackSize
void setTrackSize(int _value)
Definition MyGUI_ScrollBar.cpp:381
MyGUI::ScrollBar::setMinTrackSize
void setMinTrackSize(int _value)
Definition MyGUI_ScrollBar.cpp:642
MyGUI::ScrollBar::getScrollPage
size_t getScrollPage() const
Definition MyGUI_ScrollBar.cpp:618
MyGUI::ScrollBar::mScrollWheelPage
size_t mScrollWheelPage
Definition MyGUI_ScrollBar.h:174
MyGUI::ScrollBar::setPropertyOverride
void setPropertyOverride(const std::string &_key, const std::string &_value) override
Definition MyGUI_ScrollBar.cpp:552
MyGUI::ScrollBar::notifyMousePressed
void notifyMousePressed(Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_ScrollBar.cpp:269
MyGUI::ScrollBar::setRepeatTriggerTime
void setRepeatTriggerTime(float time)
Definition MyGUI_ScrollBar.cpp:393
MyGUI::ScrollBar::setRepeatStepTime
void setRepeatStepTime(float time)
Definition MyGUI_ScrollBar.cpp:398
MyGUI::ScrollBar::mWidgetFirstPart
Widget * mWidgetFirstPart
Definition MyGUI_ScrollBar.h:160
MyGUI::ScrollBar::setSize
void setSize(const IntSize &_value) override
Definition MyGUI_ScrollBar.cpp:367
MyGUI::ScrollBar::getVerticalAlignment
bool getVerticalAlignment() const
Definition MyGUI_ScrollBar.cpp:681
MyGUI::ScrollBar::getRepeatEnabled
bool getRepeatEnabled() const
Definition MyGUI_ScrollBar.cpp:418
MyGUI::ScrollBar::getScrollPosition
size_t getScrollPosition() const
Definition MyGUI_ScrollBar.cpp:608
MyGUI::ScrollBar::mSkinRangeEnd
size_t mSkinRangeEnd
Definition MyGUI_ScrollBar.h:168
MyGUI::ScrollBar::TrackMove
void TrackMove(int _left, int _top)
Definition MyGUI_ScrollBar.cpp:201
MyGUI::ScrollBar::notifyMouseReleased
void notifyMouseReleased(Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_ScrollBar.cpp:326
MyGUI::ScrollBar::mWidgetSecondPart
Widget * mWidgetSecondPart
Definition MyGUI_ScrollBar.h:161
MyGUI::ScrollBar::mScrollRange
size_t mScrollRange
Definition MyGUI_ScrollBar.h:170
MyGUI::ScrollBar::getScrollViewPage
size_t getScrollViewPage() const
Definition MyGUI_ScrollBar.cpp:628
MyGUI::ScrollBar::setPosition
void setPosition(const IntPoint &_value) override
Definition MyGUI_ScrollBar.cpp:362
MyGUI::ScrollBar::setCoord
void setCoord(const IntCoord &_value) override
Definition MyGUI_ScrollBar.cpp:374
MyGUI::ScrollBar::mScrollPage
size_t mScrollPage
Definition MyGUI_ScrollBar.h:172
MyGUI::ScrollBar::setScrollPosition
void setScrollPosition(size_t _value)
Definition MyGUI_ScrollBar.cpp:350
MyGUI::ScrollBar::getScrollRange
size_t getScrollRange() const
Definition MyGUI_ScrollBar.cpp:603
MyGUI::ScrollBar::getTrackPlaceLength
int getTrackPlaceLength() const
Definition MyGUI_ScrollBar.cpp:662
MyGUI::ScrollBar::setScrollViewPage
void setScrollViewPage(size_t _value)
Definition MyGUI_ScrollBar.cpp:623
MyGUI::ScrollBar::getMoveToClick
bool getMoveToClick() const
Definition MyGUI_ScrollBar.cpp:657
MyGUI::ScrollBar::mVerticalAlignment
bool mVerticalAlignment
Definition MyGUI_ScrollBar.h:183
MyGUI::ScrollBar::mEnableRepeat
bool mEnableRepeat
Definition MyGUI_ScrollBar.h:176
MyGUI::ScrollBar::notifyMouseDrag
void notifyMouseDrag(Widget *_sender, int _left, int _top, MouseButton _id)
Definition MyGUI_ScrollBar.cpp:332
MyGUI::ScrollBar::getTrackSize
int getTrackSize() const
Definition MyGUI_ScrollBar.cpp:423
MyGUI::ScrollBar::mWidgetStart
Button * mWidgetStart
Definition MyGUI_ScrollBar.h:156
MyGUI::ScrollBar::mMoveToClick
bool mMoveToClick
Definition MyGUI_ScrollBar.h:181
MyGUI::ScrollBar::onMouseWheel
void onMouseWheel(int _rel) override
Definition MyGUI_ScrollBar.cpp:440
MyGUI::ScrollBar::getRepeatTriggerTime
float getRepeatTriggerTime(float time) const
Definition MyGUI_ScrollBar.cpp:403
MyGUI::ScrollBar::setScrollPage
void setScrollPage(size_t _value)
Definition MyGUI_ScrollBar.cpp:613
MyGUI::ScrollBar::mPreActionOffset
IntPoint mPreActionOffset
Definition MyGUI_ScrollBar.h:164
MyGUI::ScrollBar::getScrollWheelPage
size_t getScrollWheelPage() const
Definition MyGUI_ScrollBar.cpp:637
MyGUI::ScrollBar::mRepeatTriggerTime
float mRepeatTriggerTime
Definition MyGUI_ScrollBar.h:177
MyGUI::ScrollBar::notifyMouseWheel
void notifyMouseWheel(Widget *_sender, int _rel)
Definition MyGUI_ScrollBar.cpp:447
MyGUI::ScrollBar::mWidgetTrack
Button * mWidgetTrack
Definition MyGUI_ScrollBar.h:158
MyGUI::ScrollBar::getRepeatStepTime
float getRepeatStepTime(float time) const
Definition MyGUI_ScrollBar.cpp:408
MyGUI::ScrollBar::mWidgetEnd
Button * mWidgetEnd
Definition MyGUI_ScrollBar.h:157
MyGUI::ScrollBar::updateTrack
void updateTrack()
Definition MyGUI_ScrollBar.cpp:126
MyGUI::ScrollBar::mScrollPosition
size_t mScrollPosition
Definition MyGUI_ScrollBar.h:171
MyGUI::ScrollBar::mRepeatStepTime
float mRepeatStepTime
Definition MyGUI_ScrollBar.h:178
MyGUI::ScrollBar::mSkinRangeStart
size_t mSkinRangeStart
Definition MyGUI_ScrollBar.h:167
MyGUI::UserData::isUserString
bool isUserString(const std::string &_key) const
Definition MyGUI_WidgetUserData.cpp:44
MyGUI::UserData::getUserString
const std::string & getUserString(const std::string &_key) const
Definition MyGUI_WidgetUserData.cpp:20
MyGUI::Widget
widget description should be here.
Definition MyGUI_Widget.h:37
MyGUI::Widget::getParent
Widget * getParent() const
Definition MyGUI_Widget.cpp:1275
MyGUI::Widget::setCoord
void setCoord(const IntCoord &_value) override
Definition MyGUI_Widget.cpp:686
MyGUI::Widget::eventChangeProperty
EventHandle_WidgetStringString eventChangeProperty
Definition MyGUI_Widget.h:268
MyGUI::Widget::assignWidget
void assignWidget(T *&_widget, const std::string &_name)
Definition MyGUI_Widget.h:336
MyGUI::Widget::setVisible
virtual void setVisible(bool _value)
Definition MyGUI_Widget.cpp:959
MyGUI::Widget::setPosition
void setPosition(const IntPoint &_value) override
Definition MyGUI_Widget.cpp:632
MyGUI::Widget::getVisible
bool getVisible() const
Definition MyGUI_Widget.cpp:1250
MyGUI::Widget::setSize
void setSize(const IntSize &_value) override
Definition MyGUI_Widget.cpp:649
MyGUI::Widget::_forcePick
void _forcePick(Widget *_widget)
Definition MyGUI_Widget.cpp:515
MyGUI::WidgetInput::eventMouseButtonReleased
EventHandle_WidgetIntIntButton eventMouseButtonReleased
Definition MyGUI_WidgetInput.h:163
MyGUI::WidgetInput::eventMouseButtonPressed
EventHandle_WidgetIntIntButton eventMouseButtonPressed
Definition MyGUI_WidgetInput.h:154
MyGUI::WidgetInput::eventMouseDrag
EventPairAddParameter< EventHandle_WidgetIntInt, EventHandle_WidgetIntIntButton > eventMouseDrag
Definition MyGUI_WidgetInput.h:130
MyGUI::WidgetInput::eventMouseWheel
EventHandle_WidgetInt eventMouseWheel
Definition MyGUI_WidgetInput.h:145
MyGUI::utility::parseValue
T parseValue(const std::string &_value)
Definition MyGUI_StringUtility.h:112
MyGUI::utility::parseComplex
bool parseComplex(const std::string &_value, T1 &_p1, T2 &_p2, T3 &_p3, T4 &_p4)
Definition MyGUI_StringUtility.h:297
MyGUI
Definition MyGUI_ActionController.h:15
MyGUI::IntPoint
types::TPoint< int > IntPoint
Definition MyGUI_Types.h:27
MyGUI::newDelegate
delegates::DelegateFunction< Args... > * newDelegate(void(*_func)(Args... args))
Definition MyGUI_Delegate.h:99
MyGUI::MouseButton
Definition MyGUI_MouseButton.h:16
MyGUI::MouseButton::Left
@ Left
Definition MyGUI_MouseButton.h:21
MyGUI::types::TCoord< int >
MyGUI::types::TPoint< int >
MyGUI::types::TPoint::left
T left
Definition MyGUI_TPoint.h:20
MyGUI::types::TPoint::top
T top
Definition MyGUI_TPoint.h:21
MyGUI::types::TSize< int >