Usermode/AxWin3 - Working on IPC
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / include / renderer_widget.h
1 /*
2  * Acess2 Window Manager v3
3  * - By John Hodge (thePowersGang)
4  *
5  * render_widget.h
6  * - AxWin2 Widget port
7  */
8 #ifndef _RENDERER_WIDGET_H_
9 #define _RENDERER_WIDGET_H_
10
11 #include <wm_renderer.h>
12
13 enum
14 {
15         MSG_WIDGET_CREATE,
16         MSG_WIDGET_DELETE,
17         MSG_WIDGET_SETTEXT
18 };
19
20 enum eElementTypes
21 {
22         ELETYPE_NONE,
23
24         ELETYPE_WINDOW, //!< Window root element
25         
26         ELETYPE_BOX,    //!< Content box (invisible in itself)
27         ELETYPE_TABBAR, //!< Tab Bar
28         ELETYPE_TOOLBAR,        //!< Tool Bar
29         
30         ELETYPE_BUTTON, //!< Push Button
31         
32         ELETYPE_TEXT,   //!< Text
33         ELETYPE_IMAGE,  //!< Image
34         
35         ELETYPE_SPACER, //!< Visual Spacer (horizontal / vertical rule)
36         
37         MAX_ELETYPES    = 0x100
38 };
39
40 enum eElementFlags
41 {
42         /**
43          * \brief Rendered
44          * 
45          * If set, the element will be ignored in calculating sizes and
46          * rendering.
47          */
48         ELEFLAG_NORENDER    = 0x001,
49         /**
50          * \brief Element visibility
51          * 
52          * If set, the element is not drawn (but still is used for size calculations)
53          */
54         ELEFLAG_INVISIBLE   = 0x002,
55         
56         /**
57          * \brief Position an element absulutely (ignored in size calcs)
58          */
59         ELEFLAG_ABSOLUTEPOS = 0x004,
60         
61         /**
62          * \brief Fixed size element
63          */
64         ELEFLAG_FIXEDSIZE   = 0x008,
65         
66         /**
67          * \brief Element "orientation"
68          * 
69          * Vertical means that the children of this element are stacked,
70          * otherwise they list horizontally
71          */
72         ELEFLAG_VERTICAL    = 0x010,//  ELEFLAG_HORIZONTAL  = 0x000,
73         /**
74          * \brief Action for text that overflows
75          */
76         ELEFLAG_WRAP        = 0x020,//  ELEFLAG_NOWRAP      = 0x000,
77         /**
78          * \brief Cross size action
79          * 
80          * If this flag is set, the element will only be as large (across
81          * its parent) as is needed to encase the contents of the element.
82          * Otherwise, the element will expand to fill all avaliable space.
83          */
84         ELEFLAG_NOEXPAND    = 0x040,
85         
86         /**
87          * \brief With (length) size action
88          * If this flag is set, the element will only be as large as
89          * is required along it's parent
90          */
91         ELEFLAG_NOSTRETCH   = 0x080,
92         
93         /**
94          * \brief Center alignment
95          */
96         ELEFLAG_ALIGN_CENTER= 0x100,
97         /**
98          * \brief Right/Bottom alignment
99          * 
100          * If set, the element aligns to the end of avaliable space (instead
101          * of the beginning)
102          */
103         ELEFLAG_ALIGN_END       = 0x200
104 };
105
106 typedef struct
107 {
108         uint32_t        Parent;
109         uint32_t        NewID;
110         char    DebugName[];
111 } tWidgetMsg_Create;
112
113 #endif
114

UCC git Repository :: git.ucc.asn.au