VCV Rack API v2
Loading...
Searching...
No Matches
settings.hpp File Reference
#include <vector>
#include <set>
#include <map>
#include <list>
#include <tuple>
#include <jansson.h>
#include <common.hpp>
#include <math.hpp>
#include <color.hpp>
Include dependency graph for settings.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  rack::settings::ModuleInfo
 
struct  rack::settings::PluginWhitelist
 The VCV JSON API returns the data structure {pluginSlug: [moduleSlugs] or true} where "true" represents that the user is subscribed to the plugin (all modules and future modules). More...
 

Namespaces

namespace  rack
 Root namespace for the Rack API.
 
namespace  rack::settings
 Process-scope globals, most of which are persisted across launches.
 

Enumerations

enum  rack::settings::KnobMode { rack::settings::KNOB_MODE_LINEAR , rack::settings::KNOB_MODE_SCALED_LINEAR , rack::settings::KNOB_MODE_ROTARY_ABSOLUTE , rack::settings::KNOB_MODE_ROTARY_RELATIVE }
 
enum  rack::settings::BrowserSort {
  rack::settings::BROWSER_SORT_UPDATED , rack::settings::BROWSER_SORT_LAST_USED , rack::settings::BROWSER_SORT_MOST_USED , rack::settings::BROWSER_SORT_BRAND ,
  rack::settings::BROWSER_SORT_NAME , rack::settings::BROWSER_SORT_RANDOM
}
 

Functions

ModuleInforack::settings::getModuleInfo (const std::string &pluginSlug, const std::string &moduleSlug)
 Returns a ModuleInfo if exists for the given slugs.
 
bool rack::settings::isModuleWhitelisted (const std::string &pluginSlug, const std::string &moduleSlug)
 
void rack::settings::resetCables ()
 
PRIVATE void rack::settings::init ()
 
PRIVATE void rack::settings::destroy ()
 
PRIVATE json_t * rack::settings::toJson ()
 
PRIVATE void rack::settings::fromJson (json_t *rootJ)
 
PRIVATE void rack::settings::save (std::string path="")
 
PRIVATE void rack::settings::load (std::string path="")
 

Variables

std::string rack::settings::settingsPath
 Path to settings.json.
 
bool rack::settings::devMode
 
bool rack::settings::headless
 
bool rack::settings::isPlugin
 
bool rack::settings::safeMode
 Launches Rack without loading plugins or the autosave patch.
 
std::string rack::settings::token
 vcvrack.com user token
 
bool rack::settings::windowMaximized
 Whether the window is maximized.
 
math::Vec rack::settings::windowSize
 Size of window in pixels.
 
math::Vec rack::settings::windowPos
 Position in window in pixels.
 
bool rack::settings::invertZoom
 Reverse the zoom scroll direction.
 
bool rack::settings::mouseWheelZoom
 Mouse wheel zooms instead of pans.
 
float rack::settings::pixelRatio
 Ratio between UI pixel and physical screen pixel.
 
std::string rack::settings::uiTheme
 Name of UI theme, specified in ui::refreshTheme()
 
float rack::settings::cableOpacity
 Opacity of cables in the range [0, 1].
 
float rack::settings::cableTension
 Straightness of cables in the range [0, 1].
 
float rack::settings::rackBrightness
 
float rack::settings::haloBrightness
 
bool rack::settings::allowCursorLock
 Allows rack to hide and lock the cursor position when dragging knobs etc.
 
KnobMode rack::settings::knobMode
 
bool rack::settings::knobScroll
 
float rack::settings::knobLinearSensitivity
 
float rack::settings::knobScrollSensitivity
 
float rack::settings::sampleRate
 
int rack::settings::threadCount
 
bool rack::settings::tooltips
 
bool rack::settings::cpuMeter
 
bool rack::settings::lockModules
 
bool rack::settings::squeezeModules
 
bool rack::settings::preferDarkPanels
 
float rack::settings::frameRateLimit
 Maximum screen redraw frequency in Hz, or 0 for unlimited.
 
float rack::settings::autosaveInterval
 Interval between autosaves in seconds.
 
bool rack::settings::skipLoadOnLaunch
 
std::list< std::string > rack::settings::recentPatchPaths
 
std::vector< NVGcolor > rack::settings::cableColors
 
std::vector< std::string > rack::settings::cableLabels
 
bool rack::settings::cableAutoRotate
 
bool rack::settings::autoCheckUpdates
 
bool rack::settings::verifyHttpsCerts
 
bool rack::settings::showTipsOnLaunch
 
int rack::settings::tipIndex
 
BrowserSort rack::settings::browserSort
 
float rack::settings::browserZoom
 
json_t * rack::settings::pluginSettingsJ
 
std::map< std::string, std::map< std::string, ModuleInfo > > rack::settings::moduleInfos
 pluginSlug -> (moduleSlug -> ModuleInfo)
 
std::map< std::string, PluginWhitelistrack::settings::moduleWhitelist