forked from Integreight/1Sheeld-Arduino-Library
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGLCDSlider.h
45 lines (34 loc) · 799 Bytes
/
GLCDSlider.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
/*
Project: 1Sheeld Library
File: GLCDSlider.h
Version: 7.0
Compiler: Arduino avr-gcc 4.3.2
Author: Integreight
Date: 2015.7
*/
#ifndef GLCDSlider_h
#define GLCDSlider_h
#define GLCD_SLIDER_TYPE 0x0B
#define GLCD_SLIDER_RANGE 0x03
#define GLCD_SLIDER_VALUE 0x04
#define GLCD_SLIDER_DIMENSIONS 0x05
#include "ShapeClass.h"
class GLCDSlider : public ShapeClass
{
friend class GLCDShield;
public:
GLCDSlider(int , int , int ,int );
void setRange(int , int);
void setValue(int );
int getValue();
void setDimensions(int ,int);
void setOnChange(void (*)(int));
private:
void draw();
int width;
int height;
int value;
bool isCallbackAssigned;
void (*onChangeCallback)(int);
};
#endif