Kerry Martin
/
Liz_Test_Code
KSM edits
Button.h@20:d25fb9c55781, 2019-07-11 (annotated)
- Committer:
- kerrysmartin
- Date:
- Thu Jul 11 14:04:19 2019 +0000
- Revision:
- 20:d25fb9c55781
- Parent:
- 19:fee3f71fab2d
Initial check in
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lizard753 | 19:fee3f71fab2d | 1 | |
lizard753 | 19:fee3f71fab2d | 2 | /// |
lizard753 | 19:fee3f71fab2d | 3 | /// |
lizard753 | 19:fee3f71fab2d | 4 | /// libraries used: |
lizard753 | 19:fee3f71fab2d | 5 | #include "RA8875.h" |
lizard753 | 19:fee3f71fab2d | 6 | #include "DisplayDefs.h" |
lizard753 | 19:fee3f71fab2d | 7 | #include <string> |
lizard753 | 19:fee3f71fab2d | 8 | |
lizard753 | 19:fee3f71fab2d | 9 | // set up global variables |
lizard753 | 19:fee3f71fab2d | 10 | // |
lizard753 | 19:fee3f71fab2d | 11 | |
lizard753 | 19:fee3f71fab2d | 12 | class Button |
lizard753 | 19:fee3f71fab2d | 13 | { |
lizard753 | 19:fee3f71fab2d | 14 | public: |
lizard753 | 19:fee3f71fab2d | 15 | //Button(); |
lizard753 | 19:fee3f71fab2d | 16 | Button(loc_t arg_corner1_x, loc_t arg_corner1_y, loc_t arg_corner2_x, loc_t arg_corner2_y, color_t arg_color, RA8875 *arg_display, const char * arg_name); |
kerrysmartin | 20:d25fb9c55781 | 17 | Button(rect_t arg_rect, color_t arg_color, RA8875 *arg_display, const char * arg_name); |
lizard753 | 19:fee3f71fab2d | 18 | bool isPressed(loc_t cur_x, loc_t cur_y); |
lizard753 | 19:fee3f71fab2d | 19 | void draw(); |
lizard753 | 19:fee3f71fab2d | 20 | string toString(); |
kerrysmartin | 20:d25fb9c55781 | 21 | color_t button_color; |
lizard753 | 19:fee3f71fab2d | 22 | private: |
kerrysmartin | 20:d25fb9c55781 | 23 | rect_t button_rect; |
lizard753 | 19:fee3f71fab2d | 24 | char * button_name; |
kerrysmartin | 20:d25fb9c55781 | 25 | |
lizard753 | 19:fee3f71fab2d | 26 | RA8875 *lcd; |
lizard753 | 19:fee3f71fab2d | 27 | //string button_name; |
lizard753 | 19:fee3f71fab2d | 28 | }; |
lizard753 | 19:fee3f71fab2d | 29 | |
lizard753 | 19:fee3f71fab2d | 30 |