aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Hannam <andrewh@inmarket.com.au>2013-04-06 22:31:40 +1000
committerAndrew Hannam <andrewh@inmarket.com.au>2013-04-06 22:31:40 +1000
commitbe919fc38d46339a254e0d789c69773f7e600ff5 (patch)
tree62ee1f1e179797de6f9a87a05d80a1295f7f52fc /src
parent25ed70badeb451b783492717d1d43f7677e74cca (diff)
downloaduGFX-be919fc38d46339a254e0d789c69773f7e600ff5.tar.gz
uGFX-be919fc38d46339a254e0d789c69773f7e600ff5.tar.bz2
uGFX-be919fc38d46339a254e0d789c69773f7e600ff5.zip
Create generic GWIN Draw routine
For some GWIN controls they support a Draw() routine. For those controls the base class now supports a generic Draw routine which will call their specific Draw routine. The only GWIN's with a Draw routine currently are Buttons and Sliders.
Diffstat (limited to 'src')
-rw-r--r--src/gwin/gwin.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 58d75694..9f009fa1 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -107,6 +107,21 @@ void gwinDestroyWindow(GHandle gh) {
}
}
+void gwinDraw(GHandle gh) {
+ switch(gh->type) {
+ #if GWIN_NEED_BUTTON
+ case GW_BUTTON:
+ gwinButtonDraw(gh);
+ break;
+ #endif
+ #if GWIN_NEED_SLIDER
+ case GW_SLIDER:
+ gwinSliderDraw(gh);
+ break;
+ #endif
+ }
+}
+
#if GDISP_NEED_TEXT
void gwinSetFont(GHandle gh, font_t font) {
gh->font = font;