2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
13 # include <exec/types.h>
21 # include <dos/exall.h>
24 #ifndef GRAPHICS_RASTPORT_H
25 # include <graphics/rastport.h>
28 #ifndef GRAPHICS_TEXT_H
29 # include <graphics/text.h>
32 #ifndef LIBRARIES_GADTOOLS_H
33 # include <libraries/gadtools.h>
36 /*****************************************************************************************/
38 struct AslBase_intern
;
40 /*****************************************************************************************/
44 /* AROS gadgetclass checks notification loops, while AmigaOS gadgetclass does not.
45 By setting USE_SAFE_NOTIFYING to 1, icclass objects will be used for connection
46 between listview gadget and scrollergadget (instead of direct connection through
47 gadget objects only), which is always safe, as icclass in both AmigaOS and AROS
48 checks for notification loops */
50 #define USE_SAFE_NOTIFYING 1
52 /*****************************************************************************************/
54 /* spacing and sizes for layout */
56 #define BORDERPROPSPACINGX 4
57 #define BORDERPROPSPACINGY 4
59 #define BORDERSTRINGSPACINGX 6
60 #define BORDERSTRINGSPACINGY 4
62 #define BORDERLVSPACINGX 4
63 #define BORDERLVSPACINGY 4
65 #define BORDERCYCLESPACINGX 4
67 #define GADGETSPACINGX 4
68 #define GADGETSPACINGY 4
70 #define OUTERSPACINGX 4
71 #define OUTERSPACINGY 4
73 #define LABELSPACINGX 8
75 #define BUTTONEXTRAWIDTH 16
76 #define BUTTONEXTRAHEIGHT 8
78 #define CYCLEEXTRAWIDTH 32
80 #define IMAGEBUTTONEXTRAHEIGHT 4
81 #define IMAGEBUTTONEXTRAWIDTH 4
82 #define BORDERIMAGESPACINGX 4
84 #define BORDERLVITEMSPACINGX 2
85 #define BORDERLVITEMSPACINGY 1
89 #define MIN_SPACING 10
91 /*****************************************************************************************/
93 /* defines for string edit hook */
95 #define STRINGCODE_CURSORUP 1
96 #define STRINGCODE_CURSORDOWN 2
97 #define STRINGCODE_NOP 3
99 /*****************************************************************************************/
104 #define ASLSC_Dummy (PGA_Top + 100)
106 #define ASLSC_Inc (ASLSC_Dummy + 1)
107 #define ASLSC_Dec (ASLSC_Dummy + 2)
108 #define ASLSC_DeltaFactor (ASLSC_Dummy + 3)
112 #define ASLLV_Dummy (PGA_Top + 200)
114 #define ASLLV_ItemHeight (ASLLV_Dummy + 1)
115 #define ASLLV_Spacing (ASLLV_Dummy + 2)
116 #define ASLLV_Labels (ASLLV_Dummy + 3)
117 #define ASLLV_Top (ASLLV_Dummy + 4)
118 #define ASLLV_Active (ASLLV_Dummy + 5)
119 #define ASLLV_CallBack (ASLLV_Dummy + 6)
120 #define ASLLV_Visible (ASLLV_Dummy + 7)
121 #define ASLLV_Total (ASLLV_Dummy + 8)
122 #define ASLLV_DoMultiSelect (ASLLV_Dummy + 9)
123 #define ASLLV_MakeVisible (ASLLV_Dummy + 10)
124 #define ASLLV_ReadOnly (ASLLV_Dummy + 11)
125 #define ASLLV_Font (ASLLV_Dummy + 12)
126 #define ASLLV_TopPixel (ASLLV_Dummy + 13)
127 #define ASLLV_TotalPixels (ASLLV_Dummy + 14)
128 #define ASLLV_VisiblePixels (ASLLV_Dummy + 15)
129 #define ASLLV_DeltaFactor (ASLLV_Dummy + 16)
133 #define ASLBT_Dummy (PGA_Top + 300)
134 #define ASLBT_CoolImage (ASLBT_Dummy + 1)
138 #define ASLCY_Dummy (PGA_Top + 400)
139 #define ASLCY_Labels (ASLCY_Dummy + 1)
140 #define ASLCY_Active (ASLCY_Dummy + 2)
141 #define ASLCY_Font (ASLCY_Dummy + 3)
143 /* ColorPickerClass */
145 #define ASLCP_Dummy (PGA_Top + 500)
146 #define ASLCP_NumColors (ASLCP_Dummy + 1)
147 #define ASLCP_ColorTable (ASLCP_Dummy + 2)
148 #define ASLCP_Color (ASLCP_Dummy + 3)
150 /* FontPreviewClass */
152 #define ASLFP_APen IA_FGPen
153 #define ASLFP_BPen IA_BGPen
154 #define ASLFP_Style IA_Mode
155 #define ASLFP_Font IA_Font
156 #define ASLFP_SampleText GA_Text
160 #define ASLFS_Style SYSIA_Style
161 #define ASLFS_LabelArray GA_Text
163 /*****************************************************************************************/
167 #define ASLLV_DRAW 0x202
170 #define ASLLVCB_UNKNOWN 1
172 #define ASLLVR_NORMAL 0
173 #define ASLLVR_SELECTED 1
175 #define ASLLV_MAXCOLUMNS 5
176 #define ASLLV_ALIGN_LEFT 0
177 #define ASLLV_ALIGN_RIGHT 1
179 /*****************************************************************************************/
183 STACKED ULONG lvdm_MethodID
; /* LV_DRAW */
184 STACKED
struct RastPort
* lvdm_RastPort
;
185 STACKED
struct DrawInfo
* lvdm_DrawInfo
;
186 STACKED
struct Rectangle lvdm_Bounds
;
187 STACKED ULONG lvdm_State
;
190 struct ASLLVFileReqNode
193 char *text
[ASLLV_MAXCOLUMNS
];
194 struct DateStamp date
;
202 /*****************************************************************************************/
204 #define ASLLV_FRNTYPE_DIRECTORY 1
205 #define ASLLV_FRNTYPE_VOLUMES 2
207 #define NODEPRIF_SELECTED 1
208 #define NODEPRIF_MULTISEL 2
210 #define MARK_SELECTED(x) (((struct Node *)(x))->ln_Pri |= NODEPRIF_SELECTED)
211 #define MARK_UNSELECTED(x) (((struct Node *)(x))->ln_Pri &= ~NODEPRIF_SELECTED)
212 #define IS_SELECTED(x) (((struct Node *)(x))->ln_Pri & NODEPRIF_SELECTED)
214 #define MARK_DO_MULTISEL(x) (((struct Node *)(x))->ln_Pri |= NODEPRIF_MULTISEL)
215 #define MARK_NO_MULTISEL(x) (((struct Node *)(x))->ln_Pri &= ~NODEPRIF_MULTISEL)
216 #define IS_MULTISEL(x) (((struct Node *)(x))->ln_Pri & NODEPRIF_MULTISEL)
219 /*****************************************************************************************/
223 #define ID_ARROWDEC 100
224 #define ID_ARROWINC 101
225 #define ID_MAINBUTTON_OK 102
226 #define ID_MAINBUTTON_MIDDLELEFT 103
227 #define ID_MAINBUTTON_MIDDLERIGHT 104
228 #define ID_MAINBUTTON_CANCEL 105
230 #define SCROLLTICKER 4 /* arrow gadget -> prop gadget scroll repeat delay in 1/10 sec */
232 /* This command should calculate window's min size
235 #define LDCMD_WINDOWOPENED 1
236 /* Layout the gadgets */
237 #define LDCMD_LAYOUT 2
239 #define LDCMD_HANDLEEVENTS 3
240 /* Cleanup anything requester specific allocated in INIT, LAYOUT or HANDLEEVENTS */
241 #define LDCMD_CLEANUP 4
243 /* Special retuen value for HANDLEEVENTS to express that the
244 user has successfully requested something and hit "OK" */
246 #define LDRET_FINISHED 2
248 /*****************************************************************************************/
250 /* Structure for storing data between LayoutGadgets and HandleEvents type hooks */
255 BOOL ld_ScreenLocked
;
257 struct Gadget
*ld_GList
;
258 struct Window
*ld_Window
;
259 struct Window
*ld_Window2
;
260 struct Menu
*ld_Menu
;
261 struct Screen
*ld_Screen
;
262 struct DrawInfo
*ld_Dri
;
264 struct IntReq
*ld_IntReq
;
266 struct RastPort ld_DummyRP
;
268 /* The font to use in the GUI */
269 struct TextFont
*ld_Font
;
271 /* Texattr describing the above font */
272 struct TextAttr ld_TextAttr
;
279 /* Used for passing back info about minimum *inner* window size
280 * From LDCMD_INIT hook
287 /* Used for passing an inputevent to
288 * LDCMD_HANDLEEVENTS hooks
290 struct IntuiMessage
*ld_Event
;
294 struct ScrollerGadget
299 #if USE_SAFE_NOTIFYING
305 #endif /* LAYOUT_H */