2 Copyright © 1995-2011, 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)
130 #define ASLLV_DoSaveMode (ASLLV_Dummy + 17)
134 #define ASLBT_Dummy (PGA_Top + 300)
135 #define ASLBT_CoolImage (ASLBT_Dummy + 1)
139 #define ASLCY_Dummy (PGA_Top + 400)
140 #define ASLCY_Labels (ASLCY_Dummy + 1)
141 #define ASLCY_Active (ASLCY_Dummy + 2)
142 #define ASLCY_Font (ASLCY_Dummy + 3)
144 /* ColorPickerClass */
146 #define ASLCP_Dummy (PGA_Top + 500)
147 #define ASLCP_NumColors (ASLCP_Dummy + 1)
148 #define ASLCP_ColorTable (ASLCP_Dummy + 2)
149 #define ASLCP_Color (ASLCP_Dummy + 3)
151 /* FontPreviewClass */
153 #define ASLFP_APen IA_FGPen
154 #define ASLFP_BPen IA_BGPen
155 #define ASLFP_Style IA_Mode
156 #define ASLFP_Font IA_Font
157 #define ASLFP_SampleText GA_Text
161 #define ASLFS_Style SYSIA_Style
162 #define ASLFS_LabelArray GA_Text
164 /*****************************************************************************************/
168 #define ASLLV_DRAW 0x202
171 #define ASLLVCB_UNKNOWN 1
173 #define ASLLVR_NORMAL 0
174 #define ASLLVR_SELECTED 1
176 #define ASLLV_MAXCOLUMNS 5
177 #define ASLLV_ALIGN_LEFT 0
178 #define ASLLV_ALIGN_RIGHT 1
180 /*****************************************************************************************/
184 STACKED ULONG lvdm_MethodID
; /* LV_DRAW */
185 STACKED
struct RastPort
* lvdm_RastPort
;
186 STACKED
struct DrawInfo
* lvdm_DrawInfo
;
187 STACKED
struct Rectangle lvdm_Bounds
;
188 STACKED ULONG lvdm_State
;
191 struct ASLLVFileReqNode
194 char *text
[ASLLV_MAXCOLUMNS
];
195 struct DateStamp date
;
203 /*****************************************************************************************/
205 #define ASLLV_FRNTYPE_DIRECTORY 1
206 #define ASLLV_FRNTYPE_VOLUMES 2
208 #define NODEPRIF_SELECTED 1
209 #define NODEPRIF_MULTISEL 2
211 #define MARK_SELECTED(x) (((struct Node *)(x))->ln_Pri |= NODEPRIF_SELECTED)
212 #define MARK_UNSELECTED(x) (((struct Node *)(x))->ln_Pri &= ~NODEPRIF_SELECTED)
213 #define IS_SELECTED(x) (((struct Node *)(x))->ln_Pri & NODEPRIF_SELECTED)
215 #define MARK_DO_MULTISEL(x) (((struct Node *)(x))->ln_Pri |= NODEPRIF_MULTISEL)
216 #define MARK_NO_MULTISEL(x) (((struct Node *)(x))->ln_Pri &= ~NODEPRIF_MULTISEL)
217 #define IS_MULTISEL(x) (((struct Node *)(x))->ln_Pri & NODEPRIF_MULTISEL)
220 /*****************************************************************************************/
224 #define ID_ARROWDEC 100
225 #define ID_ARROWINC 101
226 #define ID_MAINBUTTON_OK 102
227 #define ID_MAINBUTTON_MIDDLELEFT 103
228 #define ID_MAINBUTTON_MIDDLERIGHT 104
229 #define ID_MAINBUTTON_CANCEL 105
231 #define SCROLLTICKER 4 /* arrow gadget -> prop gadget scroll repeat delay in 1/10 sec */
233 /* This command should calculate window's min size
236 #define LDCMD_WINDOWOPENED 1
237 /* Layout the gadgets */
238 #define LDCMD_LAYOUT 2
240 #define LDCMD_HANDLEEVENTS 3
241 #define LDCMD_HANDLEAPPWINDOW 4
242 /* Cleanup anything requester specific allocated in INIT, LAYOUT or HANDLEEVENTS */
243 #define LDCMD_CLEANUP 5
245 /* Special retuen value for HANDLEEVENTS to express that the
246 user has successfully requested something and hit "OK" */
248 #define LDRET_FINISHED 2
250 /*****************************************************************************************/
252 /* Structure for storing data between LayoutGadgets and HandleEvents type hooks */
257 BOOL ld_ScreenLocked
;
259 struct Gadget
*ld_GList
;
260 struct Window
*ld_Window
;
261 struct Window
*ld_Window2
;
262 struct Menu
*ld_Menu
;
263 struct Screen
*ld_Screen
;
264 struct DrawInfo
*ld_Dri
;
266 struct IntReq
*ld_IntReq
;
268 struct RastPort ld_DummyRP
;
270 /* The font to use in the GUI */
271 struct TextFont
*ld_Font
;
273 /* Texattr describing the above font */
274 struct TextAttr ld_TextAttr
;
281 /* Used for passing back info about minimum *inner* window size
282 * From LDCMD_INIT hook
289 /* Used for passing an inputevent to
290 * LDCMD_HANDLEEVENTS hooks
292 struct IntuiMessage
*ld_Event
;
294 /* Used for appwindow stuff
296 struct AppMessage
*ld_AppMsg
;
297 struct MsgPort
*ld_AppMsgPort
;
298 struct AppWindow
*ld_AppWindow
;
299 STRPTR ld_ForeignerFiles
;
303 struct ScrollerGadget
308 #if USE_SAFE_NOTIFYING
314 #endif /* LAYOUT_H */