2 * Acess2 Window Manager v3
3 * - By John Hodge (thePowersGang)
5 * renderer/widget/spacer.
6 * - Horizontal / Verical Line
10 #include "./colours.h"
12 #define SPACER_RULE_SIZE 3
13 #define SPACER_RULE_OFFSET 1
15 void Widget_Spacer_Render(tWindow *Window, tElement *Element)
17 // _SysDebug("Spacer at (%i,%i) %ix%i",
18 // Element->CachedX, Element->CachedY,
19 // Element->CachedW, Element->CachedH
21 if( Element->Parent && (Element->Parent->Flags & ELEFLAG_VERTICAL) )
25 Element->CachedX+1, Element->CachedY+1,
26 Element->CachedW-2, SPACER_RULE_SIZE,
34 Element->CachedX+1, Element->CachedY+1,
35 SPACER_RULE_SIZE, Element->CachedH-2,
41 void Widget_Spacer_Init(tElement *Element)
43 Element->MinH = SPACER_RULE_SIZE+1;
44 Element->MinW = SPACER_RULE_SIZE+1;
47 DEFWIDGETTYPE(ELETYPE_SPACER,
48 WIDGETTYPE_FLAG_NOCHILDREN,
49 .Render = Widget_Spacer_Render,
50 .Init = Widget_Spacer_Init