| 2390 | } |
| 2391 | |
| 2392 | void 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 | |
| 2434 | void ScriptCreatedComponentWrappers::PanelWrapper::rebuildChildPanels() |
| 2435 | { |
no test coverage detected