/* ============================================================================== This file was auto-generated! It contains the basic framework code for a JUCE plugin editor. ============================================================================== */ #include "PluginProcessor.h" #include "PluginEditor.h" //============================================================================== Gdv1AudioProcessorEditor::Gdv1AudioProcessorEditor (Gdv1AudioProcessor& p) : AudioProcessorEditor (&p), processor (p) { // Make sure that before the constructor has finished, you've set the // editor's size to whatever you need it to be. setSize (400, 250); addAndMakeVisible(On); On.setButtonText(" ON "); On.setClickingTogglesState("true"); On.setColour(TextButton::buttonColourId, Colours::green); On.setRadioGroupId(2); On.addListener(this); addAndMakeVisible(Off); Off.setButtonText(" OFF "); Off.setClickingTogglesState("True"); Off.setRadioGroupId(2); Off.setColour(TextButton::buttonColourId, Colours::red); Off.setToggleState("true", dontSendNotification); Off.addListener(this); //addAndMakeVisible(Freq); //Freq.setRange(20.0f,70.0f,2.0f); //Freq.setSliderStyle (Slider::Rotary); //Freq.setTextBoxStyle (Slider::NoTextBox, false, 0, 0); //Freq.setPopupDisplayEnabled(true, this); //FreqLabel.setText ("Frequency", dontSendNotification); //FreqLabel.attachToComponent (&Freq, true); //Freq.setTextValueSuffix(" Frequency "); } void Gdv1AudioProcessorEditor::buttonChanged (Button* buttonThatWasClicked) { if (buttonThatWasClicked == &On|| buttonThatWasClicked == &Off) processor.setFilteringEnbaled (On.getToggleState()); } Gdv1AudioProcessorEditor::~Gdv1AudioProcessorEditor() { } //============================================================================== void Gdv1AudioProcessorEditor::paint (Graphics& g) { g.fillAll (Colours::white); g.setColour (Colours::darkred); g.setFont (25.0f); g.drawFittedText (" Group Delay Correction ", 0,0,getWidth(), 30, Justification::centredTop,1); //Freq.setBounds(170, 150, 60, 60); } void Gdv1AudioProcessorEditor::resized() { On.setBounds(100, 60, 60, 60); Off.setBounds(220, 60, 60, 60); // This is generally where you'll want to lay out the positions of any // subcomponents in your editor.. }