VCV Rack API v2
Loading...
Searching...
No Matches
PortWidget.hpp
Go to the documentation of this file.
1#pragma once
2#include <app/common.hpp>
4#include <ui/Tooltip.hpp>
5#include <engine/Module.hpp>
6#include <engine/PortInfo.hpp>
7
8
9namespace rack {
10namespace app {
11
12
15 struct Internal;
16 Internal* internal;
17
18 engine::Module* module = NULL;
20 int portId = -1;
21
29 virtual void appendContextMenu(ui::Menu* menu) {}
31
32 void step() override;
33 void draw(const DrawArgs& args) override;
34
35 void onButton(const ButtonEvent& e) override;
36 void onEnter(const EnterEvent& e) override;
37 void onLeave(const LeaveEvent& e) override;
38 void onDragStart(const DragStartEvent& e) override;
39 void onDragEnd(const DragEndEvent& e) override;
40 void onDragDrop(const DragDropEvent& e) override;
41 void onDragEnter(const DragEnterEvent& e) override;
42 void onDragLeave(const DragLeaveEvent& e) override;
43};
44
45
46} // namespace app
47} // namespace rack
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
Manages an engine::Port on a ModuleWidget.
Definition PortWidget.hpp:14
void onDragEnd(const DragEndEvent &e) override
Internal * internal
Definition PortWidget.hpp:16
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
virtual void appendContextMenu(ui::Menu *menu)
Definition PortWidget.hpp:29
engine::Port::Type type
Definition PortWidget.hpp:19
void onDragStart(const DragStartEvent &e) override
void step() override
Advances the module by one frame.
void onButton(const ButtonEvent &e) override
engine::PortInfo * getPortInfo()
void onDragLeave(const DragLeaveEvent &e) override
int portId
Definition PortWidget.hpp:20
void onDragEnter(const DragEnterEvent &e) override
engine::Port * getPort()
void onLeave(const LeaveEvent &e) override
void onDragDrop(const DragDropEvent &e) override
void onEnter(const EnterEvent &e) override
DSP processor instance for your module.
Definition Module.hpp:29
Definition PortInfo.hpp:13
Definition Port.hpp:14
Type
Definition Port.hpp:37
@ INPUT
Definition Port.hpp:38
Definition Menu.hpp:11
A Widget that stops propagation of all recursive PositionEvents (such as ButtonEvent) but gives a cha...
Definition OpaqueWidget.hpp:12
Occurs each mouse button press or release.
Definition Widget.hpp:237
Occurs when the mouse button is released over a Widget while dragging.
Definition Widget.hpp:423
Occurs when a Widget stops being dragged by releasing the mouse button.
Definition Widget.hpp:375
Occurs when the mouse enters a Widget while dragging.
Definition Widget.hpp:405
Occurs when the mouse leaves a Widget while dragging.
Definition Widget.hpp:414
Occurs when a Widget begins being dragged.
Definition Widget.hpp:369
Definition Widget.hpp:141
Occurs when a Widget begins consuming the Hover event.
Definition Widget.hpp:327
Occurs when a different Widget is entered.
Definition Widget.hpp:333