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

Method getActiveCallback

hi_scripting/scripting/components/ScriptingEditor.cpp:444–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

442}
443
444int ScriptingEditor::getActiveCallback() const
445{
446 const JavascriptProcessor *sp = dynamic_cast<const JavascriptProcessor*>(getProcessor());
447
448 if (codeEditor == nullptr) return sp->getNumSnippets();
449
450 const CodeDocument &codeDoc = CommonEditorFunctions::getDoc(codeEditor->editor);
451
452 for (int i = 0; i < sp->getNumSnippets(); i++)
453 {
454 if (&codeDoc == sp->getSnippet(i))
455 {
456 return i;
457 }
458 }
459
460 return sp->getNumSnippets();
461}
462
463void ScriptingEditor::checkActiveSnippets()
464{

Callers

nothing calls this directly

Calls 3

getProcessorFunction · 0.85
getNumSnippetsMethod · 0.80
getSnippetMethod · 0.45

Tested by

no test coverage detected