Skip to content

Commit

Permalink
Fix issue #4 issue #12 and issue #15
Browse files Browse the repository at this point in the history
  • Loading branch information
brummer10 committed Feb 12, 2024
1 parent 33e5986 commit f946326
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: submodule update
run: git submodule update --init
- name: make vst3
Expand Down
5 changes: 5 additions & 0 deletions Source/GuitarixEditor.h
Expand Up @@ -139,6 +139,11 @@ class PresetSelect: public juce::ComboBox
rightClick();
return;
}
juce::ComboBox::mouseDown(e);
}

void mouseDown (const juce::MouseEvent& e) override {
return;
}

private:
Expand Down
17 changes: 16 additions & 1 deletion Source/JuceUiBuilder.cpp
Expand Up @@ -49,6 +49,20 @@ const char* get_label(const char *sw_type) {

// get host context Menu on right click if available

void AutoComboBox::mouseUp (const juce::MouseEvent& e)
{
if (e.mods.isRightButtonDown()) {
ed->getParameterContext(id);
return;
}
juce::ComboBox::mouseDown(e);
}

void AutoComboBox::mouseDown (const juce::MouseEvent& e)
{
return;
}

void AutoSlider::mouseUp (const juce::MouseEvent& e)
{
if (e.mods.isRightButtonDown())
Expand Down Expand Up @@ -173,6 +187,7 @@ void JuceUiBuilder::create_slider(const char *id, const char *label, juce::Slide

AutoSlider *s = new AutoSlider(label, ed, id);
s->setComponentID(id);
//s->set_color(ed->get_component_color());
s->setSliderStyle(style);
s->setTextBoxStyle(juce::Slider::TextBoxBelow, false, 40, texth);
//s->setPopupDisplayEnabled(true, false, ed);
Expand Down Expand Up @@ -363,7 +378,7 @@ void JuceUiBuilder::create_fload_button(const char *id, const char *label, int w

void JuceUiBuilder::create_combo(const char *id, const char *label) {
if (inHide) return;
juce::ComboBox *c = new juce::ComboBox();
AutoComboBox *c = new AutoComboBox(ed, id);
lastcombo = c;

gx_engine::Parameter *p = ed->get_parameter(id);
Expand Down
17 changes: 17 additions & 0 deletions Source/JuceUiBuilder.h
Expand Up @@ -24,6 +24,8 @@

class PluginEditor;

//==============================================================================

class VerticalMeter : public juce::Component
{
public:
Expand All @@ -46,6 +48,21 @@ class VerticalMeter : public juce::Component
float level = -60.f;
};

class AutoComboBox : public juce::ComboBox
{
public:
AutoComboBox(PluginEditor *ed_, const char* id_)
: ed (ed_), id (id_), juce::ComboBox(){}

void mouseUp (const juce::MouseEvent& e) override;
void mouseDown (const juce::MouseEvent& e) override;

private:
PluginEditor *ed;
const char* id;
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(AutoComboBox)
};

class AutoButton : public juce::ToggleButton
{
public:
Expand Down
2 changes: 2 additions & 0 deletions Source/PluginEditor.cpp
Expand Up @@ -692,6 +692,8 @@ void PluginEditor::paint(juce::Graphics& g)
{
// (Our component is opaque, so we must completely fill the background with a solid colour)
g.fillAll(col);
g.setColour(col.darker());
g.drawRect(getLocalBounds(), 3);

/*
g.setColour(juce::Colours::white);
Expand Down
23 changes: 22 additions & 1 deletion Source/PluginEditor.h
Expand Up @@ -46,6 +46,26 @@ class MuteButton : public juce::ToggleButton
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MuteButton)
};

class PlugSelect: public juce::ComboBox
{
public:
PlugSelect() : juce::ComboBox() {}

void mouseUp(const juce::MouseEvent& e) override {
if (e.mods.isRightButtonDown()) {
return;
}
juce::ComboBox::mouseDown(e);
}

void mouseDown (const juce::MouseEvent& e) override {
return;
}

private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PlugSelect)
};

class ParListener
{
public:
Expand Down Expand Up @@ -74,6 +94,7 @@ class PluginEditor: public juce::Component,
void addControl(juce::Component *c, juce::Component* parent = 0);
gx_engine::Parameter* get_parameter(const char* parid);
gx_engine::GxMachine *get_machine();
juce::Colour& get_component_color() { return col;}

const char* getID() const { return pid.c_str(); }
// int edx, edy;
Expand Down Expand Up @@ -130,7 +151,7 @@ class PluginSelector : public juce::Component,

MachineEditor *ed;
PluginEditor *ped;
juce::ComboBox combo;
PlugSelect combo;
MuteButton mute;
juce::TextButton add, remove;

Expand Down
2 changes: 1 addition & 1 deletion guitarix
Submodule guitarix updated 56 files
+1 −1 trunk/ladspa/monoamp.cpp
+1 −1 trunk/libgxw/gxw/GxKnob.cpp
+1 −1 trunk/libgxw/gxw/GxMeterScale.cpp
+3 −3 trunk/libgxwmm/gxwmm/tools/definitions.py
+3 −3 trunk/libgxwmm/gxwmm/tools/h2def.py
+1 −1 trunk/rcstyles/gx_head_Guitarix.scss
+1 −1 trunk/specmatch/pyjackx.c
+9 −9 trunk/src/LV2/faust-generated/phaser.cc
+24 −14 trunk/src/LV2/faust-generated/switched_tremolo.cc
+1 −1 trunk/src/LV2/faust/bigmuff.dsp
+1 −1 trunk/src/LV2/faust/gxechocat.dsp
+1 −1 trunk/src/LV2/gx_amp.lv2/gxamp.cpp
+1 −1 trunk/src/LV2/gx_amp_stereo.lv2/gxamp_stereo.cpp
+1 −1 trunk/src/LV2/gx_cabinet.lv2/gxcabinet.cpp
+1 −1 trunk/src/LV2/gx_detune.lv2/gx_detune.cpp
+2 −2 trunk/src/LV2/gx_fuzz.lv2/gx_fuzz.cpp
+2 −2 trunk/src/LV2/gx_jcm800pre_st.lv2/jcm800pre.cc
+3 −0 trunk/src/LV2/gx_redeye.lv2/gx_redeye.ttl
+1 −0 trunk/src/LV2/gxbooster.lv2/gxbooster.cpp
+2 −2 trunk/src/LV2/gxtuner.lv2/widget.cpp
+1 −1 trunk/src/LV2/make_lv2_bundle.sh
+93 −88 trunk/src/faust-generated/dattorros_progenitor.cc
+116 −114 trunk/src/faust-generated/drumseq.cc
+7 −2 trunk/src/faust-generated/ring_modulator.cc
+10 −5 trunk/src/faust-generated/ring_modulator_st.cc
+4 −2 trunk/src/faust-generated/tremolo.cc
+1 −1 trunk/src/faust/duck_delay_st.dsp
+6 −2 trunk/src/gx_head/engine/gx_engine.cpp
+3 −3 trunk/src/gx_head/engine/gx_internal_plugins.cpp
+1 −1 trunk/src/gx_head/engine/gx_logging.cpp
+2 −2 trunk/src/gx_head/engine/ladspaplugin.cpp
+1 −1 trunk/src/gx_head/gui/gx_child_process.cpp
+2 −2 trunk/src/gx_head/gui/gx_main_window.cpp
+2 −1 trunk/src/gx_head/gui/gx_preset_window.cpp
+2 −0 trunk/src/gx_head/gui/machine.cpp
+1 −1 trunk/src/headers/engine.h
+1 −1 trunk/src/headers/gx_engine.h
+1 −1 trunk/src/headers/gx_plugin.h
+1 −1 trunk/src/zita-convolver/README
+1 −1 trunk/src/zita-resampler-1.1.0/README
+1 −1 trunk/tools/ampsim/DK/buildlv2/gx_sceleton_rs_X11.lv2/dsp/zita-resampler-1.1.0/README
+1 −1 trunk/tools/ampsim/DK/buildlv2/gx_sceleton_rs_X11_stereo.lv2/dsp/zita-resampler-1.1.0/README
+1 −1 trunk/tools/ampsim/DK/buildlv2/make_lv2_X11bundle.sh
+1 −1 trunk/tools/ampsim/DK/buildlv2/make_lv2_bundle.sh
+1 −1 trunk/tools/ampsim/DK/dk_simulator.py
+6 −6 trunk/tools/ampsim/DK/gschem-schematics/build-plug.py
+2 −2 trunk/tools/ampsim/DK/intpp.cc
+1 −1 trunk/tools/ampsim/DK/scripts/build-redeyeOutput.py
+2 −2 trunk/tools/ampsim/intpp.cc
+1 −1 trunk/tools/ampsim/tensbs/bknot.f
+2 −2 trunk/tools/dunwah2.py
+1 −1 trunk/tools/faustmod.pyx
+1 −1 trunk/tools/pluginloader.pyx
+1 −0 trunk/waftools/faust.py
+5 −4 trunk/waftools/zita-resampler.py
+3 −3 trunk/wscript

0 comments on commit f946326

Please sign in to comment.