@@ -4,6 +4,9 @@ all: doxygen | |||||
doxygen: | doxygen: | ||||
doxygen Doxyfile | doxygen Doxyfile | ||||
run: doxygen | |||||
http-server html | |||||
upload: doxygen | upload: doxygen | ||||
rsync html/ vcvrack.com:vcvrack.com/docs/ -ruvz --delete | rsync html/ vcvrack.com:vcvrack.com/docs/ -ruvz --delete | ||||
@@ -28,6 +28,8 @@ struct Window; | |||||
struct PatchManager; | struct PatchManager; | ||||
/** Rack-specific GUI widgets and functions that control and offer feedback for the rack state. | |||||
*/ | |||||
namespace app { | namespace app { | ||||
@@ -12,6 +12,7 @@ namespace rack { | |||||
namespace app { | namespace app { | ||||
/** Manages an engine::Module in the rack. */ | |||||
struct ModuleWidget : widget::OpaqueWidget { | struct ModuleWidget : widget::OpaqueWidget { | ||||
plugin::Model *model = NULL; | plugin::Model *model = NULL; | ||||
/** Owns the module pointer */ | /** Owns the module pointer */ | ||||
@@ -8,7 +8,7 @@ namespace rack { | |||||
namespace app { | namespace app { | ||||
/** A ui::Quantity that wraps an engine Param */ | |||||
/** A ui::Quantity that wraps an engine::Param. */ | |||||
struct ParamQuantity : ui::Quantity { | struct ParamQuantity : ui::Quantity { | ||||
engine::Module *module = NULL; | engine::Module *module = NULL; | ||||
int paramId = 0; | int paramId = 0; | ||||
@@ -10,6 +10,7 @@ namespace rack { | |||||
namespace app { | namespace app { | ||||
/** Manages an engine::Param on a ModuleWidget. */ | |||||
struct ParamWidget : widget::OpaqueWidget { | struct ParamWidget : widget::OpaqueWidget { | ||||
ParamQuantity *paramQuantity = NULL; | ParamQuantity *paramQuantity = NULL; | ||||
float dirtyValue = NAN; | float dirtyValue = NAN; | ||||
@@ -9,6 +9,7 @@ namespace rack { | |||||
namespace app { | namespace app { | ||||
/** Manages an engine::Port on a ModuleWidget. */ | |||||
struct PortWidget : widget::OpaqueWidget { | struct PortWidget : widget::OpaqueWidget { | ||||
engine::Module *module = NULL; | engine::Module *module = NULL; | ||||
int portId; | int portId; | ||||
@@ -12,6 +12,7 @@ namespace rack { | |||||
namespace app { | namespace app { | ||||
/** Container for ModuleWidget and CableWidget. */ | |||||
struct RackWidget : widget::OpaqueWidget { | struct RackWidget : widget::OpaqueWidget { | ||||
widget::FramebufferWidget *rails; | widget::FramebufferWidget *rails; | ||||
widget::Widget *moduleContainer; | widget::Widget *moduleContainer; | ||||
@@ -11,6 +11,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Audio driver | |||||
*/ | |||||
namespace audio { | namespace audio { | ||||
@@ -5,6 +5,9 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Utilities for `NVGcolor` | |||||
*/ | |||||
namespace color { | namespace color { | ||||
@@ -3,6 +3,16 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Component Library by [Grayscale](https://grayscale.info/). | |||||
Copied from `LICENSE.md`: | |||||
The **Component Library graphics** in the `res/ComponentLibrary` directory are copyright © 2019 [Grayscale](http://grayscale.info/) and licensed under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/). | |||||
You may not freely sell plugins using Component Library graphics. | |||||
However, a free commercial license is available for plugins sold through the [VCV Store](https://vcvrack.com/plugins.html). | |||||
Email contact@vcvrack.com for more information about licensing or the VCV Store. | |||||
*/ | |||||
namespace component { | namespace component { | ||||
@@ -3,6 +3,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Digital signal processing routines for plugins | |||||
*/ | |||||
namespace dsp { | namespace dsp { | ||||
@@ -39,7 +39,7 @@ struct Module { | |||||
void randomize(); | void randomize(); | ||||
/** Advances the module by one audio sample. | /** Advances the module by one audio sample. | ||||
Override this method to read Inputs and Params, and to write Outputs and Lights. | |||||
Override this method to read Inputs and Params and to write Outputs and Lights. | |||||
*/ | */ | ||||
virtual void step() {} | virtual void step() {} | ||||
@@ -12,6 +12,8 @@ namespace widget { | |||||
} // namespace widget | } // namespace widget | ||||
/** Event state machine for Widgets | |||||
*/ | |||||
namespace event { | namespace event { | ||||
@@ -3,6 +3,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Gamepad/joystick/controller MIDI driver | |||||
*/ | |||||
namespace gamepad { | namespace gamepad { | ||||
@@ -16,6 +16,7 @@ namespace app { | |||||
} // namespace app | } // namespace app | ||||
/** Undo history actions for the Rack application */ | |||||
namespace history { | namespace history { | ||||
@@ -3,6 +3,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Computer keyboard MIDI driver | |||||
*/ | |||||
namespace keyboard { | namespace keyboard { | ||||
@@ -13,6 +13,10 @@ will print something like | |||||
namespace rack { | namespace rack { | ||||
/** Logs messages to a file or the console with decoration | |||||
*/ | |||||
namespace logger { | namespace logger { | ||||
@@ -25,7 +29,9 @@ enum Level { | |||||
void init(bool devMode); | void init(bool devMode); | ||||
void destroy(); | void destroy(); | ||||
/** Do not use this function directly. Use the macros below. */ | |||||
/** Do not use this function directly. Use the macros below. | |||||
Thread-safe. | |||||
*/ | |||||
void log(Level level, const char *filename, int line, const char *format, ...); | void log(Level level, const char *filename, int line, const char *format, ...); | ||||
@@ -4,6 +4,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Supplemental `<cmath>` functions and types | |||||
*/ | |||||
namespace math { | namespace math { | ||||
@@ -7,6 +7,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** MIDI driver | |||||
*/ | |||||
namespace midi { | namespace midi { | ||||
@@ -4,6 +4,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Networking functions for HTTP requests, URLs, and downloads | |||||
*/ | |||||
namespace network { | namespace network { | ||||
@@ -7,6 +7,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Plugin loader and plugin manager | |||||
*/ | |||||
namespace plugin { | namespace plugin { | ||||
@@ -4,6 +4,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Random number generator | |||||
*/ | |||||
namespace random { | namespace random { | ||||
@@ -11,6 +15,7 @@ namespace random { | |||||
void init(); | void init(); | ||||
/** Returns a uniform random uint32_t from 0 to UINT32_MAX */ | /** Returns a uniform random uint32_t from 0 to UINT32_MAX */ | ||||
uint32_t u32(); | uint32_t u32(); | ||||
/** Returns a uniform random uint64_t from 0 to UINT64_MAX */ | |||||
uint64_t u64(); | uint64_t u64(); | ||||
/** Returns a uniform random float in the interval [0.0, 1.0) */ | /** Returns a uniform random float in the interval [0.0, 1.0) */ | ||||
float uniform(); | float uniform(); | ||||
@@ -3,6 +3,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Supplemental `std::string` functions | |||||
*/ | |||||
namespace string { | namespace string { | ||||
@@ -4,20 +4,33 @@ | |||||
namespace rack { | namespace rack { | ||||
/** Cross-platform functions for operating systems routines | |||||
*/ | |||||
namespace system { | namespace system { | ||||
/** Returns a list of all entries (directories, files, symbols) in a directory. */ | |||||
std::list<std::string> listEntries(const std::string &path); | std::list<std::string> listEntries(const std::string &path); | ||||
/** Returns whether the given path is a file. */ | |||||
bool isFile(const std::string &path); | bool isFile(const std::string &path); | ||||
/** Returns whether the given path is a directory. */ | |||||
bool isDirectory(const std::string &path); | bool isDirectory(const std::string &path); | ||||
/** Copies a file. */ | |||||
void copyFile(const std::string &srcPath, const std::string &destPath); | void copyFile(const std::string &srcPath, const std::string &destPath); | ||||
/** Creates a directory. | |||||
The parent directory must exist. | |||||
*/ | |||||
void createDirectory(const std::string &path); | void createDirectory(const std::string &path); | ||||
/** Returns the number of logical simultaneous multithreading (SMT) (e.g. Intel Hyperthreaded) threads on the CPU. */ | |||||
int getLogicalCoreCount(); | int getLogicalCoreCount(); | ||||
/** Sets a name of the current thread for debuggers and OS-specific process viewers. */ | |||||
void setThreadName(const std::string &name); | void setThreadName(const std::string &name); | ||||
/** Sets the current thread to be high-priority. */ | |||||
void setThreadRealTime(); | void setThreadRealTime(); | ||||
/** Returns the caller's human-readable stack trace with "\n"-separated lines. */ | |||||
std::string getStackTrace(); | std::string getStackTrace(); | ||||
/** Opens a URL, also happens to work with PDFs and folders. | /** Opens a URL, also happens to work with PDFs and folders. | ||||
Shell injection is possible, so make sure the URL is trusted or hard coded. | Shell injection is possible, so make sure the URL is trusted or hard coded. | ||||
May block, so open in a new thread. | May block, so open in a new thread. | ||||
@@ -4,6 +4,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** General user interface widgets using Blendish | |||||
*/ | |||||
namespace ui { | namespace ui { | ||||
@@ -6,7 +6,7 @@ namespace rack { | |||||
namespace widget { | namespace widget { | ||||
/** Caches a widget's draw() result to a framebuffer so it is called less frequently | |||||
/** Caches a widget's draw() result to a framebuffer so it is called less frequently. | |||||
When `dirty` is true, its children will be re-rendered on the next call to step() override. | When `dirty` is true, its children will be re-rendered on the next call to step() override. | ||||
Events are not passed to the underlying scene. | Events are not passed to the underlying scene. | ||||
*/ | */ | ||||
@@ -6,7 +6,7 @@ namespace rack { | |||||
namespace widget { | namespace widget { | ||||
/** Widget that consumes recursing events without giving a chance for children to consume. | |||||
/** A Widget that consumes recursing events without giving a chance for children to consume. | |||||
*/ | */ | ||||
struct ObstructWidget : Widget { | struct ObstructWidget : Widget { | ||||
void onHover(const event::Hover &e) override { | void onHover(const event::Hover &e) override { | ||||
@@ -21,15 +21,9 @@ struct ObstructWidget : Widget { | |||||
void onHoverText(const event::HoverText &e) override { | void onHoverText(const event::HoverText &e) override { | ||||
e.consume(this); | e.consume(this); | ||||
} | } | ||||
void onHoverScroll(const event::HoverScroll &e) override { | |||||
e.consume(this); | |||||
} | |||||
void onDragHover(const event::DragHover &e) override { | void onDragHover(const event::DragHover &e) override { | ||||
e.consume(this); | e.consume(this); | ||||
} | } | ||||
void onPathDrop(const event::PathDrop &e) override { | |||||
e.consume(this); | |||||
} | |||||
}; | }; | ||||
@@ -6,7 +6,7 @@ namespace rack { | |||||
namespace widget { | namespace widget { | ||||
/** Widget that consumes recursing events but gives a chance for children to consume first. | |||||
/** A Widget that consumes recursing events but gives a chance for children to consume first. | |||||
You can of course override the events. | You can of course override the events. | ||||
You may also call OpaqueWidget::on*() from the overridden method to continue recursing/consuming the event. | You may also call OpaqueWidget::on*() from the overridden method to continue recursing/consuming the event. | ||||
*/ | */ | ||||
@@ -6,11 +6,15 @@ namespace rack { | |||||
namespace widget { | namespace widget { | ||||
/** A FramebufferWidget that can be drawn on with OpenGL commands */ | |||||
struct OpenGlWidget : FramebufferWidget { | struct OpenGlWidget : FramebufferWidget { | ||||
/** Draws every frame by default | /** Draws every frame by default | ||||
Override this to restore the default behavior of FramebufferWidget. | |||||
Override this and call `FramebufferWidget::step()` to restore the default behavior of FramebufferWidget. | |||||
*/ | */ | ||||
void step() override; | void step() override; | ||||
/** Draws to the framebuffer. | |||||
Override to initialize, draw, and flush the OpenGL state. | |||||
*/ | |||||
void drawFramebuffer() override; | void drawFramebuffer() override; | ||||
}; | }; | ||||
@@ -7,7 +7,7 @@ namespace rack { | |||||
namespace widget { | namespace widget { | ||||
/** Draws an SVG */ | |||||
/** Draws an Svg */ | |||||
struct SvgWidget : Widget { | struct SvgWidget : Widget { | ||||
std::shared_ptr<Svg> svg; | std::shared_ptr<Svg> svg; | ||||
@@ -6,7 +6,7 @@ namespace rack { | |||||
namespace widget { | namespace widget { | ||||
/** Widget that does not respond to events and does not pass events to children */ | |||||
/** A Widget that does not respond to events and does not pass events to children */ | |||||
struct TransparentWidget : Widget { | struct TransparentWidget : Widget { | ||||
/** Override behavior to do nothing instead. */ | /** Override behavior to do nothing instead. */ | ||||
void onHover(const event::Hover &e) override {} | void onHover(const event::Hover &e) override {} | ||||
@@ -8,6 +8,10 @@ | |||||
namespace rack { | namespace rack { | ||||
/** General UI widgets | |||||
*/ | |||||
namespace widget { | namespace widget { | ||||
@@ -17,7 +21,9 @@ struct DrawContext { | |||||
}; | }; | ||||
/** A node in the 2D scene graph | |||||
/** A node in the 2D [scene graph](https://en.wikipedia.org/wiki/Scene_graph). | |||||
The bounding box of a Widget is a rectangle specified by `box` relative to their parent. | |||||
The appearance is defined by overriding `draw()`, and the behavior is defined by overriding `step()` and `on*()` event handlers. | |||||
*/ | */ | ||||
struct Widget { | struct Widget { | ||||
/** Stores position and size */ | /** Stores position and size */ | ||||
@@ -6,6 +6,7 @@ namespace rack { | |||||
namespace widget { | namespace widget { | ||||
/** A Widget with a dynamic zoom level. */ | |||||
struct ZoomWidget : Widget { | struct ZoomWidget : Widget { | ||||
float zoom = 1.f; | float zoom = 1.f; | ||||
@@ -42,6 +42,7 @@ namespace rack { | |||||
struct Font { | struct Font { | ||||
NVGcontext *vg; | NVGcontext *vg; | ||||
int handle; | int handle; | ||||
/** Don't call this directly but instead use `APP->window->loadFont()` */ | |||||
Font(NVGcontext *vg, const std::string &filename); | Font(NVGcontext *vg, const std::string &filename); | ||||
~Font(); | ~Font(); | ||||
/** Use `APP->window->loadFont()` instead. */ | /** Use `APP->window->loadFont()` instead. */ | ||||
@@ -51,6 +52,7 @@ struct Font { | |||||
struct Image { | struct Image { | ||||
NVGcontext *vg; | NVGcontext *vg; | ||||
int handle; | int handle; | ||||
/** Don't call this directly but instead use `APP->window->loadImage()` */ | |||||
Image(NVGcontext *vg, const std::string &filename); | Image(NVGcontext *vg, const std::string &filename); | ||||
~Image(); | ~Image(); | ||||
/** Use `APP->window->loadImage()` instead. */ | /** Use `APP->window->loadImage()` instead. */ | ||||
@@ -59,6 +61,7 @@ struct Image { | |||||
struct Svg { | struct Svg { | ||||
NSVGimage *handle; | NSVGimage *handle; | ||||
/** Don't call this directly but instead use `APP->window->loadSvg()` */ | |||||
Svg(const std::string &filename); | Svg(const std::string &filename); | ||||
~Svg(); | ~Svg(); | ||||
/** Use `APP->window->loadSvg()` instead. */ | /** Use `APP->window->loadSvg()` instead. */ | ||||