VCV Rack API
v2
Loading...
Searching...
No Matches
Button.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <
widget/OpaqueWidget.hpp
>
3
#include <
ui/common.hpp
>
4
#include <
Quantity.hpp
>
5
6
7
namespace
rack
{
8
namespace
ui {
9
10
18
struct
Button
:
widget::OpaqueWidget
{
19
std::string
text
;
21
Quantity
*
quantity
= NULL;
22
23
Button
();
24
void
draw
(
const
DrawArgs
& args)
override
;
25
void
onDragStart
(
const
DragStartEvent
& e)
override
;
26
void
onDragEnd
(
const
DragEndEvent
& e)
override
;
27
void
onDragDrop
(
const
DragDropEvent
& e)
override
;
28
};
29
30
31
}
// namespace ui
32
}
// namespace rack
OpaqueWidget.hpp
Quantity.hpp
rack
Root namespace for the Rack API.
Definition
AudioDisplay.hpp:9
rack::Quantity
A controller for manipulating a float value (which subclasses must store somehow) with limits and lab...
Definition
Quantity.hpp:14
rack::ui::Button
A clickable button with text.
Definition
Button.hpp:18
rack::ui::Button::onDragEnd
void onDragEnd(const DragEndEvent &e) override
rack::ui::Button::quantity
Quantity * quantity
Not owned.
Definition
Button.hpp:21
rack::ui::Button::draw
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
rack::ui::Button::Button
Button()
rack::ui::Button::text
std::string text
Definition
Button.hpp:19
rack::ui::Button::onDragStart
void onDragStart(const DragStartEvent &e) override
rack::ui::Button::onDragDrop
void onDragDrop(const DragDropEvent &e) override
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::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::DragStartEvent
Occurs when a Widget begins being dragged.
Definition
Widget.hpp:369
rack::widget::Widget::DrawArgs
Definition
Widget.hpp:141
common.hpp
include
ui
Button.hpp
Generated by
1.12.0