aboutsummaryrefslogtreecommitdiffstats
path: root/include
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 /include
parentf188613d30977ac44f89e4eab9c5f9784169f576 (diff)
downloaduGFX-931c46526521c5fd36856b1fc1990136d5f7f255.tar.gz
uGFX-931c46526521c5fd36856b1fc1990136d5f7f255.tar.bz2
uGFX-931c46526521c5fd36856b1fc1990136d5f7f255.zip
GLabel work in progress
Diffstat (limited to 'include')
-rw-r--r--include/gwin/gwin.h4
-rw-r--r--include/gwin/label.h55
2 files changed, 59 insertions, 0 deletions
diff --git a/include/gwin/gwin.h b/include/gwin/gwin.h
index 832dea96..10aabf6f 100644
--- a/include/gwin/gwin.h
+++ b/include/gwin/gwin.h
@@ -724,6 +724,10 @@ extern "C" {
#include "gwin/image.h"
#endif
+ #if GWIN_NEED_LABEL || defined(__DOXYGEN__)
+ #include "gwin/label.h"
+ #endif
+
#endif /* GFX_USE_GWIN */
#endif /* _GWIN_H */
diff --git a/include/gwin/label.h b/include/gwin/label.h
new file mode 100644
index 00000000..3874026c
--- /dev/null
+++ b/include/gwin/label.h
@@ -0,0 +1,55 @@
+/*
+ * 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
+ *
+ * @details GWIN allos it to create an label widget. The widget
+ * takes no user input.
+ *
+ * @pre GFX_USE_GDISP must be set to TRUE in your gfxconf.h
+ * @pre GFX_USE_GWIN must be set to TRUE in your gfxconf.h
+ * @pre GDISP_NEED_TEXT must be set to TRUE in your gfxconf.h
+ * @pre GWIN_NEED_LABEL must be set to TRUE in your gfxconf.h
+ * @pre The font you want to use must be enabled in your gfxconf.h
+ *
+ * @{
+ */
+
+#ifndef _GWIN_LABEL_H
+#define _GWIN_LABEL_H
+
+// This file is included within "gwin/gwin.h"
+
+// An label window
+typedef struct GLabelWidget_t {
+ GWindowObject g;
+
+ char* text;
+} GLabelWidget;
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+GHandle gwinLabelCreate(GLabelWidget *widget, GWindowInit *pInit);
+void gwinLabelSetColor(GHandle gh, color_t color);
+void gwinLabelSetBgColor(GHandle gh, color_t bgColor);
+void gwinLabelSetText(GHandle gh, char* text);
+void gwinLabelDraw(GHandle gh);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _GWIN_LABEL_H
+/** @} */
+