| 3999 | |
| 4000 | |
| 4001 | void ScriptingObjects::ScriptedLookAndFeel::Laf::drawRotarySlider(Graphics &g_, int /*x*/, int /*y*/, int width, int height, float /*sliderPosProportional*/, float /*rotaryStartAngle*/, float /*rotaryEndAngle*/, Slider &s) |
| 4002 | { |
| 4003 | if (functionDefined("drawRotarySlider")) |
| 4004 | { |
| 4005 | auto obj = new DynamicObject(); |
| 4006 | |
| 4007 | s.setTextBoxStyle(Slider::NoTextBox, false, -1, -1); |
| 4008 | |
| 4009 | writeId(obj, &s); |
| 4010 | obj->setProperty("enabled", s.isEnabled()); |
| 4011 | obj->setProperty("text", s.getName()); |
| 4012 | obj->setProperty("area", ApiHelpers::getVarRectangle(s.getLocalBounds().toFloat())); |
| 4013 | |
| 4014 | obj->setProperty("valueAsText", s.getTextFromValue(s.getValue())); |
| 4015 | obj->setProperty("value", s.getValue()); |
| 4016 | |
| 4017 | NormalisableRange<double> range = NormalisableRange<double>(s.getMinimum(), s.getMaximum(), s.getInterval(), s.getSkewFactor()); |
| 4018 | obj->setProperty("valueNormalized", range.convertTo0to1(s.getValue())); |
| 4019 | |
| 4020 | obj->setProperty("valueSuffixString", s.getTextFromValue(s.getValue())); |
| 4021 | obj->setProperty("suffix", s.getTextValueSuffix()); |
| 4022 | obj->setProperty("skew", s.getSkewFactor()); |
| 4023 | obj->setProperty("min", s.getMinimum()); |
| 4024 | obj->setProperty("max", s.getMaximum()); |
| 4025 | |
| 4026 | obj->setProperty("clicked", s.isMouseButtonDown()); |
| 4027 | obj->setProperty("hover", s.isMouseOver()); |
| 4028 | |
| 4029 | setColourOrBlack(obj, "bgColour", s, HiseColourScheme::ComponentOutlineColourId); |
| 4030 | setColourOrBlack(obj, "itemColour1", s, HiseColourScheme::ComponentFillTopColourId); |
| 4031 | setColourOrBlack(obj, "itemColour2", s, HiseColourScheme::ComponentFillBottomColourId); |
| 4032 | setColourOrBlack(obj, "textColour", s, HiseColourScheme::ComponentTextColourId); |
| 4033 | |
| 4034 | addParentFloatingTile(s, obj); |
| 4035 | |
| 4036 | if (get()->callWithGraphics(g_, "drawRotarySlider", var(obj), &s)) |
| 4037 | return; |
| 4038 | } |
| 4039 | |
| 4040 | GlobalHiseLookAndFeel::drawRotarySlider(g_, -1, -1, width, height, -1, -1, -1, s); |
| 4041 | } |
| 4042 | |
| 4043 | |
| 4044 | void ScriptingObjects::ScriptedLookAndFeel::Laf::drawLinearSlider(Graphics &g, int /*x*/, int /*y*/, int width, int height, float /*sliderPos*/, float /*minSliderPos*/, float /*maxSliderPos*/, const Slider::SliderStyle style, Slider &slider) |
nothing calls this directly
no test coverage detected