2 * Acess2 Window Manager v3
3 * - By John Hodge (thePowersGang)
5 * renderer/widget/textinput.c
6 * - Single line text box
10 #include "./colours.h"
12 void Widget_TextInput_Render(tWindow *Window, tElement *Element)
16 Element->CachedX, Element->CachedY,
17 Element->CachedW, Element->CachedH,
22 Element->CachedX, Element->CachedY,
23 Element->CachedW, Element->CachedH,
28 Element->CachedX+1, Element->CachedY+1,
29 Element->CachedW-2, Element->CachedH-2,
35 void Widget_TextInput_Init(tElement *Element)
39 // TODO: Select font correctly
40 WM_Render_GetTextDims(NULL, "jJ", NULL, &h);
42 if( Element->Parent && (Element->Parent->Flags & ELEFLAG_VERTICAL) )
45 Element->MinCross = h;
47 // No need to explicitly update parent min dims, as the AddElement routine does that
50 DEFWIDGETTYPE(ELETYPE_TEXTINPUT,
51 .Render = Widget_TextInput_Render,
52 .Init = Widget_TextInput_Init