700540d5c34bbfd04e2e79f05ee5c19c7805f128
[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 #include <axwin3/widget.h>
13
14 #include <widget_messages.h>
15
16 // === TYPES ===
17 typedef struct sWidgetWin       tWidgetWin;
18 typedef struct sAxWin_Element   tElement;
19
20 // === STRUCTURES ===
21 struct sAxWin_Element
22 {
23         enum eElementTypes      Type;
24
25         uint32_t        ID;     //!< Application provided ID number
26         tElement        *ListNext;      //!< Next element in bucket
27         
28         // Element Tree
29         tElement        *Parent;
30         tElement        *FirstChild;
31         tElement        *LastChild;
32         tElement        *NextSibling;
33         
34         // User modifiable attributes   
35         short   PaddingL, PaddingR;
36         short   PaddingT, PaddingB;
37         short   GapSize;
38         
39         uint32_t        Flags;
40         
41         short   FixedWith;      //!< Fixed lengthways Size attribute (height)
42         short   FixedCross;     //!< Fixed Cross Size attribute (width)
43         
44         tColour BackgroundColour;
45
46         char    *Text;
47         
48         // -- Attributes maitained by the element code
49         // Not touched by the user
50         short   MinWith;        //!< Minimum long size
51         short   MinCross;       //!< Minimum cross size
52         void    *Data;  //!< Per-type data
53         
54         // -- Render Cache
55         short   CachedX, CachedY;
56         short   CachedW, CachedH;
57         
58         char    DebugName[];
59 };
60 struct sWidgetWin
61 {
62         tElement        RootElement;
63         
64          int    TableSize;      //!< Number of entries, anything over will wrap
65         tElement        *ElementTable[];        //!< Hash table essentially
66 };
67
68 // === FUNCTIONS === 
69 extern void     Widget_Decorator_RenderWidget(tWindow *Window, tElement *Element);
70
71 #endif
72

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