Vital
Loading...
Searching...
No Matches
synth_editor.h
Go to the documentation of this file.
1/*
2Summary:
3
4SynthEditor is the main UI class for a synth plugin. It displays a FullInterface GUI, applies scaling, ensures an aspect ratio, and updates the UI in response to plugin state changes. It manages reading user preferences (e.g., animation, window size) and resizing behavior.
5*/
6
7#pragma once
8
9#include "JuceHeader.h"
11#include "synth_plugin.h"
12#include "full_interface.h"
13#include "synth_gui_interface.h"
14
24class SynthEditor : public AudioProcessorEditor, public SynthGuiInterface {
25public:
34
39 void paint(Graphics&) override { }
40
46 void resized() override;
47
54 void setScaleFactor(float newScale) override;
55
61 void updateFullGui() override;
62
63private:
64 SynthPlugin& synth_;
65 bool was_animating_;
66 BorderBoundsConstrainer constrainer_;
67
68 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR(SynthEditor)
69};
A specialized ComponentBoundsConstrainer that applies border constraints and maintains aspect ratios ...
Definition border_bounds_constrainer.h:15
The main editor component for the SynthPlugin audio processor.
Definition synth_editor.h:24
void resized() override
Called when the editor is resized.
Definition synth_editor.cpp:53
void setScaleFactor(float newScale) override
Sets a new scale factor for the GUI.
Definition synth_editor.cpp:59
void paint(Graphics &) override
Paints the editor background.
Definition synth_editor.h:39
SynthEditor(SynthPlugin &synth)
Constructs the SynthEditor.
Definition synth_editor.cpp:13
void updateFullGui() override
Forces a full GUI update.
Definition synth_editor.cpp:65
An interface class linking the Vital synthesizer backend (SynthBase) with a GUI.
Definition synth_gui_interface.h:56
An AudioProcessor implementation for a synthesizer plugin.
Definition synth_plugin.h:26