5 typedef struct sElement
9 struct sElement *Parent;
10 struct sElement *FirstChild;
11 struct sElement *LastChild;
12 struct sElement *NextSibling;
14 short PaddingL, PaddingR;
15 short PaddingT, PaddingB;
18 short Size; // Size attribute
26 short CachedX, CachedY;
27 short CachedW, CachedH;
32 int Type; // Should be zero, allows a tab to be the parent of an element
34 struct sElement *Parent;
35 struct sElement *FirstChild;
36 struct sElement *LastChild;
40 tElement *RootElement;
43 typedef struct sApplication
59 * If set, the element will be ignored in calculating sizes and
62 ELEFLAG_NORENDER = 0x001,
64 * \brief Element visibility
66 * If set, the element is not drawn.
68 ELEFLAG_INVISIBLE = 0x002,
71 * \brief Position an element absulutely
73 ELEFLAG_ABSOLUTEPOS = 0x004,
76 * \brief Fixed size element
78 ELEFLAG_FIXEDSIZE = 0x008,
81 * \brief Element "orientation"
83 ELEFLAG_VERTICAL = 0x010,// ELEFLAG_HORIZONTAL = 0x000,
85 * \brief Action for text that overflows
87 ELEFLAG_WRAP = 0x020,// ELEFLAG_NOWRAP = 0x000,
89 * \brief Cross size action
91 * If this flag is set, the element will only be as large (across
92 * its parent) as is needed to encase the contents of the element.
93 * Otherwise, the element will expand to fill all avaliable space.
95 ELEFLAG_NOEXPAND = 0x040, // ELEFLAG_EXPAND = 0x000
98 * \brief Center alignment
100 ELEFLAG_ALIGN_CENTER= 0x080,
102 * \brief Right/Bottom alignment
104 ELEFLAG_ALIGN_END = 0x100
113 ELETYPE_BOX, //!< Content box
114 ELETYPE_TABBAR, //!< Tab Bar
115 ELETYPE_TOOLBAR, //!< Tool Bar
117 ELETYPE_BUTTON, //!< Push Button
118 ELETYPE_TEXT, //!< Text
119 ELETYPE_IMAGE, //!< Image
121 ELETYPE_SPACER, //!< Visual Spacer
128 * \brief Create a new element as a child of \a Parent
130 extern tElement *WM_CreateElement(tElement *Parent, int Type, int Flags);
131 extern void WM_SetFlags(tElement *Element, int Flags);
132 extern void WM_SetSize(tElement *Element, int Size);
133 extern void WM_SetText(tElement *Element, char *Text);