aboutsummaryrefslogtreecommitdiffstats
path: root/include/gwin/label.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-07-02 08:29:38 +0200
committerJoel Bodenmann <joel@unormal.org>2013-07-02 08:29:38 +0200
commitad57ab7967d0e0ee3cfce8746b0c4969cfe970fd (patch)
tree8002d0a8e8a8b3203d1f3161f6950c57ba4039dc /include/gwin/label.h
parent931c46526521c5fd36856b1fc1990136d5f7f255 (diff)
downloaduGFX-ad57ab7967d0e0ee3cfce8746b0c4969cfe970fd.tar.gz
uGFX-ad57ab7967d0e0ee3cfce8746b0c4969cfe970fd.tar.bz2
uGFX-ad57ab7967d0e0ee3cfce8746b0c4969cfe970fd.zip
wip
Diffstat (limited to 'include/gwin/label.h')
-rw-r--r--include/gwin/label.h18
1 files changed, 15 insertions, 3 deletions
diff --git a/include/gwin/label.h b/include/gwin/label.h
index 3874026c..ed774ed7 100644
--- a/include/gwin/label.h
+++ b/include/gwin/label.h
@@ -19,7 +19,7 @@
* @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
+ * @pre The fonts you want to use must be enabled in your gfxconf.h
*
* @{
*/
@@ -33,17 +33,29 @@
typedef struct GLabelWidget_t {
GWindowObject g;
- char* text;
+ const char* text;
} GLabelWidget;
#ifdef __cplusplus
extern "C" {
#endif
+/**
+ * @brief Create a label widget.
+ * @details A label widget is a simple window which has a static text.
+ *
+ * @param[in] widget The label structure to initialise. If this is NULL, the structure is dynamically allocated.
+ * @param[in] pinit The initialisation parameters to use.
+ *
+ * @return NULL if there is no resultat drawing area, otherwise the widget handle.
+ *
+ * @api
+ */
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 gwinLabelSetFont(GHandle gh, font_t font);
+void gwinLabelSetText(GHandle gh, const char* text);
void gwinLabelDraw(GHandle gh);
#ifdef __cplusplus