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

Method Command_NextItem

Tools/LayoutEditor/WorkspaceControl.cpp:532–563  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530 }
531
532 void WorkspaceControl::Command_NextItem(const MyGUI::UString& _commandName, bool& _result)
533 {
534 if (!checkCommand())
535 return;
536
537 MyGUI::TabControl* tab = nullptr;
538
539 if (mCurrentWidget != nullptr)
540 {
541 if (mCurrentWidget->isType<MyGUI::TabControl>())
542 tab = mCurrentWidget->castType<MyGUI::TabControl>();
543 else if (mCurrentWidget->getParent() != nullptr && mCurrentWidget->getParent()->isType<MyGUI::TabControl>())
544 tab = mCurrentWidget->getParent()->castType<MyGUI::TabControl>();
545 }
546
547 if (tab == nullptr)
548 return;
549
550 if (tab->getItemCount() == 0)
551 return;
552
553 size_t sheet = tab->getIndexSelected();
554 sheet++;
555 if (sheet >= tab->getItemCount())
556 sheet = 0;
557 if (tab->getItemCount())
558 tab->setIndexSelected(sheet);
559
560 WidgetSelectorManager::getInstance().setSelectedWidget(tab->getItemSelected());
561
562 _result = true;
563 }
564
565 void WorkspaceControl::Command_FreeChildMode(const MyGUI::UString& _commandName, bool& _result)
566 {

Callers

nothing calls this directly

Calls 6

setSelectedWidgetMethod · 0.80
getItemSelectedMethod · 0.80
getParentMethod · 0.45
getItemCountMethod · 0.45
getIndexSelectedMethod · 0.45
setIndexSelectedMethod · 0.45

Tested by

no test coverage detected