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

Method menuItemSelected

Source/UIComponents/CtrlrLua/CtrlrLuaConsole.cpp:289–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

287}
288
289void CtrlrLuaConsole::menuItemSelected(int menuItemID, int topLevelMenuIndex)
290{
291 if (topLevelMenuIndex == 0 && menuItemID==1)
292 {
293 owner.getWindowManager().toggle (CtrlrPanelWindowManager::LuaConsole, false);
294 }
295 if (menuItemID == 2)
296 {
297 snips.add (inputDocument.getAllContent());
298 }
299 if (menuItemID >= 1024 && menuItemID < 4096)
300 {
301 runCode (snips[menuItemID-1024]);
302 }
303 if (menuItemID >= 4096)
304 {
305 snips.remove (menuItemID-4096);
306 }
307 if (menuItemID == 3)
308 {
309 owner.setProperty (Ids::uiLuaConsoleInputRemoveAfterRun, !owner.getProperty(Ids::uiLuaConsoleInputRemoveAfterRun));
310 }
311 owner.setProperty (Ids::uiLuaConsoleSnips, snips.joinIntoString("$"));
312}
313
314void CtrlrLuaConsole::focusGained(FocusChangeType cause)
315{

Callers

nothing calls this directly

Calls 7

getAllContentMethod · 0.80
joinIntoStringMethod · 0.80
toggleMethod · 0.45
addMethod · 0.45
removeMethod · 0.45
setPropertyMethod · 0.45
getPropertyMethod · 0.45

Tested by

no test coverage detected