VCV Rack API v2
Loading...
Searching...
No Matches
rack::patch::Manager Struct Reference

Handles the Rack patch file state. More...

#include <patch.hpp>

Public Member Functions

PRIVATE Manager ()
 
PRIVATE ~Manager ()
 
PRIVATE void launch (std::string pathArg)
 
void clear ()
 Clears the patch.
 
void save (std::string path)
 Saves the patch and nothing else.
 
void saveDialog ()
 
void saveAsDialog (bool setPath=true)
 
void saveTemplateDialog ()
 
void saveAutosave ()
 
void clearAutosave ()
 Delete and re-create autosave dir.
 
void cleanAutosave ()
 Clean up nonexistent module patch storage dirs in autosave dir.
 
void load (std::string path)
 Loads a patch and nothing else.
 
void loadTemplate ()
 Loads the template patch file.
 
void loadTemplateDialog ()
 
bool hasAutosave ()
 
void loadAutosave ()
 Loads the patch from the autosave folder.
 
void loadAction (std::string path)
 Loads a patch, sets the current path, and updates the recent patches.
 
void loadDialog ()
 
void loadPathDialog (std::string path)
 
void revertDialog ()
 Asks the user to reload the current patch.
 
void pushRecentPath (std::string path)
 
void disconnectDialog ()
 Disconnects all cables.
 
json_t * toJson ()
 
void fromJson (json_t *rootJ)
 
bool checkUnavailableModulesJson (json_t *rootJ)
 Checks if the JSON patch object contains modules not found in the loaded plugins, and launches a dialog box asking the user to cancel loading.
 

Public Attributes

Internal * internal
 
std::string path
 The currently loaded patch file path.
 
std::string autosavePath
 Path to autosave dir.
 
std::string templatePath
 Path to user template patch.
 
std::string factoryTemplatePath
 Path to factory template patch.
 

Detailed Description

Handles the Rack patch file state.

Constructor & Destructor Documentation

◆ Manager()

PRIVATE rack::patch::Manager::Manager ( )

◆ ~Manager()

PRIVATE rack::patch::Manager::~Manager ( )

Member Function Documentation

◆ launch()

PRIVATE void rack::patch::Manager::launch ( std::string pathArg)

◆ clear()

void rack::patch::Manager::clear ( )

Clears the patch.

◆ save()

void rack::patch::Manager::save ( std::string path)

Saves the patch and nothing else.

◆ saveDialog()

void rack::patch::Manager::saveDialog ( )

◆ saveAsDialog()

void rack::patch::Manager::saveAsDialog ( bool setPath = true)

◆ saveTemplateDialog()

void rack::patch::Manager::saveTemplateDialog ( )

◆ saveAutosave()

void rack::patch::Manager::saveAutosave ( )

◆ clearAutosave()

void rack::patch::Manager::clearAutosave ( )

Delete and re-create autosave dir.

◆ cleanAutosave()

void rack::patch::Manager::cleanAutosave ( )

Clean up nonexistent module patch storage dirs in autosave dir.

◆ load()

void rack::patch::Manager::load ( std::string path)

Loads a patch and nothing else.

Returns whether the patch was loaded successfully.

◆ loadTemplate()

void rack::patch::Manager::loadTemplate ( )

Loads the template patch file.

◆ loadTemplateDialog()

void rack::patch::Manager::loadTemplateDialog ( )

◆ hasAutosave()

bool rack::patch::Manager::hasAutosave ( )

◆ loadAutosave()

void rack::patch::Manager::loadAutosave ( )

Loads the patch from the autosave folder.

Throws if loading failed.

◆ loadAction()

void rack::patch::Manager::loadAction ( std::string path)

Loads a patch, sets the current path, and updates the recent patches.

◆ loadDialog()

void rack::patch::Manager::loadDialog ( )

◆ loadPathDialog()

void rack::patch::Manager::loadPathDialog ( std::string path)

◆ revertDialog()

void rack::patch::Manager::revertDialog ( )

Asks the user to reload the current patch.

◆ pushRecentPath()

void rack::patch::Manager::pushRecentPath ( std::string path)

◆ disconnectDialog()

void rack::patch::Manager::disconnectDialog ( )

Disconnects all cables.

◆ toJson()

json_t * rack::patch::Manager::toJson ( )

◆ fromJson()

void rack::patch::Manager::fromJson ( json_t * rootJ)

◆ checkUnavailableModulesJson()

bool rack::patch::Manager::checkUnavailableModulesJson ( json_t * rootJ)

Checks if the JSON patch object contains modules not found in the loaded plugins, and launches a dialog box asking the user to cancel loading.

Returns whether the user requests to cancel loading the patch.

Member Data Documentation

◆ internal

Internal* rack::patch::Manager::internal

◆ path

std::string rack::patch::Manager::path

The currently loaded patch file path.

◆ autosavePath

std::string rack::patch::Manager::autosavePath

Path to autosave dir.

◆ templatePath

std::string rack::patch::Manager::templatePath

Path to user template patch.

◆ factoryTemplatePath

std::string rack::patch::Manager::factoryTemplatePath

Path to factory template patch.


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