VCV Rack API v2
Loading...
Searching...
No Matches
LedDisplay.hpp
Go to the documentation of this file.
1#pragma once
2#include <app/common.hpp>
3#include <widget/Widget.hpp>
5#include <ui/TextField.hpp>
6
7
8namespace rack {
9namespace app {
10
11
13 void draw(const DrawArgs& args) override;
14 void drawLayer(const DrawArgs& args, int layer) override;
15};
16
19 void draw(const DrawArgs& args) override;
20};
21
23 std::string text;
24 std::string fontPath;
26 NVGcolor color;
27 NVGcolor bgColor;
29 void draw(const DrawArgs& args) override;
30 void drawLayer(const DrawArgs& args, int layer) override;
31 void onButton(const ButtonEvent& e) override;
32};
33
35 std::string fontPath;
37 NVGcolor color;
38 NVGcolor bgColor;
40 void draw(const DrawArgs& args) override;
41 void drawLayer(const DrawArgs& args, int layer) override;
42 int getTextPosition(math::Vec mousePos) override;
43};
44
45
46} // namespace app
47} // namespace rack
Root namespace for the Rack API.
Definition AudioDisplay.hpp:9
Definition LedDisplay.hpp:22
void drawLayer(const DrawArgs &args, int layer) override
Draw additional layers.
math::Vec textOffset
Definition LedDisplay.hpp:25
NVGcolor bgColor
Definition LedDisplay.hpp:27
void onButton(const ButtonEvent &e) override
std::string fontPath
Definition LedDisplay.hpp:24
NVGcolor color
Definition LedDisplay.hpp:26
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
std::string text
Definition LedDisplay.hpp:23
Definition LedDisplay.hpp:17
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
Definition LedDisplay.hpp:34
int getTextPosition(math::Vec mousePos) override
math::Vec textOffset
Definition LedDisplay.hpp:36
NVGcolor color
Definition LedDisplay.hpp:37
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
NVGcolor bgColor
Definition LedDisplay.hpp:38
std::string fontPath
Definition LedDisplay.hpp:35
void drawLayer(const DrawArgs &args, int layer) override
Draw additional layers.
Definition LedDisplay.hpp:12
void drawLayer(const DrawArgs &args, int layer) override
Draw additional layers.
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
2-dimensional vector of floats, representing a point on the plane for graphics.
Definition math.hpp:189
Definition TextField.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
Definition Widget.hpp:141
A node in the 2D scene graph.
Definition Widget.hpp:21