-
Notifications
You must be signed in to change notification settings - Fork 0
/
Button.h
56 lines (49 loc) · 1.04 KB
/
Button.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
54
55
/*
* File: Button.h
* Author: scribble
*
* Created on November 29, 2012, 9:17 AM
*/
#ifndef BUTTON_H
#define BUTTON_H
#include "Color.h"
#include "Point.h"
#define MOMENTARY 0
#define TOGGLE 1
#define PICKER 2
class Button {
public:
Button();
Button(int x_, int y_, int w_, int h_, int mode_, int action_, Color *fill_, Color *stroke_, Color *highlight_, Color *highlightStroke_);
Button(const Button& orig);
virtual ~Button();
int getX();
int getY();
int getWidth();
int getHeight();
Color *getFillColor();
Color *getStrokeColor();
void setSelected();
bool getSelected();
bool pointInsideArea(Point *point);
int getMode();
int getAction();
void setEnabled(bool en);
bool getEnabled();
protected:
bool enabled;
int x;
int y;
int width;
int height;
Color *fillColor;
Color *strokeColor;
Color *fill;
Color *stroke;
Color *highlight;
Color *highlightStroke;
bool selected;
int mode;
int action;
};
#endif /* BUTTON_H */