76 public UmsciAppConfiguration::Dumper,
77 public UmsciAppConfiguration::Watcher
132 void paint(juce::Graphics& g)
override;
136 bool keyPressed(
const juce::KeyPress& key)
override;
161 void handleSettingsMenuResult(
int selectedId);
162 void handleSettingsLookAndFeelMenuResult(
int selectedId);
163 void handleSettingsControlColourMenuResult(
int selectedId);
164 void handleSettingsControlFormatMenuResult(
int selectedId);
165 void handleSettingsControlSizeMenuResult(
int selectedId);
166 void handleSettingsFullscreenModeToggleResult();
167 void showConnectionSettings();
168 void showUpmixSettings();
169 void showExternalControlSettings();
177 void setControlColour(
const juce::Colour& meteringColour);
178 void applyControlColour();
180 void toggleFullscreenMode();
183 std::unique_ptr<UmsciControlComponent> m_controlComponent;
184 std::unique_ptr<UmsciDiscoveringHintComponent> m_discoverHintComponent;
185 std::unique_ptr<UmsciConnectingComponent> m_connectingComponent;
187 std::unique_ptr<juce::DrawableButton> m_settingsButton;
188 std::map<int, std::pair<std::string, int>> m_settingsItems;
189 int m_settingsHostLookAndFeelId = -1;
191 std::unique_ptr<juce::DrawableButton> m_connectionToggleButton;
193 std::unique_ptr<juce::DrawableButton> m_aboutButton;
194 std::unique_ptr<AboutComponent> m_aboutComponent;
199 float rot { 0.0f }, scale { 1.0f }, heightScale { 0.6f },
200 angleStretch { 1.0f }, offsetX { 0.0f }, offsetY { 0.0f };
202 juce::String toString()
const
204 return "rot=" + juce::String(rot)
205 +
";scale=" + juce::String(scale)
206 +
";heightScale=" + juce::String(heightScale)
207 +
";angleStretch=" + juce::String(angleStretch)
208 +
";offsetX=" + juce::String(offsetX)
209 +
";offsetY=" + juce::String(offsetY);
212 static UpmixSnapshot fromString(
const juce::String& s)
215 for (
auto& token : juce::StringArray::fromTokens(s,
";",
""))
217 auto kv = juce::StringArray::fromTokens(token.trim(),
"=",
"");
218 if (kv.size() != 2)
continue;
219 auto key = kv[0].trim();
220 auto val = kv[1].trim().getFloatValue();
221 if (key ==
"rot") p.rot = val;
222 else if (key ==
"scale") p.scale = val;
223 else if (key ==
"heightScale") p.heightScale = val;
224 else if (key ==
"angleStretch")p.angleStretch= val;
225 else if (key ==
"offsetX") p.offsetX = val;
226 else if (key ==
"offsetY") p.offsetY = val;
231 std::optional<UpmixSnapshot> m_upmixSnapshot;
232 std::unique_ptr<juce::DrawableButton> m_upmixSnapshotStoreButton;
233 std::unique_ptr<juce::DrawableButton> m_upmixSnapshotRecallButton;
235 std::unique_ptr<juce::AlertWindow> m_messageBox;
236 std::unique_ptr<UmsciZeroconfDiscoverComboComponent> m_zeroconfDiscoverComboComponent;
237 std::unique_ptr<UmsciExternalControlComponent> m_externalControlComponent;
239 juce::Colour m_controlColour = juce::Colours::forestgreen;
241 std::unique_ptr<UmsciAppConfiguration> m_config;
244 std::unique_ptr<MidiController> m_midiController;
245 std::unique_ptr<OscController> m_oscController;
Root JUCE component — the top-level UI that wires together the device connection, the visualisation,...
void paint(juce::Graphics &g) override
void performConfigurationDump() override
UmsciAppConfiguration::Dumper — serialises all current settings to XML.
void applySettingsOption(const UmsciSettingsOption &option)
Applies a single settings option (called from both menu handlers and config restore).
std::function< void(int, bool)> onPaletteStyleChange
Fired when the look-and-feel palette changes, so the host application (if this is used as a plugin) c...
void lookAndFeelChanged() override
UmsciSettingsOption
Enumerates every user-selectable setting exposed via the settings menu.
@ UpmixSettings
Opens the upmix settings dialog.
@ ControlFormat_7point1point4
@ FullscreenWindowMode
Toggles fullscreen / windowed.
@ LookAndFeel_Light
Force light colour scheme.
@ ControlFormat_5point1point2
@ ControlFormat_9point1point6
@ ControlColour_Laser
Bright laser-style highlight.
@ ExternalControlSettings
Opens the external (MIDI) control settings dialog.
@ ConnectionSettings
Opens the connection settings dialog.
@ LookAndFeel_FollowHost
Inherit host application L&F.
@ LookAndFeel_Dark
Force dark colour scheme.
bool keyPressed(const juce::KeyPress &key) override
Handles the Escape key (exits fullscreen) and F key (toggles fullscreen).
void onConfigUpdated() override
UmsciAppConfiguration::Watcher — called when the config XML changes on disk.
bool isFullscreenEnabled()
std::function< void(bool)> onSetFullscreenWindow
Fired when the user requests fullscreen mode; the host window applies it.
~MainComponent() override