I’m trying to create a new Slider with the hability to handle synchronisation between two values.
Typically, I’m using a physical controller sending MIDI CC, and I’im switching between multiple identical layouts. My screen layout updates itself when refreshing, and is not necessarily synched with the controller’s knobs values.
The logical solution I thought about was to build a new component, derivated from Slider, implementing the synched state handling and using it as a condition to let it send messages or not (as long as you have not physically synched your knob with the slider, nothing is sent).
This part was easy, but I’m stopped by the painting part, as I would like to display the unsynched state.
I looked at the Slider code and the paint method relies on its internal pimpl::paint class, which is of course not available.
At that time, a solution would be to rebuild an evoluted slider from the main source, copying the whole original one and adding my features, of course. But I was wondering if I was missing something about a simpler and cleaner way to do this ?
Thank you very much for your help…