#pragma once #include class Knob : public juce::Component { public: Knob (const juce::String& title, juce::AudioProcessorValueTreeState& apvts, const juce::String& paramID, float defaultValue, std::function format, const juce::String& tooltip); void paint (juce::Graphics&) override; void resized() override; void setScaleFactor (float scale); private: void updateValueLabel(); std::function format; juce::Label nameLabel; juce::Label valueLabel; juce::Slider slider; std::unique_ptr attachment; float scaleFactor = 1.0f; JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (Knob) };