Introjucer: Disable listener callbacks?


#1

I have an abstract base class that inherits from SliderListener and ButtonListener.  I'm using Introjucer to do the layout for a Component that inherits from this base class, so I don't need the auto-generated listeners.

 

Currently, it's very easy to disable auto callback generation for Buttons: just turn off the "Callback" option for each button.

Is there a similar method for Sliders? Combos? It would help us massively clean up our codebase.


#2

If there's no option then no, it can't currently do it. Feel free to suggest a patch though, it's probably very simple to add!


#3

+1

just add a checkbox like you did for the buttons


#4

Okay, just finished the patch. I've stuck with JUCE conventions and made it practically identical to the Button handler code:

https://github.com/UnfilteredAudio/JUCE/commit/caf0fa33767b8f743c17b6b6fd587404b23198e0


#5

I've stuck with JUCE conventions

Hmm, a glance at the messed-up layout on that github page makes me suspect that you maybe didn't follow our no-tab-characters coding standard! ;)

But thanks - we'll take a look!


#6

Damn. I have tabs disabled usually. I'll check if something got messed up in my editor settings >_<

Thanks for taking a look! This has removed 100-400 lines of code from each of our plugins, depending on how many sliders we had on each.