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
>
3
#include <
widget/OpaqueWidget.hpp
>
4
#include <
ui/Tooltip.hpp
>
5
#include <
engine/Module.hpp
>
6
#include <
engine/PortInfo.hpp
>
7
8
9
namespace
rack
{
10
namespace
app {
11
12
14
struct
PortWidget
:
widget::OpaqueWidget
{
15
struct
Internal;
16
Internal*
internal
;
17
18
engine::Module
* module = NULL;
19
engine::Port::Type
type
=
engine::Port::INPUT
;
20
int
portId
= -1;
21
22
PortWidget
();
23
~PortWidget
();
24
engine::Port
*
getPort
();
25
engine::PortInfo
*
getPortInfo
();
26
void
createTooltip
();
27
void
destroyTooltip
();
28
void
createContextMenu
();
29
virtual
void
appendContextMenu
(
ui::Menu
* menu) {}
30
void
deleteTopCableAction
();
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
Module.hpp
OpaqueWidget.hpp
PortInfo.hpp
Tooltip.hpp
common.hpp
rack
Root namespace for the Rack API.
Definition
AudioDisplay.hpp:9
rack::app::PortWidget
Manages an engine::Port on a ModuleWidget.
Definition
PortWidget.hpp:14
rack::app::PortWidget::onDragEnd
void onDragEnd(const DragEndEvent &e) override
rack::app::PortWidget::createTooltip
void createTooltip()
rack::app::PortWidget::internal
Internal * internal
Definition
PortWidget.hpp:16
rack::app::PortWidget::deleteTopCableAction
void deleteTopCableAction()
rack::app::PortWidget::draw
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
rack::app::PortWidget::PortWidget
PortWidget()
rack::app::PortWidget::appendContextMenu
virtual void appendContextMenu(ui::Menu *menu)
Definition
PortWidget.hpp:29
rack::app::PortWidget::type
engine::Port::Type type
Definition
PortWidget.hpp:19
rack::app::PortWidget::onDragStart
void onDragStart(const DragStartEvent &e) override
rack::app::PortWidget::step
void step() override
Advances the module by one frame.
rack::app::PortWidget::onButton
void onButton(const ButtonEvent &e) override
rack::app::PortWidget::getPortInfo
engine::PortInfo * getPortInfo()
rack::app::PortWidget::onDragLeave
void onDragLeave(const DragLeaveEvent &e) override
rack::app::PortWidget::createContextMenu
void createContextMenu()
rack::app::PortWidget::portId
int portId
Definition
PortWidget.hpp:20
rack::app::PortWidget::destroyTooltip
void destroyTooltip()
rack::app::PortWidget::onDragEnter
void onDragEnter(const DragEnterEvent &e) override
rack::app::PortWidget::getPort
engine::Port * getPort()
rack::app::PortWidget::onLeave
void onLeave(const LeaveEvent &e) override
rack::app::PortWidget::~PortWidget
~PortWidget()
rack::app::PortWidget::onDragDrop
void onDragDrop(const DragDropEvent &e) override
rack::app::PortWidget::onEnter
void onEnter(const EnterEvent &e) override
rack::engine::Module
DSP processor instance for your module.
Definition
Module.hpp:29
rack::engine::PortInfo
Definition
PortInfo.hpp:13
rack::engine::Port
Definition
Port.hpp:14
rack::engine::Port::Type
Type
Definition
Port.hpp:37
rack::engine::Port::INPUT
@ INPUT
Definition
Port.hpp:38
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::DragDropEvent
Occurs when the mouse button is released over a Widget while dragging.
Definition
Widget.hpp:423
rack::widget::Widget::DragEndEvent
Occurs when a Widget stops being dragged by releasing the mouse button.
Definition
Widget.hpp:375
rack::widget::Widget::DragEnterEvent
Occurs when the mouse enters a Widget while dragging.
Definition
Widget.hpp:405
rack::widget::Widget::DragLeaveEvent
Occurs when the mouse leaves a Widget while dragging.
Definition
Widget.hpp:414
rack::widget::Widget::DragStartEvent
Occurs when a Widget begins being dragged.
Definition
Widget.hpp:369
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
PortWidget.hpp
Generated by
1.12.0