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 FixedWith; // Fixed Long Size attribute (height)
19 short FixedCross; // Fixed Cross Size attribute (width)
23 // -- Attributes maitained by the element code
24 // Not touched by the user
25 short MinWith; // Minimum long size
26 short MinCross; // Minimum cross size
32 short CachedX, CachedY;
33 short CachedW, CachedH;
38 int Type; // Should be zero, allows a tab to be the parent of an element
40 struct sElement *Parent;
41 struct sElement *FirstChild;
42 struct sElement *LastChild;
46 tElement *RootElement;
49 typedef struct sApplication
65 * If set, the element will be ignored in calculating sizes and
68 ELEFLAG_NORENDER = 0x001,
70 * \brief Element visibility
72 * If set, the element is not drawn.
74 ELEFLAG_INVISIBLE = 0x002,
77 * \brief Position an element absulutely
79 ELEFLAG_ABSOLUTEPOS = 0x004,
82 * \brief Fixed size element
84 ELEFLAG_FIXEDSIZE = 0x008,
87 * \brief Element "orientation"
89 ELEFLAG_VERTICAL = 0x010,// ELEFLAG_HORIZONTAL = 0x000,
91 * \brief Action for text that overflows
93 ELEFLAG_WRAP = 0x020,// ELEFLAG_NOWRAP = 0x000,
95 * \brief Cross size action
97 * If this flag is set, the element will only be as large (across
98 * its parent) as is needed to encase the contents of the element.
99 * Otherwise, the element will expand to fill all avaliable space.
101 ELEFLAG_NOEXPAND = 0x040,
103 ELEFLAG_NOSTRETCH = 0x080,
106 * \brief Center alignment
108 ELEFLAG_ALIGN_CENTER= 0x100,
110 * \brief Right/Bottom alignment
112 ELEFLAG_ALIGN_END = 0x200
121 ELETYPE_BOX, //!< Content box
122 ELETYPE_TABBAR, //!< Tab Bar
123 ELETYPE_TOOLBAR, //!< Tool Bar
125 ELETYPE_BUTTON, //!< Push Button
126 ELETYPE_TEXT, //!< Text
127 ELETYPE_IMAGE, //!< Image
129 ELETYPE_SPACER, //!< Visual Spacer
136 * \brief Create a new element as a child of \a Parent
138 extern tElement *WM_CreateElement(tElement *Parent, int Type, int Flags);
139 extern void WM_SetFlags(tElement *Element, int Flags);
140 extern void WM_SetSize(tElement *Element, int Size);
141 extern void WM_SetText(tElement *Element, char *Text);