MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / getMenuForIndex

Method getMenuForIndex

Source/UIComponents/CtrlrLua/CtrlrLuaConsole.cpp:270–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268}
269
270PopupMenu CtrlrLuaConsole::getMenuForIndex(int topLevelMenuIndex, const String &menuName)
271{
272 PopupMenu menu;
273 if (topLevelMenuIndex == 0)
274 {
275 menu.addItem (2, "Add input to snips");
276 menu.addSubMenu ("Run snip", getSnipsMenu(1024));
277 menu.addSubMenu ("Remove snip", getSnipsMenu(4096));
278 menu.addSeparator();
279 menu.addItem (1, "Close");
280 }
281 else if(topLevelMenuIndex == 1)
282 {
283 menu.addItem (3, "Toggle input removal after run", true, (bool)owner.getProperty(Ids::uiLuaConsoleInputRemoveAfterRun));
284 }
285
286 return (menu);
287}
288
289void CtrlrLuaConsole::menuItemSelected(int menuItemID, int topLevelMenuIndex)
290{

Callers

nothing calls this directly

Calls 4

addItemMethod · 0.45
addSubMenuMethod · 0.45
addSeparatorMethod · 0.45
getPropertyMethod · 0.45

Tested by

no test coverage detected