aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-05-09 21:46:32 +1000
committerinmarket <andrewh@inmarket.com.au>2014-05-09 21:46:32 +1000
commit21aac3d8532c9aa1decab30c00d9f5a37067aa13 (patch)
treec874ac8494028f09461e4329f0bcfae8c0e5adb8 /src/gwin
parentf7fa0dd78f3b807578d99cc0eefe40996b1f9037 (diff)
parent1478fdf41e3731cafacd22ff6f530fb724c02df3 (diff)
downloaduGFX-21aac3d8532c9aa1decab30c00d9f5a37067aa13.tar.gz
uGFX-21aac3d8532c9aa1decab30c00d9f5a37067aa13.tar.bz2
uGFX-21aac3d8532c9aa1decab30c00d9f5a37067aa13.zip
Merge branch 'master' into gwin
Diffstat (limited to 'src/gwin')
-rw-r--r--src/gwin/class_gwin.h2
-rw-r--r--src/gwin/gimage.c18
-rw-r--r--src/gwin/gimage.h (renamed from src/gwin/image.h)0
-rw-r--r--src/gwin/gwidget.c8
-rw-r--r--src/gwin/gwidget.h16
-rw-r--r--src/gwin/gwin.c16
-rw-r--r--src/gwin/gwm.c8
-rw-r--r--src/gwin/label.c27
-rw-r--r--src/gwin/progressbar.c91
-rw-r--r--src/gwin/progressbar.h54
-rw-r--r--src/gwin/sys_defs.h20
-rw-r--r--src/gwin/sys_options.h14
-rw-r--r--src/gwin/sys_rules.h50
13 files changed, 198 insertions, 126 deletions
diff --git a/src/gwin/class_gwin.h b/src/gwin/class_gwin.h
index 49fc6084..50dd480e 100644
--- a/src/gwin/class_gwin.h
+++ b/src/gwin/class_gwin.h
@@ -170,7 +170,7 @@ extern "C" {
*
* @notapi
*/
-GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags);
+GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint32_t flags);
#if GWIN_NEED_WIDGET || defined(__DOXYGEN__)
/**
diff --git a/src/gwin/gimage.c b/src/gwin/gimage.c
index fdc6df84..9d6363ba 100644
--- a/src/gwin/gimage.c
+++ b/src/gwin/gimage.c
@@ -26,10 +26,20 @@ static void _destroy(GWindowObject *gh) {
#if GWIN_NEED_IMAGE_ANIMATION
static void _redraw(GHandle gh);
- static void _timer(void *gh) {
+ static void _timer(void *param) {
+ #define gh ((GHandle)param)
+
// We need to re-test the visibility in case it has been made invisible since the last frame.
- if ((((GHandle)gh)->flags & GWIN_FLG_VISIBLE))
- _redraw((GHandle)gh);
+ if ((gh->flags & GWIN_FLG_VISIBLE)) {
+ // Setting the clip here shouldn't be necessary if the redraw doesn't overdraw
+ // but we put it in for safety anyway
+ #if GDISP_NEED_CLIP
+ gdispGSetClip(gh->display, gh->x, gh->y, gh->width, gh->height);
+ #endif
+ _redraw(gh);
+ }
+
+ #undef gh
}
#endif
@@ -127,7 +137,7 @@ GHandle gwinGImageCreate(GDisplay *g, GImageObject *gobj, GWindowInit *pInit) {
return 0;
// Ensure the gdispImageIsOpen() gives valid results
- gobj->image.type = 0;
+ gdispImageInit(&gobj->image);
// Initialise the timer
#if GWIN_NEED_IMAGE_ANIMATION
diff --git a/src/gwin/image.h b/src/gwin/gimage.h
index fdaabc92..fdaabc92 100644
--- a/src/gwin/image.h
+++ b/src/gwin/gimage.h
diff --git a/src/gwin/gwidget.c b/src/gwin/gwidget.c
index 181b7425..c46520ea 100644
--- a/src/gwin/gwidget.c
+++ b/src/gwin/gwidget.c
@@ -297,6 +297,14 @@ void _gwidgetRedraw(GHandle gh) {
gw->fnDraw(gw, gw->fnParam);
}
+void gwinWidgetClearInit(GWidgetInit *pwi) {
+ char *p;
+ unsigned len;
+
+ for(p = (char *)pwi, len = sizeof(GWidgetInit); len; len--)
+ *p++ = 0;
+}
+
void gwinSetDefaultStyle(const GWidgetStyle *pstyle, bool_t updateAll) {
if (!pstyle)
pstyle = &BlackWidgetStyle;
diff --git a/src/gwin/gwidget.h b/src/gwin/gwidget.h
index 6568859d..8795a95b 100644
--- a/src/gwin/gwidget.h
+++ b/src/gwin/gwidget.h
@@ -78,6 +78,10 @@ typedef void (*CustomWidgetDrawFunction)(struct GWidgetObject *gw, void *param);
* @brief The structure to initialise a widget.
*
* @note Some widgets may have extra parameters.
+ * @note If you create this structure on the stack, you should always memset
+ * it to all zero's first in case a future version of the software
+ * add's extra fields. Alternatively you can use @p gwinWidgetClearInit()
+ * to clear it.
* @note The text element must be static string (not stack allocated). If you want to use
* a dynamic string (eg a stack allocated string) use NULL for this member and then call
* @p gwinSetText() with useAlloc set to TRUE.
@@ -127,6 +131,18 @@ extern "C" {
#endif
/**
+ * @brief Clear a GWidgetInit structure to all zero's
+ * @note This function is provided just to prevent problems
+ * on operating systems where using memset() causes issues
+ * in the users application.
+ *
+ * @param[in] pwi The GWidgetInit structure to clear
+ *
+ * @api
+ */
+void gwinWidgetClearInit(GWidgetInit *pwi);
+
+/**
* @brief Set the default style for widgets created hereafter.
*
* @param[in] pstyle The default style. Passing NULL uses the system compiled style.
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index b9a488d3..b48d8335 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -114,7 +114,7 @@ void _gwinDeinit(void)
// Internal routine for use by GWIN components only
// Initialise a window creating it dynamically if required.
-GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags) {
+GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint32_t flags) {
// Allocate the structure if necessary
if (!pgw) {
if (!(pgw = gfxAlloc(vmt->size)))
@@ -155,6 +155,14 @@ GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit
* Routines that affect all windows
*-----------------------------------------------*/
+void gwinClearInit(GWindowInit *pwi) {
+ char *p;
+ unsigned len;
+
+ for(p = (char *)pwi, len = sizeof(GWindowInit); len; len--)
+ *p++ = 0;
+}
+
void gwinSetDefaultColor(color_t clr) {
defaultFgColor = clr;
}
@@ -195,10 +203,8 @@ GHandle gwinGWindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pI
}
void gwinDestroy(GHandle gh) {
- if (!gh) {
- // should log a runtime error here
+ if (!gh)
return;
- }
#if GWIN_NEED_HIERARCHY
GHandle tmp;
@@ -394,7 +400,7 @@ void gwinRedraw(GHandle gh) {
void gwinClear(GHandle gh) {
/*
* Don't render anything when the window is not visible but
- * still call tthe AfterClear() routine as some widgets will
+ * still call the AfterClear() routine as some widgets will
* need this to clear internal buffers or similar
*/
if (!((gh->flags & GWIN_FLG_VISIBLE))) {
diff --git a/src/gwin/gwm.c b/src/gwin/gwm.c
index 9c158f68..3140b03f 100644
--- a/src/gwin/gwm.c
+++ b/src/gwin/gwm.c
@@ -127,7 +127,7 @@ void gwinRedrawDisplay(GDisplay *g, bool_t preserve) {
}
/*-----------------------------------------------
- * Window Manager Routines
+ * "Null" Window Manager Routines
*-----------------------------------------------*/
static void WM_Init(void) {
@@ -145,9 +145,9 @@ static void WM_DeInit(void) {
}
static bool_t WM_Add(GHandle gh, const GWindowInit *pInit) {
- // Note the window will not be marked as visible yet
+ // Note the window will not currently be marked as visible
- // Put it on the queue
+ // Put it on the end of the queue
gfxQueueASyncPut(&_GWINList, &gh->wmq);
// Make sure the size is valid
@@ -156,7 +156,7 @@ static bool_t WM_Add(GHandle gh, const GWindowInit *pInit) {
}
static void WM_Delete(GHandle gh) {
- // Remove it from the queue
+ // Remove it from the window list
gfxQueueASyncRemove(&_GWINList, &gh->wmq);
}
diff --git a/src/gwin/label.c b/src/gwin/label.c
index 8960300b..2aa0c860 100644
--- a/src/gwin/label.c
+++ b/src/gwin/label.c
@@ -138,6 +138,7 @@ void gwinLabelSetBorder(GHandle gh, bool_t border) {
static void gwinLabelDefaultDraw(GWidgetObject *gw, void *param) {
coord_t w, h;
+ color_t c;
(void) param;
// is it a valid handle?
@@ -146,6 +147,7 @@ static void gwinLabelDefaultDraw(GWidgetObject *gw, void *param) {
w = (gw->g.flags & GLABEL_FLG_WAUTO) ? getwidth(gw->text, gw->g.font, gdispGGetWidth(gw->g.display) - gw->g.x) : gw->g.width;
h = (gw->g.flags & GLABEL_FLG_HAUTO) ? getheight(gw->text, gw->g.font, gdispGGetWidth(gw->g.display) - gw->g.x) : gw->g.height;
+ c = (gw->g.flags & GWIN_FLG_ENABLED) ? gw->pstyle->enabled.text : gw->pstyle->disabled.text;
if (gw->g.width != w || gw->g.height != h) {
gwinResize(&gw->g, w, h);
@@ -154,29 +156,18 @@ static void gwinLabelDefaultDraw(GWidgetObject *gw, void *param) {
}
#if GWIN_LABEL_ATTRIBUTE
- if (gw2obj->attr != 0) {
- gdispGFillStringBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, gw2obj->attr, gw->g.font,
- (gw->g.flags & GWIN_FLG_ENABLED) ? gw->pstyle->enabled.text : gw->pstyle->disabled.text, gw->pstyle->background,
- justifyLeft);
-
- gdispGFillStringBox(gw->g.display, gw->g.x + gw2obj->tab, gw->g.y, gw->g.width, gw->g.height, gw->text, gw->g.font,
- (gw->g.flags & GWIN_FLG_ENABLED) ? gw->pstyle->enabled.text : gw->pstyle->disabled.text, gw->pstyle->background,
- justifyLeft);
- } else {
- gdispGFillStringBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, gw->text, gw->g.font,
- (gw->g.flags & GWIN_FLG_ENABLED) ? gw->pstyle->enabled.text : gw->pstyle->disabled.text, gw->pstyle->background,
- justifyLeft);
-
- }
+ if (gw2obj->attr) {
+ gdispGFillStringBox(gw->g.display, gw->g.x, gw->g.y, gw2obj->tab, h, gw2obj->attr, gw->g.font, c, gw->pstyle->background, justifyLeft);
+ gdispGFillStringBox(gw->g.display, gw->g.x + gw2obj->tab, gw->g.y, w-gw2obj->tab, h, gw->text, gw->g.font, c, gw->pstyle->background, justifyLeft);
+ } else
+ gdispGFillStringBox(gw->g.display, gw->g.x, gw->g.y, w, h, gw->text, gw->g.font, c, gw->pstyle->background, justifyLeft);
#else
- gdispGFillStringBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, gw->text, gw->g.font,
- (gw->g.flags & GWIN_FLG_ENABLED) ? gw->pstyle->enabled.text : gw->pstyle->disabled.text, gw->pstyle->background,
- justifyLeft);
+ gdispGFillStringBox(gw->g.display, gw->g.x, gw->g.y, w, h, gw->text, gw->g.font, c, gw->pstyle->background, justifyLeft);
#endif
// render the border (if any)
if (gw->g.flags & GLABEL_FLG_BORDER)
- gdispGDrawBox(gw->g.display, gw->g.x, gw->g.y, gw->g.width, gw->g.height, (gw->g.flags & GWIN_FLG_ENABLED) ? gw->pstyle->enabled.edge : gw->pstyle->disabled.edge);
+ gdispGDrawBox(gw->g.display, gw->g.x, gw->g.y, w, h, (gw->g.flags & GWIN_FLG_ENABLED) ? gw->pstyle->enabled.edge : gw->pstyle->disabled.edge);
}
#endif // GFX_USE_GWIN && GFX_NEED_LABEL
diff --git a/src/gwin/progressbar.c b/src/gwin/progressbar.c
index c64e2119..524a5346 100644
--- a/src/gwin/progressbar.c
+++ b/src/gwin/progressbar.c
@@ -84,6 +84,10 @@ GHandle gwinGProgressbarCreate(GDisplay *g, GProgressbarObject *gs, const GWidge
gs->pos = 0;
gs->delay = 0;
+ #if GWIN_PROGRESSBAR_AUTO
+ gtimerInit(&gs->gt);
+ #endif
+
ResetDisplayPos(gs);
gwinSetVisible((GHandle)gs, pInit->g.show);
@@ -179,54 +183,47 @@ void gwinProgressbarDecrement(GHandle gh) {
#undef gsw
}
-// used by gwinProgressbarStart();
-static void _progressbarCallback(void *param) {
- #define gsw ((GProgressbarObject *)gh)
- GHandle gh = (GHandle)param;
-
- if (gh->vmt != (gwinVMT *)&progressbarVMT)
- return;
-
- gwinProgressbarIncrement(gh);
-
- if (gsw->pos < gsw->max)
+#if GWIN_PROGRESSBAR_AUTO
+ // used by gwinProgressbarStart();
+ static void _progressbarCallback(void *param) {
+ #define gsw ((GProgressbarObject *)gh)
+ GHandle gh = (GHandle)param;
+
+ if (gh->vmt != (gwinVMT *)&progressbarVMT)
+ return;
+
+ gwinProgressbarIncrement(gh);
+
+ if (gsw->pos < gsw->max)
+ gtimerStart(&(gsw->gt), _progressbarCallback, gh, FALSE, gsw->delay);
+
+ #undef gsw
+ }
+
+ void gwinProgressbarStart(GHandle gh, delaytime_t delay) {
+ #define gsw ((GProgressbarObject *)gh)
+
+ if (gh->vmt != (gwinVMT *)&progressbarVMT)
+ return;
+
+ gsw->delay = delay;
+
gtimerStart(&(gsw->gt), _progressbarCallback, gh, FALSE, gsw->delay);
-
- #undef gsw
-}
-
-void gwinProgressbarStart(GHandle gh, delaytime_t delay) {
- #define gsw ((GProgressbarObject *)gh)
-
- if (gh->vmt != (gwinVMT *)&progressbarVMT)
- return;
-
- gsw->delay = delay;
-
- gtimerInit(&(gsw->gt));
- gtimerStart(&(gsw->gt), _progressbarCallback, gh, FALSE, gsw->delay);
-
- #if 0
- // if this is not made, the progressbar will not start when it's already visible
- if (gsw->w.g.flags & GWIN_FLG_VISIBLE) {
- gwinSetVisible(gh, FALSE);
- gwinSetVisible(gh, TRUE);
- }
- #endif
-
- #undef gsw
-}
-
-void gwinProgressbarStop(GHandle gh) {
- #define gsw ((GProgressbarObject *)gh)
-
- if (gh->vmt != (gwinVMT *)&progressbarVMT)
- return;
-
- gtimerStop(&(gsw->gt));
-
- #undef gsw
-}
+
+ #undef gsw
+ }
+
+ void gwinProgressbarStop(GHandle gh) {
+ #define gsw ((GProgressbarObject *)gh)
+
+ if (gh->vmt != (gwinVMT *)&progressbarVMT)
+ return;
+
+ gtimerStop(&(gsw->gt));
+
+ #undef gsw
+ }
+#endif /* GWIN_PROGRESSBAR_AUTO */
/*----------------------------------------------------------
* Custom Draw Routines
diff --git a/src/gwin/progressbar.h b/src/gwin/progressbar.h
index fcf76b12..5253ba0c 100644
--- a/src/gwin/progressbar.h
+++ b/src/gwin/progressbar.h
@@ -30,7 +30,7 @@ typedef struct GProgressbarObject {
int max;
int res;
int pos;
- #if GFX_USE_GTIMER
+ #if GWIN_PROGRESSBAR_AUTO
GTimer gt;
delaytime_t delay;
#endif
@@ -147,31 +147,33 @@ void gwinProgressbarDecrement(GHandle gh);
*/
#define gwinProgressbarReset(gh) gwinProgressbarSetPosition(gh, ((GProgressbarObject *)(gh))->min)
-/**
- * @brief Automatically increments the progress bar
- *
- * @note The delay is generated using the GTIMER module which is based on software/virtual timer.
- * Therefore, the delay is totally unprecise.
- *
- * @note The progressbar incrementation starts at the current level. It is not reset to the minimum value.
- *
- * @note An event is generated once the maximum value has been reached (ToDo)
- *
- * @param[in] gh The window handle (must be a progressbar window)
- * @param[in] delay The incrementation delay (in milliseconds)
- *
- * @api
- */
-void gwinProgressbarStart(GHandle gh, delaytime_t delay);
-
-/**
- * @brief Stop the timer which is started by @p gwinProgressbarStart()
- *
- * @param[in] gh The window handle (must be a progressbar window)
- *
- * @api
- */
-void gwinProgressbarStop(GHandle gh);
+#if GWIN_PROGRESSBAR_AUTO
+ /**
+ * @brief Automatically increments the progress bar
+ *
+ * @note The delay is generated using the GTIMER module which is based on software/virtual timer.
+ * Therefore, the delay is totally unprecise.
+ *
+ * @note The progressbar incrementation starts at the current level. It is not reset to the minimum value.
+ *
+ * @note An event is generated once the maximum value has been reached (ToDo)
+ *
+ * @param[in] gh The window handle (must be a progressbar window)
+ * @param[in] delay The incrementation delay (in milliseconds)
+ *
+ * @api
+ */
+ void gwinProgressbarStart(GHandle gh, delaytime_t delay);
+
+ /**
+ * @brief Stop the timer which is started by @p gwinProgressbarStart()
+ *
+ * @param[in] gh The window handle (must be a progressbar window)
+ *
+ * @api
+ */
+ void gwinProgressbarStop(GHandle gh);
+#endif /* GWIN_PROGRESSBAR_AUTO */
/**
* @brief Some custom progressbar drawing routines
diff --git a/src/gwin/sys_defs.h b/src/gwin/sys_defs.h
index be99be1e..431de67c 100644
--- a/src/gwin/sys_defs.h
+++ b/src/gwin/sys_defs.h
@@ -37,7 +37,7 @@ typedef struct GWindowObject *GHandle;
*/
typedef struct GWindowObject {
#if GWIN_NEED_WINDOWMANAGER
- // This MUST be the first member of the struct
+ // This MUST be the first member of the structure
gfxQueueASyncItem wmq; // @< The next window (for the window manager)
#endif
const struct gwinVMT *vmt; // @< The VMT for this GWIN
@@ -62,6 +62,10 @@ typedef struct GWindowObject {
*
* @note Some gwin's will need extra parameters.
* @note The dimensions and position may be changed to fit on the real screen.
+ * @note If you create this structure on the stack, you should always memset
+ * it to all zero's first in case a future version of the software
+ * add's extra fields. Alternatively you can use @p gwinClearInit()
+ * to clear it.
*
* @{
*/
@@ -111,6 +115,18 @@ extern "C" {
*-------------------------------------------------*/
/**
+ * @brief Clear a GWindowInit structure to all zero's
+ * @note This function is provided just to prevent problems
+ * on operating systems where using memset() causes issues
+ * in the users application.
+ *
+ * @param[in] pwi The GWindowInit structure to clear
+ *
+ * @api
+ */
+ void gwinClearInit(GWindowInit *pwi);
+
+ /**
* @brief Set the default foreground color for all new GWIN windows
*
* @param[in] clr The color to be set
@@ -941,7 +957,7 @@ extern "C" {
#endif
#if GWIN_NEED_IMAGE || defined(__DOXYGEN__)
- #include "src/gwin/image.h"
+ #include "src/gwin/gimage.h"
#endif
#endif /* GFX_USE_GWIN */
diff --git a/src/gwin/sys_options.h b/src/gwin/sys_options.h
index bd720711..69507b94 100644
--- a/src/gwin/sys_options.h
+++ b/src/gwin/sys_options.h
@@ -72,6 +72,13 @@
#define GWIN_NEED_BUTTON FALSE
#endif
/**
+ * @brief Should progressbar functions be included.
+ * @details Defaults to FALSE
+ */
+ #ifndef GWIN_NEED_PROGRESSBAR
+ #define GWIN_NEED_PROGRESSBAR FALSE
+ #endif
+ /**
* @brief Should slider functions be included.
* @details Defaults to FALSE
*/
@@ -221,6 +228,13 @@
#ifndef GWIN_NEED_IMAGE_ANIMATION
#define GWIN_NEED_IMAGE_ANIMATION FALSE
#endif
+ /**
+ * @brief Enable the API to automatically increment the progressbar over time
+ * @details Defaults to FALSE
+ */
+ #ifndef GWIN_PROGRESSBAR_AUTO
+ #define GWIN_PROGRESSBAR_AUTO FALSE
+ #endif
/** @} */
#endif /* _GWIN_OPTIONS_H */
diff --git a/src/gwin/sys_rules.h b/src/gwin/sys_rules.h
index 3178def8..fda55fe7 100644
--- a/src/gwin/sys_rules.h
+++ b/src/gwin/sys_rules.h
@@ -17,6 +17,7 @@
#define _GWIN_RULES_H
#if GFX_USE_GWIN
+ // Sub-system rules
#if !GFX_USE_GDISP
#error "GWIN: GFX_USE_GDISP must be TRUE when using GWIN"
#endif
@@ -25,18 +26,8 @@
#warning "GWIN: Drawing can occur outside the defined windows as GDISP_NEED_CLIP is FALSE"
#endif
#endif
- #if GWIN_NEED_IMAGE
- #if !GDISP_NEED_IMAGE
- #error "GWIN: GDISP_NEED_IMAGE is required when GWIN_NEED_IMAGE is TRUE."
- #endif
- #endif
- #if GWIN_NEED_RADIO
- #if !GDISP_NEED_CIRCLE
- #if GFX_DISPLAY_RULE_WARNINGS
- #warning "GWIN: GDISP_NEED_CIRCLE should be set to TRUE for much nicer radio button widgets."
- #endif
- #endif
- #endif
+
+ // Objects require their super-class
#if GWIN_NEED_HIERARCHY
#if !GQUEUE_NEED_ASYNC
#if GFX_DISPLAY_RULE_WARNINGS
@@ -59,17 +50,14 @@
GWIN_NEED_IMAGE || GWIN_NEED_CHECKBOX || GWIN_NEED_PROGRESSBAR
#if !GWIN_NEED_WIDGET
#if GFX_DISPLAY_RULE_WARNINGS
- #warning "GWIN: GWIN_NEED_WIDGET is required when a Widget is used. It has been turned on for you."
+ #warning "GWIN: GWIN_NEED_WIDGET is required when a widget is used. It has been turned on for you."
#endif
#undef GWIN_NEED_WIDGET
#define GWIN_NEED_WIDGET TRUE
#endif
#endif
- #if GWIN_NEED_LIST
- #if !GDISP_NEED_TEXT
- #error "GWIN: GDISP_NEED_TEXT is required when GWIN_NEED_LIST is TRUE."
- #endif
- #endif
+
+ // Rules for the super-classes
#if GWIN_NEED_WIDGET
#if !GDISP_NEED_TEXT
#error "GWIN: GDISP_NEED_TEXT is required if GWIN_NEED_WIDGET is TRUE."
@@ -104,12 +92,36 @@
#define GQUEUE_NEED_ASYNC TRUE
#endif
#endif
+
+ // Rules for individual objects
+ #if GWIN_NEED_LIST
+ #if !GDISP_NEED_TEXT
+ #error "GWIN: GDISP_NEED_TEXT is required when GWIN_NEED_LIST is TRUE."
+ #endif
+ #endif
+ #if GWIN_NEED_RADIO
+ #if !GDISP_NEED_CIRCLE
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GWIN: GDISP_NEED_CIRCLE should be set to TRUE for much nicer radio button widgets."
+ #endif
+ #endif
+ #endif
+ #if GWIN_NEED_IMAGE
+ #if !GDISP_NEED_IMAGE
+ #error "GWIN: GDISP_NEED_IMAGE is required when GWIN_NEED_IMAGE is TRUE."
+ #endif
+ #endif
#if GWIN_NEED_CONSOLE
#if !GDISP_NEED_TEXT
#error "GWIN: GDISP_NEED_TEXT is required if GWIN_NEED_CONSOLE is TRUE."
#endif
#endif
- #if GWIN_NEED_GRAPH
+ #if GWIN_NEED_PROGRESSBAR
+ #if GWIN_PROGRESSBAR_AUTO
+ #if !GFX_USE_GTIMER
+ #error "GWIN: GFX_USE_GTIMER is required if GWIN_PROGRESSBAR_AUTO is TRUE."
+ #endif
+ #endif
#endif
#endif