-
Notifications
You must be signed in to change notification settings - Fork 24
/
GLCDCheckBox.h
50 lines (38 loc) · 918 Bytes
/
GLCDCheckBox.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*
Project: 1Sheeld Library
File: GLCDCheckBox.h
Version: 7.0
Compiler: Arduino avr-gcc 4.3.2
Author: Integreight
Date: 2015.7
*/
#ifndef GLCDCheckBox_h
#define GLCDCheckBox_h
#define GLCD_CHECK_BOX_TYPE 0x0A
#define GLCD_CHECK_BOX_SET_TEXT 0x03
#define GLCD_CHECK_BOX_SET_SIZE 0x04
#define GLCD_CHECK_BOX_SELECT 0x05
#define GLCD_CHECK_BOX_UNSELECT 0x06
#include "ShapeClass.h"
class GLCDCheckBox : public ShapeClass
{
friend class GLCDShield;
public:
GLCDCheckBox(int , int , char *);
void setText(char *);
void setSize(byte );
bool isSelected();
void select();
void deselect();
void setOnChange(void(*)(bool));
~GLCDCheckBox();
private:
void draw();
int dataStringLength;
char * dataString;
bool dataMalloced;
bool isCallbackAssigned;
bool value;
void (*onChangeCallback)(bool);
};
#endif