VCV Rack API
v2
Loading...
Searching...
No Matches
Label.hpp
Go to the documentation of this file.
1
#pragma once
2
#include <
widget/Widget.hpp
>
3
#include <
ui/common.hpp
>
4
5
6
namespace
rack
{
7
namespace
ui {
8
9
10
struct
Label
:
widget::Widget
{
11
enum
Alignment
{
12
LEFT_ALIGNMENT
,
13
CENTER_ALIGNMENT
,
14
RIGHT_ALIGNMENT
,
15
};
16
17
std::string
text
;
18
float
fontSize
;
19
float
lineHeight
;
20
NVGcolor
color
;
21
Alignment
alignment
=
LEFT_ALIGNMENT
;
22
23
Label
();
24
void
draw
(
const
DrawArgs
& args)
override
;
25
};
26
27
28
}
// namespace ui
29
}
// namespace rack
Widget.hpp
rack
Root namespace for the Rack API.
Definition
AudioDisplay.hpp:9
rack::ui::Label
Definition
Label.hpp:10
rack::ui::Label::alignment
Alignment alignment
Definition
Label.hpp:21
rack::ui::Label::Alignment
Alignment
Definition
Label.hpp:11
rack::ui::Label::LEFT_ALIGNMENT
@ LEFT_ALIGNMENT
Definition
Label.hpp:12
rack::ui::Label::CENTER_ALIGNMENT
@ CENTER_ALIGNMENT
Definition
Label.hpp:13
rack::ui::Label::RIGHT_ALIGNMENT
@ RIGHT_ALIGNMENT
Definition
Label.hpp:14
rack::ui::Label::text
std::string text
Definition
Label.hpp:17
rack::ui::Label::draw
void draw(const DrawArgs &args) override
Draws the widget to the NanoVG context.
rack::ui::Label::fontSize
float fontSize
Definition
Label.hpp:18
rack::ui::Label::Label
Label()
rack::ui::Label::color
NVGcolor color
Definition
Label.hpp:20
rack::ui::Label::lineHeight
float lineHeight
Definition
Label.hpp:19
rack::widget::Widget::DrawArgs
Definition
Widget.hpp:141
rack::widget::Widget
A node in the 2D scene graph.
Definition
Widget.hpp:21
common.hpp
include
ui
Label.hpp
Generated by
1.12.0