MCPcopy Create free account
hub / github.com/christophhart/HISE / showPopupForCallback

Method showPopupForCallback

hi_scripting/scripting/ScriptProcessor.cpp:612–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

610}
611
612void JavascriptProcessor::showPopupForCallback(const Identifier& callback, int /*charNumberToDisplay*/, int /*lineNumberToDisplay*/)
613{
614#if USE_BACKEND
615
616 auto mc = dynamic_cast<Processor*>(this)->getMainController();
617 mc->getCommandManager()->invoke(BackendCommandTarget::MenuViewAddFloatingWindow, false);
618
619 auto rw = GET_BACKEND_ROOT_WINDOW(mc->getConsoleHandler().getMainConsole());
620 auto root = rw->getLastPopup()->getRootFloatingTile();
621
622 root->setNewContent(GET_PANEL_NAME(CodeEditorPanel));
623
624 auto editor = dynamic_cast<CodeEditorPanel*>(root->getCurrentFloatingPanel());
625
626 auto jp = dynamic_cast<JavascriptProcessor*>(this);
627
628 for (int i = 0; i < jp->getNumSnippets(); i++)
629 {
630 if (jp->getSnippet(i)->getCallbackName() == callback)
631 {
632 editor->setContentWithUndo(dynamic_cast<Processor*>(this), i);
633 break;
634 }
635 }
636
637#else
638 ignoreUnused(callback);
639
640#endif
641}
642
643
644void JavascriptProcessor::cleanupEngine()

Callers

nothing calls this directly

Calls 13

ignoreUnusedFunction · 0.85
getMainConsoleMethod · 0.80
getLastPopupMethod · 0.80
getNumSnippetsMethod · 0.80
setContentWithUndoMethod · 0.80
getMainControllerMethod · 0.45
invokeMethod · 0.45
getCommandManagerMethod · 0.45
getRootFloatingTileMethod · 0.45
setNewContentMethod · 0.45
getCallbackNameMethod · 0.45

Tested by

no test coverage detected