2 * Acess2 Window Manager v3
3 * - By John Hodge (thePowersGang)
5 * renderer/widget/button.c
10 #include "./colours.h"
13 void Widget_DispText_Render(tWindow *Window, tElement *Element)
17 Element->CachedX+1, Element->CachedY+1,
18 Element->CachedW-2, Element->CachedH-2,
24 void Widget_DispText_UpdateText(tElement *Element, const char *Text)
28 if(Element->Text) free(Element->Text);
29 Element->Text = strdup(Text);
31 WM_Render_GetTextDims(NULL, Element->Text, -1, &w, &h);
39 Widget_UpdateMinDims(Element->Parent);
42 DEFWIDGETTYPE(ELETYPE_TEXT,
43 WIDGETTYPE_FLAG_NOCHILDREN,
44 .Render = Widget_DispText_Render,
45 .UpdateText = Widget_DispText_UpdateText