MCPcopy Create free account
hub / github.com/MyGUI/mygui / beginToItemAt

Method beginToItemAt

MyGUIEngine/src/MyGUI_ListBox.cpp:645–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

643 }
644
645 void ListBox::beginToItemAt(size_t _index)
646 {
647 MYGUI_ASSERT_RANGE(_index, mItemsInfo.size(), "ListBox::beginToItemAt");
648 if (mRangeIndex <= 0)
649 return;
650
651 int offset = (int)_index * mHeightLine;
652 if (offset >= mRangeIndex)
653 offset = mRangeIndex;
654
655 if (mWidgetScroll != nullptr)
656 {
657 if ((int)mWidgetScroll->getScrollPosition() == offset)
658 return;
659 mWidgetScroll->setScrollPosition(offset);
660 }
661 notifyScrollChangePosition(nullptr, offset);
662 }
663
664 // видим ли мы элемент, полностью или нет
665 bool ListBox::isItemVisibleAt(size_t _index, bool _fill)

Callers 15

BeginToItemAtFunction · 0.45
BeginToItemAtFunction · 0.45
BeginMethod · 0.45
beginToIndexMethod · 0.45
showBarButtonMethod · 0.45
notifyClickAddMethod · 0.45
notifyClickAddMethod · 0.45
notifyClickAddMethod · 0.45

Calls 3

getScrollPositionMethod · 0.80
sizeMethod · 0.45
setScrollPositionMethod · 0.45

Tested by 1

BeginMethod · 0.36