//============================================================================== CtrlrLCDLabel::CtrlrLCDLabel (CtrlrModulator &owner) : CtrlrComponent(owner), ctrlrLabel (0) { addAndMakeVisible (ctrlrLabel = new Label ("ctrlrLabel", "LCD TEST")); ctrlrLabel->setFont (Font (16.0000f, Font::plain)); ctrlrLabel->setJustificationType (Justification::centred); ctrlrLabel->setEditable (false, false, false); ctrlrLabel->setColour (Label::backgroundColourId, Colour (0x0)); ctrlrLabel->setColour (Label::textColourId, Colours::black); ctrlrLabel->setColour (TextEditor::textColourId, Colours::black); ctrlrLabel->setColour (TextEditor::backgroundColourId, Colour (0x0)); //[UserPreSize] setBufferedToImage (true); ctrlrLabel->setBufferedToImage (true); owner.setProperty (Ids::modulatorIsStatic, true); owner.setProperty (Ids::modulatorVstExported, false); setProperty (Ids::uiLabelBgColour, "0xff000000"); setProperty (Ids::uiLabelTextColour, "0xff56c312"); setProperty (Ids::uiLabelOutline, 0); setProperty (Ids::uiLabelOutlineColour, "0x00000000"); setProperty (Ids::uiLabelJustification, "centred"); setProperty (Ids::uiLabelFitFont, false); setProperty (Ids::uiLCDLabelFont, 5); setProperty (Ids::uiLCDLabelFontHeight, 18); setProperty (Ids::uiLabelText, "Label text"); setProperty (Ids::uiLabelDisplaysAllValues, false); setProperty (Ids::uiLabelDisplayFormat, "%n(%N) = %v(%h)"); setProperty (Ids::uiLabelInputHighlightTextColour, "0xffffffff"); setProperty (Ids::uiLabelInputHighlightColour, "0xff0000ff"); setProperty (Ids::uiLabelEditOnSingleClick, false); setProperty (Ids::uiLabelEditOnDoubleClick, false); setProperty (Ids::uiLabelEditFocusDiscardsChanges, true); setProperty (Ids::uiLabelInputAllowedChars, ""); setProperty (Ids::uiLabelInputAllowedChars, ""); setProperty (Ids::uiLabelInputMaxLength, 1024); setProperty (Ids::uiLabelChangedCbk, COMBO_NONE_ITEM); componentTree.addListener (this); //[/UserPreSize] setSize (96, 32); //[Constructor] You can add your own custom stuff here.. //[/Constructor] }
//============================================================================== CtrlrToggleButton::CtrlrToggleButton (CtrlrModulator &owner) : CtrlrComponent(owner), ctrlrButton (0) { addAndMakeVisible (ctrlrButton = new ToggleButton ("ctrlrButton")); ctrlrButton->setButtonText ("Button"); ctrlrButton->addListener (this); //[UserPreSize] ctrlrButton->setBufferedToImage (true); setProperty (Ids::uiButtonTextColourOn, "0xff000000"); setProperty (Ids::uiToggleButtonFocusOutline, "0x00000000"); setProperty (Ids::uiToggleButtonText, "Button"); setProperty (Ids::uiButtonTrueValue, 1); setProperty (Ids::uiButtonFalseValue, 0); setProperty (Ids::uiButtonColourOff, "0xff0000ff"); owner.setProperty (Ids::modulatorMax, 1); owner.setProperty (Ids::modulatorMin, 0); //[/UserPreSize] setSize (88, 32); //[Constructor] You can add your own custom stuff here.. //owner.getProcessor().setValueFromGUI (0, true); //[/Constructor] }
//============================================================================== 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] }
CtrlrModulator *CtrlrPanel::createNewModulator(const Identifier &guiType) { CtrlrModulator *newModulator = nullptr; if (CtrlrComponentTypeManager::isStatic(guiType)) { newModulator = new CtrlrModulator (*this); } else { newModulator = new CtrlrModulator (*this, owner.getNextVstIndex()); } newModulator->setProperty (Ids::name, getUniqueModulatorName("modulator-1")); addModulator (newModulator); return (newModulator); }
//============================================================================== CtrlrTabsComponent::CtrlrTabsComponent (CtrlrModulator &owner) : CtrlrComponent(owner), lf(*this), ctrlrTabs (0) { addAndMakeVisible (ctrlrTabs = new CtrlrTabsInternal (*this)); ctrlrTabs->setName (L"ctrlrTabs"); //[UserPreSize] ctrlrTabs->setLookAndFeel (&lf); owner.setProperty (Ids::modulatorVstExported, false); setProperty (Ids::uiTabsCurrentTabChanged, ""); setProperty (Ids::uiTabsDepth, 24); setProperty (Ids::uiTabsOutlineThickness, 2); setProperty (Ids::uiTabsFrontTabOutline, 1.0f); setProperty (Ids::uiTabsTabOutline, 0.5f); setProperty (Ids::uiTabsIndentThickness, 0); setProperty (Ids::uiTabsOrientation, 0); setProperty (Ids::uiTabsFrontTabFont, FONT2STR(Font(16))); setProperty (Ids::uiTabsTabFont, FONT2STR(Font(16))); setProperty (Ids::uiTabsOutlineGlobalColour, "0x00000000"); setProperty (Ids::uiTabsOutlineGlobalBackgroundColour, "0x67000000"); setProperty (Ids::uiTabsOutlineTabColour, "0xff303030"); setProperty (Ids::uiTabsTextTabColour, "0xff909090"); setProperty (Ids::uiTabsFrontTabOutlineColour, "0xff000000"); setProperty (Ids::uiTabsFrontTabTextColour, "0xff000000"); setProperty (Ids::uiTabsAddTab, 0); setProperty (Ids::uiTabsRemoveTab, 0); //[/UserPreSize] setSize (256, 256); //[Constructor] You can add your own custom stuff here.. //[/Constructor] }