Is there any way to determine the type of a parameter mapped using the ParamHandle functionality? I’m trying to figure out a way to remotely index a switch like an SvgSwitch.
It seems like ParamQuantity doesn’t really distinguish between continuous and stepped values. I’d like a way to know whether I should set an absolute value or just increment / decrement the ParamQuantity by a specific step size.
I’m not really 100% sure I understand your problem correct, but you can always figure out the real
type of objects by trying to dynamic cast them to the type you expect, if there is no other way to do this in the API.
And the way to go here would be over the widget pointer of the param to investigate that you have to obtain somehow.
For example you create a method like this for detection of a SvgSwitch:
rack::app::SvgSwitch* ifIsSvgSwitch(rack::widget::Widget* widget)
and check with something like this
auto widgetToCheck = obtainSomehowTheWidget();
auto svgSwitch = ifIsSvgSwitch(widgetToCheck);
// do something with Svg switch
// it is different kind of widget
I hope this helps.