2 * Acess2 GUI Version 3 (AxWin3)
3 * - By John Hodge (thePowersGang)
6 * - Server-side widget library
8 #ifndef _AXWIN3_WIDGET_H_
9 #define _AXWIN3_WIDGET_H_
13 typedef struct sAxWin3_Widget tAxWin3_Widget;
15 typedef int (*tAxWin3_Widget_Callback)(tAxWin3_Widget Widget, int EventType, unsigned long EventArg);
17 extern tHWND AxWin3_Widget_CreateWindow(tHWND Parent, int W, int H, int RootEleFlags);
18 extern void AxWin3_Widget_DestroyWindow(tHWND Window);
19 extern tAxWin3_Widget *AxWin3_WidgeT_GetRoot(tHWND Window);
21 extern tAxWin3_Widget *AxWin3_Widget_AddWidget(tAxWin3_Widget *Parent, int Type, int Flags, const char *DebugName);
22 extern void AxWin3_Widget_DelWidget(tAxWin3_Widget *Widget);
24 extern void AxWin3_Widget_SetSize(tAxWin3_Widget *Widget, int Size);
25 extern void AxWin3_Widget_SetText(tAxWin3_Widget *Widget, const char *Text);
26 extern void AxWin3_Widget_SetColour(tAxWin3_Widget *Widget, int Index, tAxWin3_Colour Colour);
32 ELETYPE_WINDOW, //!< Window root element
34 ELETYPE_BOX, //!< Content box (invisible in itself)
35 ELETYPE_TABBAR, //!< Tab Bar
36 ELETYPE_TOOLBAR, //!< Tool Bar
38 ELETYPE_BUTTON, //!< Push Button
40 ELETYPE_TEXT, //!< Text
41 ELETYPE_IMAGE, //!< Image
43 ELETYPE_SPACER, //!< Visual Spacer (horizontal / vertical rule)
53 * If set, the element will be ignored in calculating sizes and
56 ELEFLAG_NORENDER = 0x001,
58 * \brief Element visibility
60 * If set, the element is not drawn (but still is used for size calculations)
62 ELEFLAG_INVISIBLE = 0x002,
65 * \brief Position an element absulutely (ignored in size calcs)
67 ELEFLAG_ABSOLUTEPOS = 0x004,
70 * \brief Fixed size element
72 ELEFLAG_FIXEDSIZE = 0x008,
75 * \brief Element "orientation"
77 * Vertical means that the children of this element are stacked,
78 * otherwise they list horizontally
80 ELEFLAG_VERTICAL = 0x010,// ELEFLAG_HORIZONTAL = 0x000,
82 * \brief Action for text that overflows
84 ELEFLAG_WRAP = 0x020,// ELEFLAG_NOWRAP = 0x000,
86 * \brief Cross size action
88 * If this flag is set, the element will only be as large (across
89 * its parent) as is needed to encase the contents of the element.
90 * Otherwise, the element will expand to fill all avaliable space.
92 ELEFLAG_NOEXPAND = 0x040,
95 * \brief With (length) size action
96 * If this flag is set, the element will only be as large as
97 * is required along it's parent
99 ELEFLAG_NOSTRETCH = 0x080,
102 * \brief Center alignment
104 ELEFLAG_ALIGN_CENTER= 0x100,
106 * \brief Right/Bottom alignment
108 * If set, the element aligns to the end of avaliable space (instead
111 ELEFLAG_ALIGN_END = 0x200