JM9 XRCU Board 0.1.3a
Libraries API Reference
Loading...
Searching...
No Matches
Label.h
Go to the documentation of this file.
1
8
9 #ifndef DSGC_LABEL_H
10#define DSGC_LABEL_H
11
12#include <Arduino.h>
13#include "Component.h"
14
15namespace dsgc {
16 class Label : public Component {
17 private:
18 const char *text;
19
20 const unsigned int cornerRadius;
21 const unsigned int paddingWidth;
22
23 static const unsigned int DEFAULT_CORNER_RADIUS;
24 static const unsigned int DEFAULT_PADDING_WIDTH;
25 static const unsigned int DEFAULT_HEIGHT;
26 public:
27 Label(
28 Adafruit_GFX &graphics,
29 unsigned int x,
30 unsigned int y,
31 unsigned int width);
32 Label(
33 Adafruit_GFX &graphics,
34 unsigned int x,
35 unsigned int y,
36 unsigned int width,
37 unsigned int height);
38 Label(
39 Adafruit_GFX &graphics,
40 unsigned int x,
41 unsigned int y,
42 unsigned int width,
43 const char *text);
44 Label(
45 Adafruit_GFX &graphics,
46 unsigned int x,
47 unsigned int y,
48 unsigned int width,
49 unsigned int height,
50 const char *text);
51
52 virtual void paint() override;
53
54 const char *getText();
55 void setText(const char *newText);
56 };
57}
58
59#endif // #ifndef DSGC_LABEL_H
Definition Adafruit_GFX.h:18
virtual void paint() override
Paints this component.
Definition Label.cpp:65