discoverpixy
checkbox.h
Go to the documentation of this file.
1 /**************************************************************************************************************************************
2 * Project: discoverpixy
3 * Website: https://github.com/t-moe/discoverpixy
4 * Authors: Aaron Schmocker, Timo Lang
5 * Institution: BFH Bern University of Applied Sciences
6 * File: common/gui/checkbox.h
7 *
8 * Version History:
9 * Date Autor Email SHA Changes
10 * 2015-04-27 timolang@gmail.com b300ac5 Added Checkbox support
11 * 2015-05-11 timolang@gmail.com 08d9fe0 More work on doxygen module structure
12 * 2015-05-15 timolang@gmail.com 9a16865 Added doxgen comments to filesyste, checkbox, numupdown and screen module. And some minor changes to the other modules.
13 * 2015-05-17 timolang@gmail.com 2d46336 Improved comments in implementation of button, checkbox, numupdown, tft, touch and screen modules/submodules.
14 *
15 **************************************************************************************************************************************/
16 
17 #ifndef CHECKBOX_H
18 #define CHECKBOX_H
19 
20 #include "touch.h"
21 
26 
33 
38 
45 typedef void (*CHECKBOX_CALLBACK)(void* checkbox, bool checked);
46 
50 typedef struct {
52  uint16_t fgcolor;
53  bool checked;
56 
62 bool gui_checkbox_add(CHECKBOX_STRUCT* checkbox);
63 
68 void gui_checkbox_remove(CHECKBOX_STRUCT* checkbox);
69 
74 void gui_checkbox_update(CHECKBOX_STRUCT* checkbox);
75 
80 void gui_checkbox_redraw(CHECKBOX_STRUCT* checkbox);
81 
82 #define CHECKBOX_WIN_FG_COLOR RGB(32,161,34)
83 
86 #endif /* CHECKBOX_H */
bool gui_checkbox_add(CHECKBOX_STRUCT *checkbox)
Definition: checkbox.c:70
void gui_checkbox_update(CHECKBOX_STRUCT *checkbox)
Definition: checkbox.c:125
void gui_checkbox_remove(CHECKBOX_STRUCT *checkbox)
Definition: checkbox.c:119
bool checked
A boolean which indicates whether or not the checkbox is currently checked.
Definition: checkbox.h:53
TOUCH_AREA_STRUCT base
Basic geometry of the Checkbox. You only need to set the x1, y1, x2, y2 members of this struct...
Definition: checkbox.h:51
void(* CHECKBOX_CALLBACK)(void *checkbox, bool checked)
Definition: checkbox.h:45
uint16_t fgcolor
The 16-bit color of the tickmark.
Definition: checkbox.h:52
void gui_checkbox_redraw(CHECKBOX_STRUCT *checkbox)
Definition: checkbox.c:108
CHECKBOX_CALLBACK callback
Callback which is executed when the checkbox changes state.
Definition: checkbox.h:54