Umsci
Upmix Spatial Control Interface — OCA/OCP.1 spatial audio utility
Loading...
Searching...
No Matches
MainComponent Class Reference

Root JUCE component — the top-level UI that wires together the device connection, the visualisation, and user settings. More...

#include <MainComponent.h>

+ Inheritance diagram for MainComponent:
+ Collaboration diagram for MainComponent:

Public Types

enum  UmsciSettingsOption {
  LookAndFeel_First = 1 ,
  LookAndFeel_FollowHost = LookAndFeel_First ,
  LookAndFeel_Dark ,
  LookAndFeel_Light ,
  LookAndFeel_Last = LookAndFeel_Light ,
  ControlColour_First ,
  ControlColour_Green = ControlColour_First ,
  ControlColour_Red ,
  ControlColour_Blue ,
  ControlColour_Pink ,
  ControlColour_Laser ,
  ControlColour_Last = ControlColour_Laser ,
  ConnectionSettings ,
  FullscreenWindowMode ,
  ControlFormat_First ,
  ControlFormat_Stereo = ControlFormat_First ,
  ControlFormat_LRS ,
  ControlFormat_LCRS ,
  ControlFormat_5point0 ,
  ControlFormat_5point1 ,
  ControlFormat_5point1point2 ,
  ControlFormat_7point0 ,
  ControlFormat_7point1 ,
  ControlFormat_7point1point4 ,
  ControlFormat_9point1point6 ,
  ControlFormat_Last = ControlFormat_9point1point6 ,
  UpmixSettings ,
  ExternalControlSettings ,
  ControlSize_First ,
  ControlSize_S = ControlSize_First ,
  ControlSize_M ,
  ControlSize_L ,
  ControlSize_Last = ControlSize_L
}
 Enumerates every user-selectable setting exposed via the settings menu. More...
 

Public Member Functions

 MainComponent ()
 
 ~MainComponent () override
 
void applySettingsOption (const UmsciSettingsOption &option)
 Applies a single settings option (called from both menu handlers and config restore).
 
void resized () override
 
void paint (juce::Graphics &g) override
 
void lookAndFeelChanged () override
 
bool keyPressed (const juce::KeyPress &key) override
 Handles the Escape key (exits fullscreen) and F key (toggles fullscreen).
 
void performConfigurationDump () override
 UmsciAppConfiguration::Dumper — serialises all current settings to XML.
 
void onConfigUpdated () override
 UmsciAppConfiguration::Watcher — called when the config XML changes on disk.
 
bool isFullscreenEnabled ()
 

Public Attributes

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) can update its own colour scheme. Parameters: (paletteIndex, isDark).
 
std::function< void(bool)> onSetFullscreenWindow
 Fired when the user requests fullscreen mode; the host window applies it.
 

Detailed Description

Root JUCE component — the top-level UI that wires together the device connection, the visualisation, and user settings.

Application architecture overview

JUCEApplication
└── MainWindow
└── MainComponentthis class
├── DeviceController (singleton) ← OCP.1 TCP + DS100 logic
├── UmsciControlComponent ← visualisation (3 stacked layers)
├── UmsciConnectingComponent ← shown during Connecting/Subscribing/GetValues
├── UmsciDiscoveringHintComponent ← shown when no device is configured
└── AboutComponent ← info overlay
Small overlay panel showing the application icon, version info, and a link to the project repository.
Singleton that owns the OCP.1 (AES70) TCP connection to a d&b audiotechnik DS100 device and exposes a...
Root JUCE component — the top-level UI that wires together the device connection, the visualisation,...
Fullscreen progress overlay shown while the OCP.1 connection is being established,...
The main visualisation and interaction surface for Umsci.
Fullscreen overlay shown when no DS100 connection has been configured yet.

Responsibility

Settings option enum

UmsciSettingsOption enumerates every entry in the settings menu. The integer values are used as menu-item IDs in the JUCE popup menu and must not be reordered without updating the corresponding handleSettings* handlers.

Note
[MANUAL CONTEXT NEEDED] A screenshot or wireframe of the UI annotated with component boundaries would greatly help a new developer understand how the overlaid components interact visually.

Definition at line 75 of file MainComponent.h.

Member Enumeration Documentation

◆ UmsciSettingsOption

Enumerates every user-selectable setting exposed via the settings menu.

Values are split into logical groups with First/Last sentinels to allow range-based checks in the menu-result handlers.

Enumerator
LookAndFeel_First 
LookAndFeel_FollowHost 

Inherit host application L&F.

LookAndFeel_Dark 

Force dark colour scheme.

LookAndFeel_Light 

Force light colour scheme.

LookAndFeel_Last 
ControlColour_First 
ControlColour_Green 

Green source icons.

ControlColour_Red 
ControlColour_Blue 
ControlColour_Pink 
ControlColour_Laser 

Bright laser-style highlight.

ControlColour_Last 
ConnectionSettings 

Opens the connection settings dialog.

FullscreenWindowMode 

Toggles fullscreen / windowed.

ControlFormat_First 
ControlFormat_Stereo 
ControlFormat_LRS 
ControlFormat_LCRS 
ControlFormat_5point0 
ControlFormat_5point1 
ControlFormat_5point1point2 
ControlFormat_7point0 
ControlFormat_7point1 
ControlFormat_7point1point4 
ControlFormat_9point1point6 
ControlFormat_Last 
UpmixSettings 

Opens the upmix settings dialog.

ExternalControlSettings 

Opens the external (MIDI) control settings dialog.

ControlSize_First 
ControlSize_S 

Small icons.

ControlSize_M 

Medium icons.

ControlSize_L 

Large icons.

ControlSize_Last 

Definition at line 86 of file MainComponent.h.

Constructor & Destructor Documentation

◆ MainComponent()

◆ ~MainComponent()

MainComponent::~MainComponent ( )
override

Definition at line 351 of file MainComponent.cpp.

Member Function Documentation

◆ applySettingsOption()

void MainComponent::applySettingsOption ( const UmsciSettingsOption option)

Applies a single settings option (called from both menu handlers and config restore).

Definition at line 417 of file MainComponent.cpp.

◆ isFullscreenEnabled()

bool MainComponent::isFullscreenEnabled ( )

Definition at line 1117 of file MainComponent.cpp.

◆ keyPressed()

bool MainComponent::keyPressed ( const juce::KeyPress &  key)
override

Handles the Escape key (exits fullscreen) and F key (toggles fullscreen).

Definition at line 791 of file MainComponent.cpp.

◆ lookAndFeelChanged()

void MainComponent::lookAndFeelChanged ( )
override

Definition at line 387 of file MainComponent.cpp.

Referenced by MainComponent().

◆ onConfigUpdated()

void MainComponent::onConfigUpdated ( )
override

UmsciAppConfiguration::Watcher — called when the config XML changes on disk.

Definition at line 955 of file MainComponent.cpp.

References UmsciAppConfiguration::CONNECTIONCONFIG, UmsciAppConfiguration::CONTROLCOLOUR, UmsciAppConfiguration::CONTROLCONFIG, UmsciAppConfiguration::CONTROLFORMAT, UmsciAppConfiguration::CONTROLSIZE, UmsciAppConfiguration::ENABLED, UmsciAppConfiguration::EXTERNALCONTROLCONFIG, UmsciAppConfiguration::getAttributeName(), UmsciUpmixIndicatorPaintNControlComponent::getShapeForName(), UmsciAppConfiguration::getTagName(), UmsciAppConfiguration::IP, UmsciAppConfiguration::LOOKANDFEEL, UmsciAppConfiguration::MIDI_UPMIXANGLESTRETCH, UmsciAppConfiguration::MIDI_UPMIXHEIGHTSCALE, UmsciAppConfiguration::MIDI_UPMIXOFFSETX, UmsciAppConfiguration::MIDI_UPMIXOFFSETY, UmsciAppConfiguration::MIDI_UPMIXROT, UmsciAppConfiguration::MIDI_UPMIXSCALE, UmsciAppConfiguration::MIDIINPUTDEVICE, UmsciAppConfiguration::OSC_UPMIXANGLESTRETCH, UmsciAppConfiguration::OSC_UPMIXHEIGHTSCALE, UmsciAppConfiguration::OSC_UPMIXOFFSETX, UmsciAppConfiguration::OSC_UPMIXOFFSETY, UmsciAppConfiguration::OSC_UPMIXROT, UmsciAppConfiguration::OSC_UPMIXSCALE, UmsciAppConfiguration::OSCINPUTPORT, UmsciAppConfiguration::PORT, UmsciAppConfiguration::UPMIXCONFIG, UmsciAppConfiguration::UPMIXLIVEMODE, UmsciExternalControlComponent::UpmixMidiParam_COUNT, UmsciAppConfiguration::UPMIXSHAPE, UmsciAppConfiguration::UPMIXSHOWALLSOURCES, UmsciAppConfiguration::UPMIXSNAPSHOTCONFIG, UmsciAppConfiguration::UPMIXSOURCESTARTID, and UmsciAppConfiguration::VISUCONFIG.

◆ paint()

void MainComponent::paint ( juce::Graphics &  g)
override

Definition at line 382 of file MainComponent.cpp.

◆ performConfigurationDump()

void MainComponent::performConfigurationDump ( )
override

UmsciAppConfiguration::Dumper — serialises all current settings to XML.

Definition at line 803 of file MainComponent.cpp.

References UmsciUpmixIndicatorPaintNControlComponent::Circle, UmsciAppConfiguration::CONNECTIONCONFIG, UmsciAppConfiguration::CONTROLCOLOUR, ControlColour_First, ControlColour_Last, UmsciAppConfiguration::CONTROLCONFIG, UmsciAppConfiguration::CONTROLFORMAT, ControlFormat_First, ControlFormat_Last, UmsciAppConfiguration::CONTROLSIZE, ControlSize_First, ControlSize_Last, UmsciAppConfiguration::ENABLED, UmsciAppConfiguration::EXTERNALCONTROLCONFIG, UmsciAppConfiguration::getAttributeName(), UmsciUpmixIndicatorPaintNControlComponent::getShapeName(), UmsciAppConfiguration::getTagName(), UmsciAppConfiguration::IP, UmsciAppConfiguration::LOOKANDFEEL, LookAndFeel_First, LookAndFeel_Last, UmsciAppConfiguration::MIDI_UPMIXANGLESTRETCH, UmsciAppConfiguration::MIDI_UPMIXHEIGHTSCALE, UmsciAppConfiguration::MIDI_UPMIXOFFSETX, UmsciAppConfiguration::MIDI_UPMIXOFFSETY, UmsciAppConfiguration::MIDI_UPMIXROT, UmsciAppConfiguration::MIDI_UPMIXSCALE, UmsciAppConfiguration::MIDIINPUTDEVICE, UmsciAppConfiguration::OSC_UPMIXANGLESTRETCH, UmsciAppConfiguration::OSC_UPMIXHEIGHTSCALE, UmsciAppConfiguration::OSC_UPMIXOFFSETX, UmsciAppConfiguration::OSC_UPMIXOFFSETY, UmsciAppConfiguration::OSC_UPMIXROT, UmsciAppConfiguration::OSC_UPMIXSCALE, UmsciAppConfiguration::OSCINPUTPORT, UmsciAppConfiguration::PORT, UmsciAppConfiguration::UPMIXCONFIG, UmsciAppConfiguration::UPMIXLIVEMODE, UmsciExternalControlComponent::UpmixMidiParam_COUNT, UmsciAppConfiguration::UPMIXSHAPE, UmsciAppConfiguration::UPMIXSHOWALLSOURCES, UmsciAppConfiguration::UPMIXSNAPSHOTCONFIG, UmsciAppConfiguration::UPMIXSOURCESTARTID, and UmsciAppConfiguration::VISUCONFIG.

◆ resized()

void MainComponent::resized ( )
override

Definition at line 356 of file MainComponent.cpp.

Referenced by MainComponent().

Member Data Documentation

◆ onPaletteStyleChange

std::function<void(int, bool)> MainComponent::onPaletteStyleChange

Fired when the look-and-feel palette changes, so the host application (if this is used as a plugin) can update its own colour scheme. Parameters: (paletteIndex, isDark).

Definition at line 153 of file MainComponent.h.

◆ onSetFullscreenWindow

std::function<void(bool)> MainComponent::onSetFullscreenWindow

Fired when the user requests fullscreen mode; the host window applies it.

Definition at line 157 of file MainComponent.h.


The documentation for this class was generated from the following files: