aboutsummaryrefslogtreecommitdiffstats
path: root/include/gwin/checkbox.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-06-02 16:15:46 +0200
committerJoel Bodenmann <joel@unormal.org>2013-06-02 16:15:46 +0200
commitdadcf535d45b8c778c013494e8142215d32e4204 (patch)
treec245caa97250f99ab7922d8d4e95be90f635b424 /include/gwin/checkbox.h
parent8a5596b39d44d7fe1fbb359cd436fe23cde97339 (diff)
downloaduGFX-dadcf535d45b8c778c013494e8142215d32e4204.tar.gz
uGFX-dadcf535d45b8c778c013494e8142215d32e4204.tar.bz2
uGFX-dadcf535d45b8c778c013494e8142215d32e4204.zip
added default theme
Diffstat (limited to 'include/gwin/checkbox.h')
-rw-r--r--include/gwin/checkbox.h37
1 files changed, 9 insertions, 28 deletions
diff --git a/include/gwin/checkbox.h b/include/gwin/checkbox.h
index 84ecd65a..cfa9f646 100644
--- a/include/gwin/checkbox.h
+++ b/include/gwin/checkbox.h
@@ -46,12 +46,14 @@ typedef enum GCheckboxShape_e {
} GCheckboxShape;
typedef enum GCheckboxState_e {
- GCHBX_SET, GCHBX_UNSET
+ GCHBX_UNCHECKED, GCHBX_CHECKED
} GCheckboxState;
-typedef struct GCheckboxDrawStyle_t {
- color_t color;
-} GCheckboxDrawStyle;
+typedef struct GCheckboxColor_t {
+ color_t border;
+ color_t checked;
+ color_t bg;
+} GCheckboxColor;
/* custom rendering interface */
typedef void (*GCheckboxDrawFunction)(GHandle gh, bool_t enabled, bool_t state, void* param);
@@ -62,8 +64,7 @@ typedef struct GCheckboxObject_t {
GListener listener;
GCheckboxDrawFunction fn;
- GCheckboxDrawStyle set;
- GCheckboxDrawStyle unset;
+ GCheckboxColor *colors;
bool_t state;
void *param;
} GCheckboxObject;
@@ -122,7 +123,7 @@ void gwinCheckboxSetEnabled(GHandle gh, bool_t enabled);
*
* @param[in] gh The window handle (must be a checkbox window)
*
- * @return The state of the checkbox (GCHBX_SET or GCHBX_UNSET)
+ * @return The state of the checkbox (GCHBX_CHECKED or GCHBX_UNCHECKED)
*
* @api
*/
@@ -148,27 +149,7 @@ void gwinCheckboxSetEnabled(GHandle gh, bool_t enabled);
* @api
*/
bool_t gwinCheckboxAttachMouse(GHandle gh, uint16_t instance);
-#endif
-
-/**
- * @brief Standard checkbox drawing routines
- * @details These routines are called to draw the standard checkbox styles.
- *
- * @param[in] gh The checkbox handle
- * @param[in] enabled Is the checkbox currently enabled or disabled
- * @param[in] state Is the checkbox currently set or unset
- * @param[in] param A parameter passed from the user
- *
- * @note In your custom checkbox drawing function, you may optionally call these
- * standard functions and then draw your extra details on top.
- * @note The standard functions below ignore the param parameter. It is there only
- * to ensure the functions match the GCheckboxDrawFunction type.
- *
- * @api
- * @{
- */
-void gwinCheckboxDraw_Normal(GHandle gh, bool_t enabled, bool_t state, void *param);
-/** @} */
+#endif /* GFX_USE_GINPUT && GINPUT_NEED_MOUSE */
#endif /* _GWIN_NEED_CHECKBOX */