VCV Rack API v2
Loading...
Searching...
No Matches
SvgSlider.hpp
Go to the documentation of this file.
1#pragma once
2#include <app/common.hpp>
3#include <app/SliderKnob.hpp>
6
7
8namespace rack {
9namespace app {
10
11
21
23 void setBackgroundSvg(std::shared_ptr<window::Svg> svg);
24 void setHandleSvg(std::shared_ptr<window::Svg> svg);
26 void setHandlePosCentered(math::Vec minHandlePosCentered, math::Vec maxHandlePosCentered);
27 void onChange(const ChangeEvent& e) override;
28
29 DEPRECATED void setBackgroundSVG(std::shared_ptr<window::Svg> svg) {
31 }
32 DEPRECATED void setHandleSVG(std::shared_ptr<window::Svg> svg) {
33 setHandleSvg(svg);
34 }
35 DEPRECATED void setSVGs(std::shared_ptr<window::Svg> backgroundSvg, std::shared_ptr<window::Svg> handleSvg) {
36 setBackgroundSvg(backgroundSvg);
37 setHandleSvg(handleSvg);
38 }
39};
40
41
43
44
45} // namespace app
46} // namespace rack
#define DEPRECATED
Attribute for deprecated functions and symbols.
Definition common.hpp:26
DEPRECATED typedef SvgSlider SVGSlider
Definition SvgSlider.hpp:42
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
Definition SliderKnob.hpp:10
Behaves like a knob but linearly moves an widget::SvgWidget between two points.
Definition SvgSlider.hpp:15
void onChange(const ChangeEvent &e) override
DEPRECATED void setHandleSVG(std::shared_ptr< window::Svg > svg)
Definition SvgSlider.hpp:32
math::Vec maxHandlePos
Definition SvgSlider.hpp:20
void setHandlePos(math::Vec minHandlePos, math::Vec maxHandlePos)
DEPRECATED void setBackgroundSVG(std::shared_ptr< window::Svg > svg)
Definition SvgSlider.hpp:29
void setHandleSvg(std::shared_ptr< window::Svg > svg)
DEPRECATED void setSVGs(std::shared_ptr< window::Svg > backgroundSvg, std::shared_ptr< window::Svg > handleSvg)
Definition SvgSlider.hpp:35
void setBackgroundSvg(std::shared_ptr< window::Svg > svg)
widget::SvgWidget * background
Definition SvgSlider.hpp:17
widget::SvgWidget * handle
Definition SvgSlider.hpp:18
widget::FramebufferWidget * fb
Definition SvgSlider.hpp:16
math::Vec minHandlePos
Intermediate positions will be interpolated between these positions.
Definition SvgSlider.hpp:20
void setHandlePosCentered(math::Vec minHandlePosCentered, math::Vec maxHandlePosCentered)
2-dimensional vector of floats, representing a point on the plane for graphics.
Definition math.hpp:189
Caches its children's draw() result to a framebuffer image.
Definition FramebufferWidget.hpp:12
Owns and draws a window::Svg.
Definition SvgWidget.hpp:10
Occurs after the value of a Widget changes.
Definition Widget.hpp:451