VCV Rack API v2
|
Type information for a module. More...
#include <Model.hpp>
Public Member Functions | |
virtual | ~Model () |
virtual engine::Module * | createModule () |
Creates a Module. | |
virtual app::ModuleWidget * | createModuleWidget (engine::Module *m) |
Creates a ModuleWidget with a Module attached. | |
void | fromJson (json_t *rootJ) |
std::string | getFullName () |
Returns the branded name of the model, e.g. | |
std::string | getFactoryPresetDirectory () |
std::string | getUserPresetDirectory () |
std::string | getManualUrl () |
Returns the module or plugin manual URL, whichever exists. | |
void | appendContextMenu (ui::Menu *menu, bool inBrowser=false) |
Appends items to menu with useful Model information. | |
bool | isFavorite () |
void | setFavorite (bool favorite) |
Public Attributes | |
Plugin * | plugin = NULL |
std::string | slug |
Must be unique. | |
std::string | name |
Human readable name for your model, e.g. | |
std::list< int > | tagIds |
List of tag IDs representing the function(s) of the module. | |
std::string | description |
A one-line summary of the module's purpose. | |
std::string | manualUrl |
The manual of the module. | |
std::string | modularGridUrl |
bool | hidden = false |
Hides model from the Module Browser but able to be loaded from a patch file. | |
Type information for a module.
Factory for Module and ModuleWidget.
|
inlinevirtual |
|
inlinevirtual |
Creates a Module.
|
inlinevirtual |
Creates a ModuleWidget with a Module attached.
Module may be NULL.
void rack::plugin::Model::fromJson | ( | json_t * | rootJ | ) |
std::string rack::plugin::Model::getFullName | ( | ) |
Returns the branded name of the model, e.g.
VCV VCO-1.
std::string rack::plugin::Model::getFactoryPresetDirectory | ( | ) |
std::string rack::plugin::Model::getUserPresetDirectory | ( | ) |
std::string rack::plugin::Model::getManualUrl | ( | ) |
Returns the module or plugin manual URL, whichever exists.
void rack::plugin::Model::appendContextMenu | ( | ui::Menu * | menu, |
bool | inBrowser = false ) |
Appends items to menu with useful Model information.
Enable inBrowser
to show Module Browser key commands.
bool rack::plugin::Model::isFavorite | ( | ) |
void rack::plugin::Model::setFavorite | ( | bool | favorite | ) |
Plugin* rack::plugin::Model::plugin = NULL |
std::string rack::plugin::Model::slug |
Must be unique.
Used for saving patches. Never change this after releasing your module. The model slug must be unique within your plugin, but it doesn't need to be unique among different plugins.
std::string rack::plugin::Model::name |
Human readable name for your model, e.g.
"Voltage Controlled Oscillator"
std::list<int> rack::plugin::Model::tagIds |
List of tag IDs representing the function(s) of the module.
Tag IDs are not part of the ABI and may change at any time.
std::string rack::plugin::Model::description |
A one-line summary of the module's purpose.
std::string rack::plugin::Model::manualUrl |
The manual of the module.
HTML, PDF, or GitHub readme/wiki are fine.
std::string rack::plugin::Model::modularGridUrl |
bool rack::plugin::Model::hidden = false |
Hides model from the Module Browser but able to be loaded from a patch file.
Useful for deprecating modules without breaking old patches.