aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-07-01 19:53:58 +0200
committerJoel Bodenmann <joel@unormal.org>2013-07-01 19:53:58 +0200
commit931c46526521c5fd36856b1fc1990136d5f7f255 (patch)
treea6abe987bcc1892fdbc6aa85a00237cbbd88c692 /src
parentf188613d30977ac44f89e4eab9c5f9784169f576 (diff)
downloaduGFX-931c46526521c5fd36856b1fc1990136d5f7f255.tar.gz
uGFX-931c46526521c5fd36856b1fc1990136d5f7f255.tar.bz2
uGFX-931c46526521c5fd36856b1fc1990136d5f7f255.zip
GLabel work in progress
Diffstat (limited to 'src')
-rw-r--r--src/gwin/gwin.mk3
-rw-r--r--src/gwin/label.c67
2 files changed, 69 insertions, 1 deletions
diff --git a/src/gwin/gwin.mk b/src/gwin/gwin.mk
index 9c114b3b..9a81728e 100644
--- a/src/gwin/gwin.mk
+++ b/src/gwin/gwin.mk
@@ -7,4 +7,5 @@ GFXSRC += $(GFXLIB)/src/gwin/gwin.c \
$(GFXLIB)/src/gwin/slider.c \
$(GFXLIB)/src/gwin/checkbox.c \
$(GFXLIB)/src/gwin/image.c \
-
+ $(GFXLIB)/src/gwin/label.c \
+
diff --git a/src/gwin/label.c b/src/gwin/label.c
new file mode 100644
index 00000000..e31a3de6
--- /dev/null
+++ b/src/gwin/label.c
@@ -0,0 +1,67 @@
+/*
+ * This file is subject to the terms of the GFX License. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://chibios-gfx.com/license.html
+ */
+
+/**
+ * @file include/gwin/label.h
+ * @brief GWIN label widget header file.
+ *
+ * @defgroup Label Label
+ * @ingroup GWIN
+ *
+ * @{
+ */
+
+#include "gfx.h"
+
+#if GFX_USE_GWIN && GWIN_NEED_LABEL
+
+#include "gwin/class_gwin.h"
+
+#define widget(gh) ((GLabelWidget*)gh)
+
+static void _destroy(GWindowObject *gh) {
+ (void)gh;
+
+ return;
+}
+
+static void _redraw(GWindowObject *gh) {
+ (void)gh;
+
+ return;
+}
+
+static void _afterClear(GWindowObject *gh) {
+ (void)gh;
+
+ return;
+}
+
+GHandle gwinLabelCreate(GLabelWidget *widget, GWindowInit *pInit) {
+
+}
+
+void gwinLabelSetColor(GHandle gh, color_t color) {
+ widget(gh)->g.color = color;
+}
+
+void gwinLabelSetBgColor(GHandle gh, color_t bgColor) {
+ widget(gh)->g.bgcolor = bgColor;
+}
+
+void gwinLabelSetText(GHandle gh, char* text) {
+ widget(gh)->text = text;
+
+ gwinLabelDraw(gh);
+}
+
+void gwinLabelDraw(GHandle gh) {
+
+}
+
+#endif // GFX_USE_GWIN && GFX_NEED_LABEL
+