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;
16 short MinWidth, MinHeight;
19 short Size; // Size attribute
27 short CachedX, CachedY;
28 short CachedW, CachedH;
33 int Type; // Should be zero, allows a tab to be the parent of an element
35 struct sElement *Parent;
36 struct sElement *FirstChild;
37 struct sElement *LastChild;
41 tElement *RootElement;
44 typedef struct sApplication
60 * If set, the element will be ignored in calculating sizes and
63 ELEFLAG_NORENDER = 0x001,
65 * \brief Element visibility
67 * If set, the element is not drawn.
69 ELEFLAG_INVISIBLE = 0x002,
72 * \brief Position an element absulutely
74 ELEFLAG_ABSOLUTEPOS = 0x004,
77 * \brief Fixed size element
79 ELEFLAG_FIXEDSIZE = 0x008,
82 * \brief Element "orientation"
84 ELEFLAG_VERTICAL = 0x010,// ELEFLAG_HORIZONTAL = 0x000,
86 * \brief Action for text that overflows
88 ELEFLAG_WRAP = 0x020,// ELEFLAG_NOWRAP = 0x000,
90 * \brief Cross size action
92 * If this flag is set, the element will only be as large (across
93 * its parent) as is needed to encase the contents of the element.
94 * Otherwise, the element will expand to fill all avaliable space.
96 ELEFLAG_NOEXPAND = 0x040, // ELEFLAG_EXPAND = 0x000
99 * \brief Center alignment
101 ELEFLAG_ALIGN_CENTER= 0x080,
103 * \brief Right/Bottom alignment
105 ELEFLAG_ALIGN_END = 0x100
114 ELETYPE_BOX, //!< Content box
115 ELETYPE_TABBAR, //!< Tab Bar
116 ELETYPE_TOOLBAR, //!< Tool Bar
118 ELETYPE_BUTTON, //!< Push Button
119 ELETYPE_TEXT, //!< Text
120 ELETYPE_IMAGE, //!< Image
122 ELETYPE_SPACER, //!< Visual Spacer
129 * \brief Create a new element as a child of \a Parent
131 extern tElement *WM_CreateElement(tElement *Parent, int Type, int Flags);
132 extern void WM_SetFlags(tElement *Element, int Flags);
133 extern void WM_SetSize(tElement *Element, int Size);
134 extern void WM_SetText(tElement *Element, char *Text);