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

Method bootstrapPanel

Source/Core/CtrlrPanel/CtrlrPanel.cpp:327–367  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327void CtrlrPanel::bootstrapPanel(const bool setInitialProgram)
328{
329 _DBG("CtrlrPanel::bootstrapPanel");
330 if (getRestoreState())
331 return;
332
333 boostrapStateStatus = true;
334
335 for (int i=0; i<ctrlrModulators.size(); i++)
336 {
337 ctrlrModulators[i]->allModulatorsInitialized();
338 }
339
340 if (setInitialProgram)
341 setProgram (initialProgram);
342
343 if (luaPanelLoadedCbk.get())
344 {
345 if (luaPanelLoadedCbk->isValid())
346 {
347 getCtrlrLuaManager().getMethodManager().call (luaPanelLoadedCbk, (uint8)owner.getInstanceMode());
348 }
349 }
350
351 if ((bool)getProperty (Ids::panelMidiSendProgramChangeOnLoad) == true)
352 {
353 sendMidiProgramChange();
354 }
355
356 editModeChanged(getProperty(Ids::uiPanelEditMode));
357
358 sendSnapshotOnLoad();
359
360 // Synchronously dispatch any pending change message in each modulator to prevent Lua Callback functions beeing called on startup
361 for (int i = 0; i<ctrlrModulators.size(); i++)
362 {
363 ctrlrModulators[i]->getProcessor().handleUpdateNowIfNeeded();
364 }
365
366 boostrapStateStatus = false;
367}
368
369CtrlrPanelEditor *CtrlrPanel::getEditor(const bool createNewEditorIfNeeded)
370{

Callers

nothing calls this directly

Calls 9

setProgramFunction · 0.85
getInstanceModeMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45
isValidMethod · 0.45
callMethod · 0.45
getProcessorMethod · 0.45

Tested by

no test coverage detected