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

Method initPanel

hi_scripting/scripting/api/ScriptComponentWrappers.cpp:2392–2432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2390}
2391
2392void ScriptCreatedComponentWrappers::PanelWrapper::initPanel(ScriptingApi::Content::ScriptPanel* panel)
2393{
2394 BorderPanel *bp = new BorderPanel(panel->getDrawActionHandler());
2395
2396 panel->addSubComponentListener(this);
2397
2398
2399 bp->setName(panel->name.toString());
2400
2401
2402
2403 bp->addMouseCallbackListener(this);
2404 bp->setDraggingEnabled(panel->getScriptObjectProperty(ScriptingApi::Content::ScriptPanel::allowDragging));
2405 bp->setDragBounds(panel->getDragBounds(), this);
2406 bp->setOpaque(panel->getScriptObjectProperty(ScriptingApi::Content::ScriptPanel::opaque));
2407 bp->isPopupPanel = panel->getScriptObjectProperty(ScriptingApi::Content::ScriptPanel::isPopupPanel);
2408 bp->setJSONPopupData(panel->getJSONPopupData(), panel->getPopupSize());
2409 bp->setup(getProcessor(), getIndex(), panel->name.toString());
2410 bp->isUsingCustomImage = panel->isUsingCustomPaintRoutine() || panel->isUsingClippedFixedImage();
2411
2412 bp->setEnableFileDrop(panel->fileDropLevel, panel->fileDropExtension);
2413
2414
2415 bp->setBufferedToImage(panel->getScriptObjectProperty(ScriptingApi::Content::ScriptPanel::bufferToImage));
2416
2417 component = bp;
2418
2419 panel->addAnimationListener(this);
2420
2421#if HISE_INCLUDE_RLOTTIE
2422 animationChanged();
2423#endif
2424
2425 initAllProperties();
2426
2427 rebuildChildPanels();
2428
2429 panel->repaint();
2430
2431 panel->getCursorUpdater().addListener(*this, cursorChanged);
2432}
2433
2434void ScriptCreatedComponentWrappers::PanelWrapper::rebuildChildPanels()
2435{

Callers 2

createOrShowDocWindowMethod · 0.45
createDocFloatingTileMethod · 0.45

Calls 15

getProcessorFunction · 0.85
getDrawActionHandlerMethod · 0.80
setDraggingEnabledMethod · 0.80
setDragBoundsMethod · 0.80
getDragBoundsMethod · 0.80
setJSONPopupDataMethod · 0.80
getJSONPopupDataMethod · 0.80
getPopupSizeMethod · 0.80

Tested by

no test coverage detected