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_SetFlags(tAxWin3_Widget *Widget, int FlagSet, int FlagMask);
25 extern void AxWin3_Widget_SetSize(tAxWin3_Widget *Widget, int Size);
26 extern void AxWin3_Widget_SetText(tAxWin3_Widget *Widget, const char *Text);
27 extern void AxWin3_Widget_SetColour(tAxWin3_Widget *Widget, int Index, tAxWin3_Colour Colour);
33 ELETYPE_BOX, //!< Content box (invisible in itself)
34 ELETYPE_TEXT, //!< Text
35 ELETYPE_IMAGE, //!< Image
36 ELETYPE_BUTTON, //!< Push Button
37 ELETYPE_SPACER, //!< Visual Spacer (horizontal / vertical rule)
39 ELETYPE_TABBAR, //!< Tab Bar
40 ELETYPE_TOOLBAR, //!< Tool Bar
50 * If set, the element will be ignored in calculating sizes and
53 ELEFLAG_NORENDER = 0x001,
55 * \brief Element visibility
57 * If set, the element is not drawn (but still is used for size calculations)
59 ELEFLAG_INVISIBLE = 0x002,
62 * \brief Position an element absulutely (ignored in size calcs)
64 ELEFLAG_ABSOLUTEPOS = 0x004,
67 * \brief Fixed size element
69 ELEFLAG_FIXEDSIZE = 0x008,
72 * \brief Element "orientation"
74 * Vertical means that the children of this element are stacked,
75 * otherwise they list horizontally
77 ELEFLAG_VERTICAL = 0x010,// ELEFLAG_HORIZONTAL = 0x000,
79 * \brief Action for text that overflows
81 ELEFLAG_WRAP = 0x020,// ELEFLAG_NOWRAP = 0x000,
83 * \brief Cross size action
85 * If this flag is set, the element will only be as large (across
86 * its parent) as is needed to encase the contents of the element.
87 * Otherwise, the element will expand to fill all avaliable space.
89 ELEFLAG_NOEXPAND = 0x040,
92 * \brief With (length) size action
93 * If this flag is set, the element will only be as large as
94 * is required along it's parent
96 ELEFLAG_NOSTRETCH = 0x080,
99 * \brief Center alignment
101 ELEFLAG_ALIGN_CENTER= 0x100,
103 * \brief Right/Bottom alignment
105 * If set, the element aligns to the end of avaliable space (instead
108 ELEFLAG_ALIGN_END = 0x200