Loading [MathJax]/extensions/tex2jax.js
VCV Rack API v2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Switch.hpp
Go to the documentation of this file.
1#pragma once
2#include <app/common.hpp>
3#include <app/ParamWidget.hpp>
4
5
6namespace rack {
7namespace app {
8
9
16 struct Internal;
17 Internal* internal;
18
21 bool momentary = false;
22
25 void initParamQuantity() override;
26 void step() override;
27 void onDoubleClick(const DoubleClickEvent& e) override;
28 void onDragStart(const DragStartEvent& e) override;
29 void onDragEnd(const DragEndEvent& e) override;
30};
31
32
33} // namespace app
34} // namespace rack
Rack's custom UI widgets that control the Rack state and engine.
Definition AudioDisplay.hpp:10
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
void onDragStart(const DragStartEvent &e) override
Internal * internal
Definition Switch.hpp:17
void step() override
Advances the module by one frame.
void initParamQuantity() override
Configures ParamQuantity properties based on the type of ParamWidget.
bool momentary
Instead of incrementing values on each click, sets maxValue on press and minValue on release.
Definition Switch.hpp:21
void onDragEnd(const DragEndEvent &e) override
void onDoubleClick(const DoubleClickEvent &e) override
Occurs when the left mouse button is pressed a second time on the same Widget within a time duration.
Definition Widget.hpp:252
Occurs when a Widget stops being dragged by releasing the mouse button.
Definition Widget.hpp:381
Occurs when a Widget begins being dragged.
Definition Widget.hpp:375