VCV Rack API v2
rack::plugin::Model Struct Reference

Type information for a module. More...

#include <Model.hpp>

Collaboration diagram for rack::plugin::Model:
[legend]

Public Member Functions

virtual ~Model ()
 
virtual engine::ModulecreateModule ()
 Creates a Module. More...
 
virtual app::ModuleWidgetcreateModuleWidget (engine::Module *m)
 Creates a ModuleWidget with a Module attached. More...
 
void fromJson (json_t *rootJ)
 
std::string getFullName ()
 Returns the branded name of the model, e.g. More...
 
std::string getFactoryPresetDirectory ()
 
std::string getUserPresetDirectory ()
 
std::string getManualUrl ()
 Returns the module or plugin manual URL, whichever exists. More...
 
void appendContextMenu (ui::Menu *menu, bool inBrowser=false)
 Appends items to menu with useful Model information. More...
 
bool isFavorite ()
 
void setFavorite (bool favorite)
 

Public Attributes

Pluginplugin = NULL
 
std::string slug
 Must be unique. More...
 
std::string name
 Human readable name for your model, e.g. More...
 
std::list< int > tagIds
 List of tag IDs representing the function(s) of the module. More...
 
std::string description
 A one-line summary of the module's purpose. More...
 
std::string manualUrl
 The manual of the module. More...
 
std::string modularGridUrl
 
bool hidden = false
 Hides model from the Module Browser but able to be loaded from a patch file. More...
 

Detailed Description

Type information for a module.

Factory for Module and ModuleWidget.

Constructor & Destructor Documentation

◆ ~Model()

virtual rack::plugin::Model::~Model ( )
inlinevirtual

Member Function Documentation

◆ createModule()

virtual engine::Module * rack::plugin::Model::createModule ( )
inlinevirtual

Creates a Module.

◆ createModuleWidget()

virtual app::ModuleWidget * rack::plugin::Model::createModuleWidget ( engine::Module m)
inlinevirtual

Creates a ModuleWidget with a Module attached.

Module may be NULL.

◆ fromJson()

void rack::plugin::Model::fromJson ( json_t *  rootJ)

◆ getFullName()

std::string rack::plugin::Model::getFullName ( )

Returns the branded name of the model, e.g.

VCV VCO-1.

◆ getFactoryPresetDirectory()

std::string rack::plugin::Model::getFactoryPresetDirectory ( )

◆ getUserPresetDirectory()

std::string rack::plugin::Model::getUserPresetDirectory ( )

◆ getManualUrl()

std::string rack::plugin::Model::getManualUrl ( )

Returns the module or plugin manual URL, whichever exists.

◆ appendContextMenu()

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.

◆ isFavorite()

bool rack::plugin::Model::isFavorite ( )

◆ setFavorite()

void rack::plugin::Model::setFavorite ( bool  favorite)

Member Data Documentation

◆ plugin

Plugin* rack::plugin::Model::plugin = NULL

◆ slug

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.

◆ name

std::string rack::plugin::Model::name

Human readable name for your model, e.g.

"Voltage Controlled Oscillator"

◆ tagIds

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.

◆ description

std::string rack::plugin::Model::description

A one-line summary of the module's purpose.

◆ manualUrl

std::string rack::plugin::Model::manualUrl

The manual of the module.

HTML, PDF, or GitHub readme/wiki are fine.

◆ modularGridUrl

std::string rack::plugin::Model::modularGridUrl

◆ hidden

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.


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