Loading [MathJax]/extensions/tex2jax.js
VCV Rack API
v2
Toggle main menu visibility
Main Page
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
y
Typedefs
a
b
c
d
e
f
g
h
i
k
l
p
r
s
t
v
w
y
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
z
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
b
c
h
i
l
m
n
o
p
r
t
u
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
l
n
o
p
r
s
t
v
w
Functions
Macros
_
a
b
c
d
e
f
g
i
l
n
p
r
s
t
v
w
▼
VCV Rack API
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
include
►
app
►
dsp
►
engine
►
plugin
►
simd
►
ui
▼
widget
►
event.hpp
►
FramebufferWidget.hpp
►
OpaqueWidget.hpp
►
OpenGlWidget.hpp
►
SvgWidget.hpp
►
TransformWidget.hpp
►
TransparentWidget.hpp
►
Widget.hpp
►
ZoomWidget.hpp
►
window
arch.hpp
►
asset.hpp
►
audio.hpp
►
color.hpp
►
common.hpp
►
componentlibrary.hpp
►
context.hpp
►
gamepad.hpp
►
helpers.hpp
►
history.hpp
►
keyboard.hpp
►
library.hpp
►
logger.hpp
►
math.hpp
►
midi.hpp
►
midiloopback.hpp
►
mutex.hpp
►
network.hpp
►
patch.hpp
►
plugin.hpp
►
Quantity.hpp
►
rack.hpp
►
random.hpp
►
rtaudio.hpp
►
rtmidi.hpp
►
settings.hpp
►
string.hpp
►
system.hpp
►
tag.hpp
►
weakptr.hpp
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
Loading...
Searching...
No Matches
OpaqueWidget.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <
widget/Widget.hpp
>
3
4
5
namespace
rack
{
6
namespace
widget
{
7
8
12
struct
OpaqueWidget
:
Widget
{
13
void
onHover
(
const
HoverEvent
& e)
override
{
14
Widget::onHover
(e);
15
e.
stopPropagating
();
16
// Consume if not consumed by child
17
if
(!e.
isConsumed
())
18
e.
consume
(
this
);
19
}
13
void
onHover
(
const
HoverEvent
& e)
override
{
…
}
20
void
onButton
(
const
ButtonEvent
& e)
override
{
21
Widget::onButton
(e);
22
e.
stopPropagating
();
23
if
(e.
button
== GLFW_MOUSE_BUTTON_LEFT) {
24
// Consume if not consumed by child
25
if
(!e.
isConsumed
())
26
e.
consume
(
this
);
27
}
28
}
20
void
onButton
(
const
ButtonEvent
& e)
override
{
…
}
29
void
onHoverKey
(
const
HoverKeyEvent
& e)
override
{
30
Widget::onHoverKey
(e);
31
e.
stopPropagating
();
32
}
29
void
onHoverKey
(
const
HoverKeyEvent
& e)
override
{
…
}
33
void
onHoverText
(
const
HoverTextEvent
& e)
override
{
34
Widget::onHoverText
(e);
35
e.
stopPropagating
();
36
}
33
void
onHoverText
(
const
HoverTextEvent
& e)
override
{
…
}
37
void
onHoverScroll
(
const
HoverScrollEvent
& e)
override
{
38
Widget::onHoverScroll
(e);
39
e.
stopPropagating
();
40
}
37
void
onHoverScroll
(
const
HoverScrollEvent
& e)
override
{
…
}
41
void
onDragHover
(
const
DragHoverEvent
& e)
override
{
42
Widget::onDragHover
(e);
43
e.
stopPropagating
();
44
// Consume if not consumed by child
45
if
(!e.
isConsumed
())
46
e.
consume
(
this
);
47
}
41
void
onDragHover
(
const
DragHoverEvent
& e)
override
{
…
}
48
void
onPathDrop
(
const
PathDropEvent
& e)
override
{
49
Widget::onPathDrop
(e);
50
e.
stopPropagating
();
51
}
48
void
onPathDrop
(
const
PathDropEvent
& e)
override
{
…
}
52
};
12
struct
OpaqueWidget
:
Widget
{
…
};
53
54
55
}
// namespace widget
56
}
// namespace rack
Widget.hpp
rack::widget
Base UI widget types.
Definition
context.hpp:28
rack
Root namespace for the Rack API.
Definition
AudioDisplay.hpp:9
rack::widget::BaseEvent::stopPropagating
void stopPropagating() const
Prevents the event from being handled by more Widgets.
Definition
event.hpp:78
rack::widget::BaseEvent::isConsumed
bool isConsumed() const
Definition
event.hpp:116
rack::widget::BaseEvent::consume
void consume(Widget *w) const
Sets the target Widget and stops propagating.
Definition
event.hpp:104
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::OpaqueWidget::onDragHover
void onDragHover(const DragHoverEvent &e) override
Definition
OpaqueWidget.hpp:41
rack::widget::OpaqueWidget::onHoverKey
void onHoverKey(const HoverKeyEvent &e) override
Definition
OpaqueWidget.hpp:29
rack::widget::OpaqueWidget::onHoverText
void onHoverText(const HoverTextEvent &e) override
Definition
OpaqueWidget.hpp:33
rack::widget::OpaqueWidget::onHoverScroll
void onHoverScroll(const HoverScrollEvent &e) override
Definition
OpaqueWidget.hpp:37
rack::widget::OpaqueWidget::onButton
void onButton(const ButtonEvent &e) override
Definition
OpaqueWidget.hpp:20
rack::widget::OpaqueWidget::onHover
void onHover(const HoverEvent &e) override
Definition
OpaqueWidget.hpp:13
rack::widget::OpaqueWidget::onPathDrop
void onPathDrop(const PathDropEvent &e) override
Definition
OpaqueWidget.hpp:48
rack::widget::Widget::ButtonEvent
Occurs each mouse button press or release.
Definition
Widget.hpp:237
rack::widget::Widget::ButtonEvent::button
int button
GLFW_MOUSE_BUTTON_LEFT, GLFW_MOUSE_BUTTON_RIGHT, GLFW_MOUSE_BUTTON_MIDDLE, etc.
Definition
Widget.hpp:239
rack::widget::Widget::DragHoverEvent
Occurs every frame when the mouse is hovering over a Widget while another Widget (possibly the same o...
Definition
Widget.hpp:397
rack::widget::Widget::HoverEvent
Occurs every frame when the mouse is hovering over a Widget.
Definition
Widget.hpp:225
rack::widget::Widget::HoverKeyEvent
Occurs when a key is pressed, released, or repeated while the mouse is hovering a Widget.
Definition
Widget.hpp:300
rack::widget::Widget::HoverScrollEvent
Occurs when the mouse scroll wheel is moved while the mouse is hovering a Widget.
Definition
Widget.hpp:321
rack::widget::Widget::HoverTextEvent
Occurs when a character is typed while the mouse is hovering a Widget.
Definition
Widget.hpp:313
rack::widget::Widget::PathDropEvent
Occurs when a selection of files from the operating system is dropped onto a Widget.
Definition
Widget.hpp:438
rack::widget::Widget
A node in the 2D scene graph.
Definition
Widget.hpp:21
rack::widget::Widget::onHoverKey
virtual void onHoverKey(const HoverKeyEvent &e)
Definition
Widget.hpp:301
rack::widget::Widget::onHover
virtual void onHover(const HoverEvent &e)
Definition
Widget.hpp:229
rack::widget::Widget::onHoverText
virtual void onHoverText(const HoverTextEvent &e)
Definition
Widget.hpp:314
rack::widget::Widget::onPathDrop
virtual void onPathDrop(const PathDropEvent &e)
Definition
Widget.hpp:444
rack::widget::Widget::onHoverScroll
virtual void onHoverScroll(const HoverScrollEvent &e)
Definition
Widget.hpp:325
rack::widget::Widget::onButton
virtual void onButton(const ButtonEvent &e)
Definition
Widget.hpp:245
rack::widget::Widget::onDragHover
virtual void onDragHover(const DragHoverEvent &e)
Definition
Widget.hpp:403
include
widget
OpaqueWidget.hpp
Generated by
1.13.2