MCPcopy Create free account
hub / github.com/axmolengine/axmol / insertCustomItem

Method insertCustomItem

core/ui/UIListView.cpp:344–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344void ListView::insertCustomItem(Widget* item, ssize_t index)
345{
346 if (-1 != _curSelectedIndex)
347 {
348 if (_curSelectedIndex >= index)
349 {
350 _curSelectedIndex += 1;
351 }
352 }
353 _items.insert(index, item);
354 onItemListChanged();
355
356 ScrollView::addChild(item);
357
358 remedyLayoutParameter(item);
359 requestDoLayout();
360}
361
362void ListView::removeItem(ssize_t index)
363{

Callers 3

initMethod · 0.80
initMethod · 0.80

Calls 1

insertMethod · 0.45

Tested by 2

initMethod · 0.64
initMethod · 0.64