VCV Rack API
v2
Loading...
Searching...
No Matches
ParamWidget.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <
app/common.hpp
>
3
#include <
widget/OpaqueWidget.hpp
>
4
#include <
ui/Tooltip.hpp
>
5
#include <
ui/Menu.hpp
>
6
#include <
engine/ParamQuantity.hpp
>
7
8
9
namespace
rack
{
10
namespace
app {
11
12
14
struct
ParamWidget
:
widget::OpaqueWidget
{
15
struct
Internal;
16
Internal*
internal
;
17
18
engine::Module
* module = NULL;
19
int
paramId
= -1;
20
21
ParamWidget
();
22
~ParamWidget
();
26
virtual
void
initParamQuantity
() {}
27
engine::ParamQuantity
*
getParamQuantity
();
28
void
createTooltip
();
29
void
destroyTooltip
();
30
31
void
step
()
override
;
32
void
draw
(
const
DrawArgs
& args)
override
;
33
34
void
onButton
(
const
ButtonEvent
& e)
override
;
35
void
onDoubleClick
(
const
DoubleClickEvent
& e)
override
;
36
void
onEnter
(
const
EnterEvent
& e)
override
;
37
void
onLeave
(
const
LeaveEvent
& e)
override
;
38
39
void
createContextMenu
();
45
virtual
void
appendContextMenu
(
ui::Menu
* menu) {}
46
void
resetAction
();
47
};
48
49
50
}
// namespace app
51
}
// namespace rack
Menu.hpp
OpaqueWidget.hpp
ParamQuantity.hpp
Tooltip.hpp
common.hpp
rack
Root namespace for the Rack API.
Definition
AudioDisplay.hpp:9
rack::app::ParamWidget
Manages an engine::Param on a ModuleWidget.
Definition
ParamWidget.hpp:14
rack::app::ParamWidget::ParamWidget
ParamWidget()
rack::app::ParamWidget::initParamQuantity
virtual void initParamQuantity()
Configures ParamQuantity properties based on the type of ParamWidget.
Definition
ParamWidget.hpp:26
rack::app::ParamWidget::onLeave
void onLeave(const LeaveEvent &e) override
rack::app::ParamWidget::appendContextMenu
virtual void appendContextMenu(ui::Menu *menu)
Override to add custom menu items at the bottom of the parameter context menu.
Definition
ParamWidget.hpp:45
rack::app::ParamWidget::onDoubleClick
void onDoubleClick(const DoubleClickEvent &e) override
rack::app::ParamWidget::step
void step() override
Advances the module by one frame.
rack::app::ParamWidget::createTooltip
void createTooltip()
rack::app::ParamWidget::getParamQuantity
engine::ParamQuantity * getParamQuantity()
rack::app::ParamWidget::draw
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
rack::app::ParamWidget::onEnter
void onEnter(const EnterEvent &e) override
rack::app::ParamWidget::createContextMenu
void createContextMenu()
rack::app::ParamWidget::paramId
int paramId
Definition
ParamWidget.hpp:19
rack::app::ParamWidget::destroyTooltip
void destroyTooltip()
rack::app::ParamWidget::onButton
void onButton(const ButtonEvent &e) override
rack::app::ParamWidget::internal
Internal * internal
Definition
ParamWidget.hpp:16
rack::app::ParamWidget::resetAction
void resetAction()
rack::app::ParamWidget::~ParamWidget
~ParamWidget()
rack::engine::Module
DSP processor instance for your module.
Definition
Module.hpp:29
rack::engine::ParamQuantity
A Quantity that wraps an engine::Param.
Definition
ParamQuantity.hpp:21
rack::ui::Menu
Definition
Menu.hpp:11
rack::widget::OpaqueWidget
A Widget that stops propagation of all recursive PositionEvents (such as ButtonEvent) but gives a cha...
Definition
OpaqueWidget.hpp:12
rack::widget::Widget::ButtonEvent
Occurs each mouse button press or release.
Definition
Widget.hpp:237
rack::widget::Widget::DoubleClickEvent
Occurs when the left mouse button is pressed a second time on the same Widget within a time duration.
Definition
Widget.hpp:252
rack::widget::Widget::DrawArgs
Definition
Widget.hpp:141
rack::widget::Widget::EnterEvent
Occurs when a Widget begins consuming the Hover event.
Definition
Widget.hpp:327
rack::widget::Widget::LeaveEvent
Occurs when a different Widget is entered.
Definition
Widget.hpp:333
include
app
ParamWidget.hpp
Generated by
1.12.0