feat(gui): add GUI components and displays

This commit is contained in:
2026-09-08 14:55:22 +02:00
parent 5a80534a2e
commit a9abca9e15
19 changed files with 898 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#pragma once
#include <JuceHeader.h>
#include "../Resources.h"
namespace serum
{
// ===========================================================================
// Rotary knob — a juce::Slider styled by SerumLookAndFeel. The value readout is
// formatted by a user-provided function via getTextFromValue().
// ===========================================================================
class Knob : public juce::Slider
{
public:
explicit Knob (const juce::String& name,
std::function<juce::String (float)> formatter = {});
void setFormatter (std::function<juce::String (float)> f) { formatter = std::move (f); }
juce::String getTextFromValue (double value) override;
private:
std::function<juce::String (float)> formatter;
};
} // namespace serum