1 #ifndef LIBRARIES_GADTOOLS_H
2 #define LIBRARIES_GADTOOLS_H
5 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 Desc: Definitions and structures for gadtools.library.
13 # include <exec/types.h>
15 #ifndef INTUITION_GADGETCLASS_H
16 # include <intuition/gadgetclass.h>
18 #ifndef INTUITION_INTUITION_H
19 # include <intuition/intuition.h>
21 #ifndef UTILITY_TAGITEM_H
22 # include <utility/tagitem.h>
27 /* Name of the gadtools.library as constant. This is an AROS extension. */
28 #define GADTOOLSNAME "gadtools.library"
32 /* Kinds for CreateGadgetA() */
33 #define GENERIC_KIND 0
37 #define CHECKBOX_KIND 2
38 /* to enter numbers */
39 #define INTEGER_KIND 3
40 /* to list a bunch of entries */
41 #define LISTVIEW_KIND 4
42 /* mutually exclusive entry gadget */
46 /* like MX_KIND, but rendered differently */
48 /* to choose a color */
49 #define PALETTE_KIND 8
50 /* to select a value of a range of values */
51 #define SCROLLER_KIND 9
52 /* like SCROLLER_KIND, but with a fixed range */
53 #define SLIDER_KIND 11
55 #define STRING_KIND 12
67 UBYTE
* ng_GadgetText
;
68 struct TextAttr
* ng_TextAttr
;
71 ULONG ng_Flags
; /* see below */
77 The PLACETEXT flags (specified in <intuition/gadgetclass.h>) specify where
78 to put the label(s) of the gadget
80 #define PLACETEXT_LEFT (1L<<0)
81 #define PLACETEXT_RIGHT (1L<<1)
82 #define PLACETEXT_ABOVE (1L<<2)
83 #define PLACETEXT_BELOW (1L<<3)
84 #define PLACETEXT_IN (1L<<4)
85 #define NG_HIGHLABEL (1L<<5)
87 /* IDCMP-Flags necessary for certain gadgets */
88 #define ARROWIDCMP (IDCMP_GADGETUP | \
90 IDCMP_MOUSEBUTTONS | \
92 #define BUTTONIDCMP (IDCMP_GADGETUP)
93 #define CHECKBOXIDCMP (IDCMP_GADGETUP)
94 #define INTEGERIDCMP (IDCMP_GADGETUP)
95 #define LISTVIEWIDCMP (ARROWIDCMP | \
99 #define MXIDCMP (IDCMP_GADGETDOWN)
100 #define NUMBERIDCMP (0L)
101 #define CYCLEIDCMP (IDCMP_GADGETUP)
102 #define PALETTEIDCMP (IDCMP_GADGETUP)
103 #define SCROLLERIDCMP (IDCMP_GADGETUP | \
106 #define SLIDERIDCMP (IDCMP_GADGETUP | \
109 #define STRINGIDCMP (IDCMP_GADGETUP)
110 #define TEXTIDCMP (0L)
114 #define CHECKBOX_WIDTH 26
115 #define CHECKBOX_HEIGHT 11
117 /* Indicate that gadget is an gadtools-gadget (PRIVATE) */
118 #define GTYP_GADTOOLS 0x0100
124 UBYTE nm_Type
; /* see below */
126 STRPTR nm_Label
; /* may be a STRPTR or NM_BARLABEL (see below) */
128 UWORD nm_Flags
; /* see below */
129 LONG nm_MutualExclude
;
134 #define NM_END 0x0000
135 #define NM_TITLE 0x0001
136 #define NM_ITEM 0x0002
137 #define NM_SUB 0x0003
138 #define NM_IGNORE 0x0040
139 #define IM_ITEM 0x0082
140 #define IM_SUB 0x0083
143 #define NM_BARLABEL ((STRPTR)-1)
146 #define NM_MENUDISABLED MENUENABLED
147 #define NM_ITEMDISABLED ITEMENABLED
148 #define NM_COMMANDSTRING COMMSEQ
150 #define NM_FLAGMASK (~(ITEMTEXT | HIGHFLAGS | COMMSEQ))
151 #define NM_FLAGMASK_V39 (~(ITEMTEXT | HIGHFLAGS))
154 #define GTMENU_USERDATA(menu) (*((APTR *)(((struct Menu *)menu)+1)))
155 #define GTMENUITEM_USERDATA(item) (*((APTR *)(((struct MenuItem *)item)+1)))
157 #define GTMENU_TRIMMED 0x00000001
158 #define GTMENU_INVALID 0x00000002
159 #define GTMENU_NOMEM 0x00000003
163 #define GT_TagBase TAG_USER+0x00080000
164 #define GTCB_Checked (GT_TagBase + 4)
165 #define GTLV_Top (GT_TagBase + 5)
166 #define GTLV_Labels (GT_TagBase + 6)
167 #define GTLV_ReadOnly (GT_TagBase + 7)
168 #define GTLV_ScrollWidth (GT_TagBase + 8)
169 #define GTMX_Labels (GT_TagBase + 9)
170 #define GTMX_Active (GT_TagBase + 10)
171 #define GTTX_Text (GT_TagBase + 11)
172 #define GTTX_CopyText (GT_TagBase + 12)
173 #define GTNM_Number (GT_TagBase + 13)
174 #define GTCY_Labels (GT_TagBase + 14)
175 #define GTCY_Active (GT_TagBase + 15)
176 #define GTPA_Depth (GT_TagBase + 16)
177 #define GTPA_Color (GT_TagBase + 17)
178 #define GTPA_ColorOffset (GT_TagBase + 18)
179 #define GTPA_IndicatorWidth (GT_TagBase + 19)
180 #define GTPA_IndicatorHeight (GT_TagBase + 20)
181 #define GTSC_Top (GT_TagBase + 21)
182 #define GTSC_Total (GT_TagBase + 22)
183 #define GTSC_Visible (GT_TagBase + 23)
184 #define GTSC_Overlap (GT_TagBase + 24)
185 #define GTSL_Min (GT_TagBase + 38)
186 #define GTSL_Max (GT_TagBase + 39)
187 #define GTSL_Level (GT_TagBase + 40)
188 #define GTSL_MaxLevelLen (GT_TagBase + 41)
189 #define GTSL_LevelFormat (GT_TagBase + 42)
190 #define GTSL_LevelPlace (GT_TagBase + 43)
191 #define GTSL_DispFunc (GT_TagBase + 44)
192 #define GTST_String (GT_TagBase + 45)
193 #define GTST_MaxChars (GT_TagBase + 46)
194 #define GTIN_Number (GT_TagBase + 47)
195 #define GTIN_MaxChars (GT_TagBase + 48)
196 #define GTMN_TextAttr (GT_TagBase + 49)
197 #define GTMN_FrontPen (GT_TagBase + 50)
198 #define GTBB_Recessed (GT_TagBase + 51)
199 #define GT_VisualInfo (GT_TagBase + 52)
200 #define GTLV_ShowSelected (GT_TagBase + 53)
201 #define GTLV_Selected (GT_TagBase + 54)
202 #define GTST_EditHook (GT_TagBase + 55)
203 #define GTIN_EditHook (GT_TagBase + 55)
204 #define GTTX_Border (GT_TagBase + 57)
205 #define GTNM_Border (GT_TagBase + 58)
206 #define GTSC_Arrows (GT_TagBase + 59)
207 #define GTMN_Menu (GT_TagBase + 60)
208 #define GTMX_Spacing (GT_TagBase + 61)
209 #define GTMN_FullMenu (GT_TagBase + 62)
210 #define GTMN_SecondaryError (GT_TagBase + 63)
211 #define GT_Underscore (GT_TagBase + 64)
212 #define GTMN_Checkmark (GT_TagBase + 65)
213 #define GTMN_AmigaKey (GT_TagBase + 66)
214 #define GTMN_NewLookMenus (GT_TagBase + 67)
215 #define GTCB_Scaled (GT_TagBase + 68)
216 #define GTMX_Scaled (GT_TagBase + 69)
217 #define GTPA_NumColors (GT_TagBase + 70)
218 #define GTMX_TitlePlace (GT_TagBase + 71)
219 #define GTTX_FrontPen (GT_TagBase + 72)
220 #define GTNM_FrontPen (GT_TagBase + 72)
221 #define GTTX_BackPen (GT_TagBase + 73)
222 #define GTNM_BackPen (GT_TagBase + 73)
223 #define GTTX_Justification (GT_TagBase + 74)
224 #define GTNM_Justification (GT_TagBase + 74)
225 #define GTNM_Format (GT_TagBase + 75)
226 #define GTNM_MaxNumberLen (GT_TagBase + 76)
227 #define GTBB_FrameType (GT_TagBase + 77)
228 #define GTLV_MakeVisible (GT_TagBase + 78)
229 #define GTLV_ItemHeight (GT_TagBase + 79)
230 #define GTSL_MaxPixelLen (GT_TagBase + 80)
231 #define GTSL_Justification (GT_TagBase + 81)
232 #define GTPA_ColorTable (GT_TagBase + 82)
233 #define GTLV_CallBack (GT_TagBase + 83)
234 #define GTLV_MaxPen (GT_TagBase + 84)
235 #define GTTX_Clipped (GT_TagBase + 85)
236 #define GTNM_Clipped (GT_TagBase + 85)
238 /* GTTX_Justification and GTNM_Justification */
244 #define BBFT_BUTTON 1
246 #define BBFT_ICONDROPBOX 3
249 #define LV_DRAW 0x202
250 /* return values from these hooks */
252 #define LVCB_UNKNOWN 1
255 #define INTERHEIGHT 4
259 ULONG lvdm_MethodID
; /* LV_DRAW */
260 struct RastPort
* lvdm_RastPort
;
261 struct DrawInfo
* lvdm_DrawInfo
;
262 struct Rectangle lvdm_Bounds
;
268 #define LVR_SELECTED 1
269 #define LVR_NORMALDISABLED 2
270 #define LVR_SELECTEDDISABLED 8
274 #endif /* LIBRARIES_GADTOOLS_H */