Paperd.Ink Library
0.0.5
Library for interacting with Paperd.Ink devices.
Loading...
Searching...
No Matches
ui_base.h
Go to the documentation of this file.
1
#ifndef _UI_BASE__H_
2
#define _UI_BASE__H_
3
4
#include "
../paperdink_common.h
"
5
6
class
PaperdinkUIBaseClass
7
{
8
public
:
9
const
GFXfont *
font
= &
PAPERDINK_FONT_SML
;
10
const
GFXfont *
font_bold
= &
PAPERDINK_FONT_SML_BOLD
;
11
int
primary_color
=
GxEPD_BLACK
;
12
int
secondary_color
=
GxEPD_WHITE
;
13
int
tertiary_color
=
GxEPD_BLACK
;
14
};
15
16
class
PaperdinkUIClass
:
public
PaperdinkUIBaseClass
17
{
18
public
:
19
20
void
display_grid
(
GxEPD2_GFX
& display);
21
22
void
display_text_center
(
GxEPD2_GFX
& display, int16_t x, int16_t y,
const
char
*
string
, int16_t w = 0, int16_t h = 0,
const
GFXfont *
font
= &
PAPERDINK_FONT_SML
, uint16_t color =
GxEPD_BLACK
, uint8_t size = 1);
23
24
25
uint16_t
read16
(File& f);
26
uint32_t
read32
(File& f);
27
void
display_bitmap_fs
(
GxEPD2_GFX
& display, fs::FS &fs,
const
char
*filename, int16_t x, int16_t y,
bool
with_color);
28
};
29
30
extern
PaperdinkUIClass
Paperdink_UI
;
31
#endif
/* _UI_BASE__H_ */
GxEPD_BLACK
#define GxEPD_BLACK
Definition
GxEPD2.h:19
GxEPD_WHITE
#define GxEPD_WHITE
Definition
GxEPD2.h:20
GxEPD2_GFX
Definition
GxEPD2_GFX.h:28
PaperdinkUIBaseClass
Definition
ui_base.h:7
PaperdinkUIBaseClass::font
const GFXfont * font
Definition
ui_base.h:9
PaperdinkUIBaseClass::tertiary_color
int tertiary_color
Definition
ui_base.h:13
PaperdinkUIBaseClass::font_bold
const GFXfont * font_bold
Definition
ui_base.h:10
PaperdinkUIBaseClass::secondary_color
int secondary_color
Definition
ui_base.h:12
PaperdinkUIBaseClass::primary_color
int primary_color
Definition
ui_base.h:11
PaperdinkUIClass
Definition
ui_base.h:17
PaperdinkUIClass::display_grid
void display_grid(GxEPD2_GFX &display)
Definition
ui_base.cpp:3
PaperdinkUIClass::read16
uint16_t read16(File &f)
Definition
ui_base.cpp:48
PaperdinkUIClass::display_text_center
void display_text_center(GxEPD2_GFX &display, int16_t x, int16_t y, const char *string, int16_t w=0, int16_t h=0, const GFXfont *font=&PAPERDINK_FONT_SML, uint16_t color=GxEPD_BLACK, uint8_t size=1)
Definition
ui_base.cpp:21
PaperdinkUIClass::display_bitmap_fs
void display_bitmap_fs(GxEPD2_GFX &display, fs::FS &fs, const char *filename, int16_t x, int16_t y, bool with_color)
Definition
ui_base.cpp:70
PaperdinkUIClass::read32
uint32_t read32(File &f)
Definition
ui_base.cpp:58
PAPERDINK_FONT_SML_BOLD
#define PAPERDINK_FONT_SML_BOLD
Definition
fonts.h:18
PAPERDINK_FONT_SML
#define PAPERDINK_FONT_SML
Definition
fonts.h:17
paperdink_common.h
Paperdink_UI
PaperdinkUIClass Paperdink_UI
Definition
ui_base.cpp:219
src
ui
ui_base.h
Generated by
1.12.0