Slider - Expose rotary parameters


it would be nice to be able to read rotary parameters of a slider. i.e. the inverse of setRotaryParameters. i'm using overlays for modulation settings and need this info to draw the modulation amount correctly.

did i overlook anything?


  -- lucijan

The slider class works via a private implementation pointer that uses passthrough functions in the actual slider class, so without modifying the actual slider class it's not possible to access that data. Personally, I find the slider class to be extremely inflexible on its own and basically pointless to subclass, so I ended up writing my own that has similar behavior but uses inheritance instead of a pointer implementation so I can have more control over things like mouse drag behaviors, value snapping, and painting.

You couldn't just use variables for the start and end angles and get the value of those variables for whatever you need? That's probably what I would do. 

it's true ... this class is quite a monster. that said i get the reason for using a private pointer and think it's quite an appropriate thing to do. in my opinion however there is a little more glue missing. exposing that wouldn't harm the API as setters are anyway there already.

@jon yes this is the path i might end up going one day. but the slider has a lot of nice functionality that will that will take ages to reimplement

P.S. i i'm running into the same issue with Slider::setRange()

i i'm running into the same issue with Slider::setRange()

For that you can use Slider::getMinimum() and Slider::getMaximum()

about rotary parameters, not sure it can help in your case, but note that they are given in the Slider::LookAndFeelMethods::drawRotarySlider()



my bad -- i remembered getMinimum() & friends are for this obscure 3-knob thing thanks for the heads-up!

overlaying works nicely ... if rotary start end end angles were accessible i could complete this feature. any of the API authors care for a comment?

Sorry, didn't read this thread. So you're just looking for a simple getRotaryParameters method?

Jup exactly, that's it.

OK, will do..

Great, thanks!