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

Method showPopupForFile

hi_scripting/scripting/ScriptProcessor.cpp:575–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

573}
574
575void FileChangeListener::showPopupForFile(int index, int charNumberToDisplay/*=0*/, int /*lineNumberToDisplay=-1*/)
576{
577#if USE_BACKEND
578
579 auto mc = dynamic_cast<Processor*>(this)->getMainController();
580 mc->getCommandManager()->invoke(BackendCommandTarget::MenuViewAddFloatingWindow, false);
581
582 auto rw = GET_BACKEND_ROOT_WINDOW(mc->getConsoleHandler().getMainConsole());
583
584 auto window = rw->getLastPopup();
585
586 window->setName(watchers[index]->getFile().getFileName());
587 window->centreWithSize(1000, 800);
588
589
590 auto root = window->getRootFloatingTile();
591
592 root->setNewContent(GET_PANEL_NAME(CodeEditorPanel));
593
594 auto editor = dynamic_cast<CodeEditorPanel*>(root->getCurrentFloatingPanel());
595
596 editor->gotoLocation(dynamic_cast<Processor*>(this), watchers[index]->getFile().getFullPathName(), charNumberToDisplay);
597
598#else
599 ignoreUnused(index, charNumberToDisplay);
600#endif
601}
602
603void FileChangeListener::showPopupForFile(const File& f, int charNumberToDisplay /*= 0*/, int lineNumberToDisplay /*= -1*/)
604{

Callers 2

gotoInternalMethod · 0.80
mouseDownMethod · 0.80

Calls 15

ignoreUnusedFunction · 0.85
getMainConsoleMethod · 0.80
getLastPopupMethod · 0.80
getMainControllerMethod · 0.45
invokeMethod · 0.45
getCommandManagerMethod · 0.45
setNameMethod · 0.45
getFileNameMethod · 0.45
getFileMethod · 0.45
centreWithSizeMethod · 0.45
getRootFloatingTileMethod · 0.45

Tested by

no test coverage detected