24#include "StateManager.h"
25#include <juce_gui_basics/juce_gui_basics.h>
34class Knob :
public juce::Slider
61 std::unique_ptr<plugin::StateManager::SliderAttachment> _attachment;
62 void paint(juce::Graphics& g)
override;
Custom knob component that displays a label and a value.
Definition Knob.h:35
void attach(plugin::StateManager &, juce::ParameterID)
Attach this knob to a parameter.
Definition Knob.cpp:98
Knob(const Params &)
Constructor.
Definition Knob.cpp:71
Behavior
Defines the behavior of the knob when the user drags it beyond its range.
Definition Knob.h:39
@ Endless
The knob will wrap around when the user drags it beyond its range.
@ Bounded
The knob will stop at its minimum and maximum values.
Base class for storing plugin state.
Definition StateManager.h:39
static const auto dark
Dark.
Definition Colors.h:40
Parameters for the Knob component.
Definition Knob.h:46
float notchDepthFraction
Depth of the indicator notch as a fraction of the radius.
Definition Knob.h:51
float knobRangeDegrees
Range of the knob in degrees.
Definition Knob.h:49
float notchWidthDegrees
Width of the indicator notch in degrees.
Definition Knob.h:50
Behavior behavior
Behavior of the knob.
Definition Knob.h:48
juce::Colour color
Color of the knob.
Definition Knob.h:47