1 #ifndef _MADRID_FAKEGADGETS
2 #define _MADRID_FAKEGADGETS
4 /*********************************************************************
5 ----------------------------------------------------------------------
9 ----------------------------------------------------------------------
10 *********************************************************************/
12 #include <exec/lists.h>
13 #include <guigfx/guigfx.h>
24 struct Window
*window
;
27 struct FakeGadget
*rollovergadget
;
28 struct FakeGadget
*pressedgadget
;
44 int x
, y
; // inserted from layout
56 LONG pen_activerollover
;
57 LONG pen_activepressed
;
59 // struct BitMap *bitmap;
65 ULONG picx_activerollover
;
66 ULONG picx_activepressed
;
72 ULONG picy_activerollover
;
73 ULONG picy_activepressed
;
77 #define FGDT_DUMMY (TAG_USER + 111)
78 #define FGDT_HBORDER (FGDT_DUMMY+1)
79 #define FGDT_VBORDER (FGDT_DUMMY+2)
80 #define FGDT_WIDTH (FGDT_DUMMY+3)
81 #define FGDT_HEIGHT (FGDT_DUMMY+4)
82 #define FGDT_INACTIVEPEN (FGDT_DUMMY+5)
83 #define FGDT_PRESSEDPEN (FGDT_DUMMY+6)
84 #define FGDT_ROLLOVERPEN (FGDT_DUMMY+7)
85 #define FGDT_ACTIVEPEN (FGDT_DUMMY+8)
86 #define FGDT_ACTIVEROLLOVERPEN (FGDT_DUMMY+9)
87 #define FGDT_ACTIVEPRESSEDPEN (FGDT_DUMMY+10)
88 #define FGDT_BITMAP (FGDT_DUMMY+11)
90 #define FGDT_PICX_INACTIVE (FGDT_DUMMY+12)
91 #define FGDT_PICX_PRESSED (FGDT_DUMMY+13)
92 #define FGDT_PICX_ROLLOVER (FGDT_DUMMY+14)
93 #define FGDT_PICX_ACTIVE (FGDT_DUMMY+15)
94 #define FGDT_PICX_ACTIVEROLLOVER (FGDT_DUMMY+16)
95 #define FGDT_PICX_ACTIVEPRESSED (FGDT_DUMMY+17)
97 #define FGDT_PICY_INACTIVE (FGDT_DUMMY+18)
98 #define FGDT_PICY_PRESSED (FGDT_DUMMY+19)
99 #define FGDT_PICY_ROLLOVER (FGDT_DUMMY+20)
100 #define FGDT_PICY_ACTIVE (FGDT_DUMMY+21)
101 #define FGDT_PICY_ACTIVEROLLOVER (FGDT_DUMMY+22)
102 #define FGDT_PICY_ACTIVEPRESSED (FGDT_DUMMY+23)
124 #define INVALID_FAKEGADGET (0xffffffff)
126 void DeleteFakeGadgetList(struct FakeGadgetList
*fgl
);
127 #define CreateFakeGadgetList(win, ...) \
128 ({ IPTR args[] = { __VA_ARGS__ }; CreateFakeGadgetListA(win, args); })
129 struct FakeGadgetList
*CreateFakeGadgetListA(struct Window
*win
, IPTR
*args
);
130 #define CreateFakeGadget(id, type, ...) \
131 ({ IPTR args[] = { __VA_ARGS__ }; CreateFakeGadgetA(id, type, args); })
132 struct FakeGadget
*CreateFakeGadgetA(ULONG id
, ULONG type
, IPTR
*args
);
133 void RemFakeGadget(struct FakeGadget
*fg
);
134 void DeleteFakeGadget(struct FakeGadget
*fg
);
135 void AddFakeGadget(struct FakeGadgetList
*fgl
, struct FakeGadget
*fg
);
136 void GetLayoutData(struct FakeGadgetList
*fgl
, int orientation
, int *minwidth
, int *minheight
);
137 BOOL
LayoutFakeGadgetList(struct FakeGadgetList
*fgl
, int orientation
, int width
, int height
, int x
, int y
);
138 void DrawFakeGadgetList(struct FakeGadgetList
*fgl
, struct BitMap
*bm
);
139 ULONG
HandleGadgetListEvent(struct FakeGadgetList
*fgl
, struct IntuiMessage
*imsg
, struct BitMap
*bm
);
140 void DrawFakeGadget(struct Window
*win
, struct FakeGadget
*fg
, int x
, int y
, struct BitMap
*bitmap
);