/* ============================================================================== This is an automatically generated GUI class created by the Introjucer! Be careful when adding custom code to these files, as only the code within the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded and re-saved. Created with Introjucer version: 3.1.0 ------------------------------------------------------------------------------ The Introjucer is part of the JUCE library - "Jules' Utility Class Extensions" Copyright 2004-13 by Raw Material Software Ltd. ============================================================================== */ //[Headers] You can add your own extra header files here... //[/Headers] #include "GlobalEditor.h" //[MiscUserDefs] You can add your own user definitions and misc code here... //[/MiscUserDefs] //============================================================================== GlobalEditor::GlobalEditor () { addAndMakeVisible (algo = new Slider ("algo")); algo->setRange (1, 32, 1); algo->setSliderStyle (Slider::Rotary); algo->setTextBoxStyle (Slider::TextBoxLeft, true, 80, 20); algo->addListener (this); addAndMakeVisible (lfoType = new ComboBox ("new combo box")); lfoType->setEditableText (false); lfoType->setJustificationType (Justification::centredLeft); lfoType->setTextWhenNothingSelected (String::empty); lfoType->setTextWhenNoChoicesAvailable ("(no choices)"); lfoType->addItem ("TRIANGLE", 1); lfoType->addItem ("SAW DOWN", 2); lfoType->addItem ("SAW UP", 3); lfoType->addItem ("SQUARE", 4); lfoType->addItem ("SINE", 5); lfoType->addItem ("S&HOLD", 6); lfoType->addListener (this); addAndMakeVisible (lfoSpeed = new Slider ("lfoSpeed")); lfoSpeed->setRange (0, 99, 1); lfoSpeed->setSliderStyle (Slider::LinearVertical); lfoSpeed->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); lfoSpeed->addListener (this); addAndMakeVisible (lfoAmDepth = new Slider ("new slider")); lfoAmDepth->setRange (0, 99, 1); lfoAmDepth->setSliderStyle (Slider::Rotary); lfoAmDepth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); lfoAmDepth->addListener (this); addAndMakeVisible (lfoPitchDepth = new Slider ("new slider")); lfoPitchDepth->setRange (0, 99, 1); lfoPitchDepth->setSliderStyle (Slider::Rotary); lfoPitchDepth->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); lfoPitchDepth->addListener (this); addAndMakeVisible (lfoDelay = new Slider ("lfoDelay")); lfoDelay->setRange (0, 99, 1); lfoDelay->setSliderStyle (Slider::LinearVertical); lfoDelay->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); lfoDelay->addListener (this); addAndMakeVisible (cutoff = new Slider ("cutoff")); cutoff->setRange (0, 10, 0); cutoff->setSliderStyle (Slider::Rotary); cutoff->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); cutoff->addListener (this); addAndMakeVisible (reso = new Slider ("reso")); reso->setRange (0, 10, 0); reso->setSliderStyle (Slider::Rotary); reso->setTextBoxStyle (Slider::NoTextBox, false, 80, 20); reso->addListener (this); addAndMakeVisible (algoDisplay = new AlgoDisplay()); algoDisplay->setName ("algoDisplay"); //[UserPreSize] //[/UserPreSize] setSize (855, 90); //[Constructor] You can add your own custom stuff here.. //[/Constructor] } GlobalEditor::~GlobalEditor() { //[Destructor_pre]. You can add your own custom destruction code here.. //[/Destructor_pre] algo = nullptr; lfoType = nullptr; lfoSpeed = nullptr; lfoAmDepth = nullptr; lfoPitchDepth = nullptr; lfoDelay = nullptr; cutoff = nullptr; reso = nullptr; algoDisplay = nullptr; //[Destructor]. You can add your own custom destruction code here.. //[/Destructor] } //============================================================================== void GlobalEditor::paint (Graphics& g) { //[UserPrePaint] Add your own custom painting code here.. //[/UserPrePaint] //[UserPaint] Add your own custom painting code here.. //[/UserPaint] } void GlobalEditor::resized() { algo->setBounds (784, 48, 64, 24); lfoType->setBounds (768, 8, 80, 16); lfoSpeed->setBounds (712, 0, 23, 80); lfoAmDepth->setBounds (816, 24, 32, 24); lfoPitchDepth->setBounds (792, 24, 32, 24); lfoDelay->setBounds (736, 0, 23, 80); cutoff->setBounds (176, 40, 48, 48); reso->setBounds (232, 40, 48, 48); algoDisplay->setBounds (8, 8, 150, 72); //[UserResized] Add your own custom resize handling here.. //[/UserResized] } void GlobalEditor::sliderValueChanged (Slider* sliderThatWasMoved) { //[UsersliderValueChanged_Pre] //[/UsersliderValueChanged_Pre] if (sliderThatWasMoved == algo) { //[UserSliderCode_algo] -- add your slider handling code here.. //[/UserSliderCode_algo] } else if (sliderThatWasMoved == lfoSpeed) { //[UserSliderCode_lfoSpeed] -- add your slider handling code here.. //[/UserSliderCode_lfoSpeed] } else if (sliderThatWasMoved == lfoAmDepth) { //[UserSliderCode_lfoAmDepth] -- add your slider handling code here.. //[/UserSliderCode_lfoAmDepth] } else if (sliderThatWasMoved == lfoPitchDepth) { //[UserSliderCode_lfoPitchDepth] -- add your slider handling code here.. //[/UserSliderCode_lfoPitchDepth] } else if (sliderThatWasMoved == lfoDelay) { //[UserSliderCode_lfoDelay] -- add your slider handling code here.. //[/UserSliderCode_lfoDelay] } else if (sliderThatWasMoved == cutoff) { //[UserSliderCode_cutoff] -- add your slider handling code here.. //[/UserSliderCode_cutoff] } else if (sliderThatWasMoved == reso) { //[UserSliderCode_reso] -- add your slider handling code here.. //[/UserSliderCode_reso] } //[UsersliderValueChanged_Post] //[/UsersliderValueChanged_Post] } void GlobalEditor::comboBoxChanged (ComboBox* comboBoxThatHasChanged) { //[UsercomboBoxChanged_Pre] //[/UsercomboBoxChanged_Pre] if (comboBoxThatHasChanged == lfoType) { //[UserComboBoxCode_lfoType] -- add your combo box handling code here.. //[/UserComboBoxCode_lfoType] } //[UsercomboBoxChanged_Post] //[/UsercomboBoxChanged_Post] } //[MiscUserCode] You can add your own definitions of your custom methods or any other code here... void GlobalEditor::bind(DexedAudioProcessor *parent) { parent->algo->bind(algo); parent->lfoRate->bind(lfoSpeed); parent->lfoDelay->bind(lfoDelay); parent->lfoWaveform->bind(lfoType); parent->lfoAmpDepth->bind(lfoAmDepth); parent->lfoPitchDepth->bind(lfoPitchDepth); processor = parent; } //[/MiscUserCode] //============================================================================== #if 0 /* -- Introjucer information section -- This is where the Introjucer stores the metadata that describe this GUI layout, so make changes in here at your peril! BEGIN_JUCER_METADATA END_JUCER_METADATA */ #endif //[EndFile] You can add extra defines here... //[/EndFile]