void CtrlrPanelComponentProperties::refreshTargetModulationPropertyList (const ValueTree &sourceModulationTree) { CtrlrModulator *target = owner.getOwner().getModulator (sourceModulationTree.getProperty (Ids::modulatorLinkedToModulator)); if (target) { modulatorPropertyList.clear(); modulatorPropertyList.add (COMBO_NONE_ITEM); if ((bool)sourceModulationTree.getProperty (Ids::modulatorLinkedToComponent) == true) { CtrlrComponent *c = target->getComponent(); if (c) { for (int i=0; i<c->getComponentTree().getNumProperties(); i++) { modulatorPropertyList.add (c->getComponentTree().getPropertyName(i).toString()); } } } else { for (int i=0; i<target->getModulatorTree().getNumProperties(); i++) { modulatorPropertyList.add (target->getModulatorTree().getPropertyName(i).toString()); } } } }
//============================================================================== CtrlrGroup::CtrlrGroup (CtrlrModulator &owner) : CtrlrComponent(owner), content(*this), label (0) { addAndMakeVisible (label = new Label ("new label", "Group Text")); label->setFont (Font (14.0000f, Font::bold)); label->setJustificationType (Justification::centred); label->setEditable (false, false, false); label->setColour (TextEditor::textColourId, Colours::black); label->setColour (TextEditor::backgroundColourId, Colour (0x0)); //[UserPreSize] addAndMakeVisible(&content); componentTree.addListener (this); owner.setProperty (Ids::modulatorIsStatic, true); owner.setProperty (Ids::modulatorVstExported, false); setProperty (Ids::uiGroupText, "Group Text"); setProperty (Ids::uiGroupTextColour, "0xff000000"); setProperty (Ids::uiGroupOutlineColour1, "0xffa3a3a3"); setProperty (Ids::uiGroupOutlineColour2, "0xffffffff"); setProperty (Ids::uiGroupBackgroundColour1, "0xffa3a3a3"); setProperty (Ids::uiGroupBackgroundColour2, "0xffffffff"); setProperty (Ids::uiGroupOutlineGradientType, "Vertical"); setProperty (Ids::uiGroupBackgroundGradientType, 1); setProperty (Ids::uiGroupBackgroundImage, ""); setProperty (Ids::uiGroupBackgroundImageLayout, 36); setProperty (Ids::uiGroupBackgroundImageAlpha, 255); setProperty (Ids::uiGroupTextPlacement, "top"); setProperty (Ids::uiGroupTextFont, FONT2STR (Font(14))); setProperty (Ids::uiGroupOutlineThickness, 2.0); setProperty (Ids::uiGroupOutlineRoundAngle, 8.0); setProperty (Ids::uiGroupTextMargin, 0); setProperty (Ids::componentLabelVisible, false); owner.getModulatorTree().addListener (this); //[/UserPreSize] setSize (128, 128); //[Constructor] You can add your own custom stuff here.. //[/Constructor] }