From be919fc38d46339a254e0d789c69773f7e600ff5 Mon Sep 17 00:00:00 2001 From: Andrew Hannam Date: Sat, 6 Apr 2013 22:31:40 +1000 Subject: 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. --- src/gwin/gwin.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src') 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; -- cgit v1.2.3