From fcaa42972964e002474e6f79364f3af1a616d25c Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Fri, 14 Aug 2015 18:33:16 +0200 Subject: First working Version of TextEdit widget --- src/gwin/gwin_textedit.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/gwin/gwin_textedit.h') diff --git a/src/gwin/gwin_textedit.h b/src/gwin/gwin_textedit.h index 84057df4..2b5e26e7 100644 --- a/src/gwin/gwin_textedit.h +++ b/src/gwin/gwin_textedit.h @@ -31,6 +31,10 @@ // A TextEdit widget typedef struct GTexteditObject { GWidgetObject w; + + char* textBuffer; + size_t bufferSize; + uint16_t cursorPos; } GTexteditObject; #ifdef __cplusplus @@ -46,13 +50,14 @@ extern "C" { * @param[in] g The GDisplay on which the textedit should be displayed * @param[in] widget The TextEdit structure to initialise. If this is NULL, the structure is dynamically allocated. * @param[in] pInit The initialisation parameters to use. + * @param[in] bufSize The maximum number of characters the TextEdit widget can hold. * * @return NULL if there is no resultat drawing area, otherwise the widget handle. * * @api */ -GHandle gwinGTexteditCreate(GDisplay* g, GTexteditObject* widget, GWidgetInit* pInit); -#define gwinTexteditCreate(w, pInit) gwinGTexteditCreate(GDISP, w, pInit) +GHandle gwinGTexteditCreate(GDisplay* g, GTexteditObject* widget, GWidgetInit* pInit, size_t bufSize); +#define gwinTexteditCreate(w, pInit, bufSize) gwinGTexteditCreate(GDISP, w, pInit, bufSize) #ifdef __cplusplus } -- cgit v1.2.3