/* ============================================================================== 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); //[UserPreSize] //[/UserPreSize] setSize (250, 70); //[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; //[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 (8, 8, 64, 24); lfoType->setBounds (144, 40, 96, 24); lfoSpeed->setBounds (80, 8, 23, 56); lfoAmDepth->setBounds (208, 8, 32, 24); lfoPitchDepth->setBounds (176, 8, 32, 24); lfoDelay->setBounds (104, 8, 23, 56); //[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] } //[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); } //[/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]