diff options
author | Joel Bodenmann <joel@unormal.org> | 2014-04-28 23:20:51 +0200 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2014-04-28 23:20:51 +0200 |
commit | 135f8f5ecac5bc04bc18438bf78fd7ba82c40816 (patch) | |
tree | fb9475415cd85fb4eee71b097c07838755bdffd3 /src/gwin/label.h | |
parent | 8b4ca720369d790ea330bc2189efa05cc557c2f7 (diff) | |
download | uGFX-135f8f5ecac5bc04bc18438bf78fd7ba82c40816.tar.gz uGFX-135f8f5ecac5bc04bc18438bf78fd7ba82c40816.tar.bz2 uGFX-135f8f5ecac5bc04bc18438bf78fd7ba82c40816.zip |
Added gwinLabelSetAttribute()
Diffstat (limited to 'src/gwin/label.h')
-rw-r--r-- | src/gwin/label.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/gwin/label.h b/src/gwin/label.h index 9d62738d..5cf87ad1 100644 --- a/src/gwin/label.h +++ b/src/gwin/label.h @@ -32,6 +32,11 @@ // An label window typedef struct GLabelObject { GWidgetObject w; + + #if GWIN_LABEL_ATTRIBUTE + coord_t tab; + char* attr; + #endif } GLabelObject; #ifdef __cplusplus @@ -63,6 +68,29 @@ GHandle gwinGLabelCreate(GDisplay *g, GLabelObject *widget, GWidgetInit *pInit); */ void gwinLabelSetBorder(GHandle gh, bool_t border); +#if GWIN_LABEL_ATTRIBUTE + /** + * @brief Add an attribute in front of the actualy label text + * @detail Often you want to display a text like this: + * Current IP: 192.168.1.42 + * In that case, one the actual IP will be variable, the text in front of it + * always remains the same. The static text is called the attribute and can be + * set using this function. + * Furthermore, the tab can be set in order to vertically align multiple labels. + * Please check out the website for further explanation, illustraions and usage + * examples. + * + * @note The attribute text is currently not being allocated + * + * @param[in] gh The widget handle (must be a label handle) + * @param[in] tab The distance of the label text from the left widget edge + * @param[in] attr The attribute to be displayed + * + * @api + */ + void gwinLabelSetAttribute(GHandle gh, coord_t tab, char* attr); +#endif + #ifdef __cplusplus } #endif |