Vital
Loading...
Searching...
No Matches
SynthApplication::MainWindow Class Reference

The main window of the Vital standalone application. More...

Inheritance diagram for SynthApplication::MainWindow:

Public Types

enum  PresetCommand { kSave = 0x5001 , kSaveAs , kOpen , kToggleVideo }
 Enumeration of supported preset-related commands. More...
 

Public Member Functions

 MainWindow (const String &name, bool visible)
 Constructs a MainWindow instance.
 
void closeButtonPressed () override
 Called when the user attempts to close the main window.
 
void loadFile (const File &file)
 Queues a file to be loaded once the application is ready.
 
void shutdownAudio ()
 Shuts down audio processing (e.g., before quitting).
 
ApplicationCommandTarget * getNextCommandTarget () override
 
void getAllCommands (Array< CommandID > &commands) override
 Registers all commands (Save, Save As, Open) that this window can handle.
 
void getCommandInfo (const CommandID commandID, ApplicationCommandInfo &result) override
 Provides metadata and default key bindings for commands.
 
bool perform (const InvocationInfo &info) override
 Executes the given command.
 
void handleAsyncUpdate () override
 Called asynchronously to handle queued operations (like file loading).
 

Detailed Description

The main window of the Vital standalone application.

This window hosts the SynthEditor, which provides the GUI for interacting with the Vital synthesizer engine. It supports file loading, preset saving/loading, and handles various application commands (e.g., open, save).

Member Enumeration Documentation

◆ PresetCommand

Enumeration of supported preset-related commands.

Enumerator
kSave 

Save current preset.

kSaveAs 

Save current preset as a new file.

kOpen 

Open a preset file.

kToggleVideo 

Toggle zoom for recording.

Constructor & Destructor Documentation

◆ MainWindow()

SynthApplication::MainWindow::MainWindow ( const String & name,
bool visible )
inline

Constructs a MainWindow instance.

Initializes the SynthEditor and GUI components. If visible is true, the window will be shown with native title bars and sizing constraints.

Parameters
nameThe name of the window.
visibleWhether the window is visible upon creation.

Member Function Documentation

◆ closeButtonPressed()

void SynthApplication::MainWindow::closeButtonPressed ( )
inlineoverride

Called when the user attempts to close the main window.

This requests that the entire application quit.

◆ getAllCommands()

void SynthApplication::MainWindow::getAllCommands ( Array< CommandID > & commands)
inlineoverride

Registers all commands (Save, Save As, Open) that this window can handle.

Parameters
commandsThe array to populate with available commands.

◆ getCommandInfo()

void SynthApplication::MainWindow::getCommandInfo ( const CommandID commandID,
ApplicationCommandInfo & result )
inlineoverride

Provides metadata and default key bindings for commands.

Parameters
commandIDThe command to describe.
resultThe structure to fill with command info.

◆ getNextCommandTarget()

ApplicationCommandTarget * SynthApplication::MainWindow::getNextCommandTarget ( )
inlineoverride

◆ handleAsyncUpdate()

void SynthApplication::MainWindow::handleAsyncUpdate ( )
inlineoverride

Called asynchronously to handle queued operations (like file loading).

◆ loadFile()

void SynthApplication::MainWindow::loadFile ( const File & file)
inline

Queues a file to be loaded once the application is ready.

Parameters
fileThe file to load.

◆ perform()

bool SynthApplication::MainWindow::perform ( const InvocationInfo & info)
inlineoverride

Executes the given command.

Parameters
infoInformation about the command invocation.
Returns
True if the command was handled successfully, false otherwise.

◆ shutdownAudio()

void SynthApplication::MainWindow::shutdownAudio ( )
inline

Shuts down audio processing (e.g., before quitting).


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