-
Notifications
You must be signed in to change notification settings - Fork 24
/
GLCDRadioButton.h
53 lines (42 loc) · 1.03 KB
/
GLCDRadioButton.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
51
52
53
/*
Project: 1Sheeld Library
File: GLCDRadioButton.h
Version: 7.0
Compiler: Arduino avr-gcc 4.3.2
Author: Integreight
Date: 2015.7
*/
#ifndef GLCDRadioButton_h
#define GLCDRadioButton_h
#define GLCD_RADIO_BUTTON_TYPE 0x09
#define GLCD_RADIO_BUTTON_SET_TEXT 0x03
#define GLCD_RADIO_BUTTON_SET_SIZE 0x04
#define GLCD_RADIO_BUTTON_SET_GROUP 0x05
#define GLCD_RADIO_BUTTON_SELECT 0x06
#include "ShapeClass.h"
class GLCDRadioButton : public ShapeClass
{
friend class GLCDShield;
public:
GLCDRadioButton(int , int , char *);
GLCDRadioButton(int , int , char * , int );
bool isSelected();
int getGroupNumber();
void setText(char *);
void setSize(byte );
void setGroup(int );
void select();
void setOnChange(void (*)(bool));
~GLCDRadioButton();
private:
void draw();
char * dataString;
int dataStringLength;
int groupNumber;
bool dataMalloced;
bool sendAsGroup;
bool value;
bool isCallbackAssigned;
void (*onChangeCallback)(bool);
};
#endif