home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / powerd / modules.lha / modules / libraries / gtlayout.m < prev    next >
Encoding:
Text File  |  1999-08-18  |  19.4 KB  |  630 lines

  1. /*
  2. **    $VER: gtlayout.h 45.1 (3.7.98)
  3. **    GadTools layout toolkit
  4. **
  5. **    Copyright © 1993-1998 by Olaf `Olsen' Barthel
  6. **        Freely distributable.
  7. **
  8. ** Converted to PowerD by Martin Kuchinka, 1999
  9. */
  10.  
  11. MODULE    'intuition/gadgetclass',
  12.             'libraries/gadtools'
  13.  
  14. /* Kinds of objects supported in addition to the normal GadTools kinds */
  15. ENUM    HORIZONTAL_KIND=45,
  16.         VERTICAL_KIND,
  17.         END_KIND,
  18.         FRAME_KIND,
  19.         BOX_KIND,
  20.         FRACTION_KIND,
  21.         XBAR_KIND,
  22.         YBAR_KIND,
  23.         PASSWORD_KIND,
  24.         GAUGE_KIND,
  25.         TAPEDECK_KIND,
  26.         LEVEL_KIND,
  27.         BOOPSI_KIND,
  28.         POPUP_KIND,
  29.         TAB_KIND,
  30.         BLANK_KIND,
  31.         IMAGE_KIND
  32.  
  33.  
  34. /*****************************************************************************/
  35.  
  36. /* Where to place a gadget label */
  37. ENUM    PLACE_Left,
  38.         PLACE_Right,
  39.         PLACE_Above,
  40.         PLACE_In,
  41.         PLACE_Below
  42.  
  43. /* How to align text lines in BOX_KIND gadgets */
  44. ENUM    ALIGNTEXT_Left,
  45.         ALIGNTEXT_Centered,
  46.         ALIGNTEXT_Right,
  47.         ALIGNTEXT_Pad
  48.  
  49. /* The button images available for TAPEDECK_KIND gadgets. */
  50. ENUM    TDBT_Backward,
  51.         TDBT_Forward,
  52.         TDBT_Previous,
  53.         TDBT_Next,
  54.         TDBT_Stop,
  55.         TDBT_Pause,
  56.         TDBT_Record,
  57.         TDBT_Rewind,
  58.         TDBT_Eject,
  59.         TDBT_Play,
  60.  
  61.         TDBTLAST
  62.  
  63. /* The frame types for groups. */
  64. ENUM    FRAMETYPE_None,
  65.         FRAMETYPE_Label,
  66.         FRAMETYPE_Tab
  67.  
  68. /* How to align the window opened by LT_Build() on the screen. */
  69. SET    ALIGNF_Right,
  70.         ALIGNF_Left,
  71.         ALIGNF_Top,
  72.         ALIGNF_Bottom,
  73.         ALIGNF_ExtraRight,
  74.         ALIGNF_ExtraLeft,
  75.         ALIGNF_ExtraTop,
  76.         ALIGNF_ExtraBottom
  77.  
  78.  
  79. /*****************************************************************************/
  80.  
  81. /* Generic tags, applicable for several object types */
  82. #define LA_Chars                TAG_USER+2
  83. #define LA_LabelPlace        TAG_USER+3
  84. #define LA_ExtraSpace        TAG_USER+4
  85. #define LA_NoKey                TAG_USER+30
  86. #define LA_HighLabel            TAG_USER+31
  87. #define LA_LabelText            TAG_USER+37
  88. #define LA_LabelID            TAG_USER+38
  89. #define LA_ID                    TAG_USER+39
  90. #define LA_Type                TAG_USER+40
  91. #define LA_PageSelector        TAG_USER+79
  92. #define LA_LabelChars        TAG_USER+107
  93. #define LA_DefaultSize        TAG_USER+170
  94. #define LA_LayoutSpace        TAG_USER+189
  95.  
  96. /* Storage type tags */
  97. #define LA_BYTE                TAG_USER+63
  98. #define LA_UBYTE                TAG_USER+64
  99. #define LA_WORD                TAG_USER+65
  100. #define LA_BOOL                TAG_USER+65
  101. #define LA_UWORD                TAG_USER+66
  102. #define LA_LONG                TAG_USER+67
  103. #define LA_ULONG                TAG_USER+68
  104. #define LA_STRPTR                TAG_USER+69
  105.  
  106. /* for use with LT_GetAttributes() only */
  107. #define LA_Left                TAG_USER+16
  108. #define LA_Top                    TAG_USER+17
  109. #define LA_Width                TAG_USER+18
  110. #define LA_Height                TAG_USER+19
  111. #define LA_LabelLeft            TAG_USER+114
  112. #define LA_LabelTop            TAG_USER+115
  113.  
  114. /* BOOPSI_KIND */
  115. #define LABO_TagCurrent        TAG_USER+119
  116. #define LABO_TagTextAttr    TAG_USER+120
  117. #define LABO_TagDrawInfo    TAG_USER+121
  118. #define LABO_TagLink            TAG_USER+129
  119. #define LABO_TagScreen        TAG_USER+132
  120. #define LABO_Link                LALV_Link
  121. #define LABO_ClassInstance    TAG_USER+122
  122. #define LABO_ClassName        TAG_USER+123
  123. #define LABO_ClassLibraryName    TAG_USER+124
  124. #define LABO_ExactWidth        TAG_USER+127
  125. #define LABO_ExactHeight    TAG_USER+128
  126. #define LABO_RelFontHeight    TAG_USER+131
  127. #define LABO_Object            TAG_USER+133
  128. #define LABO_FullWidth        TAG_USER+135
  129. #define LABO_FullHeight        TAG_USER+136
  130. #define LABO_ActivateHook    TAG_USER+141
  131.  
  132. /* BOX_KIND */
  133. #define LABX_Labels            TAG_USER+12
  134. #define LABX_Lines            TAG_USER+13
  135. #define LABX_Chars            TAG_USER+2
  136. #define LABX_Rows                TAG_USER+1
  137. #define LABX_Index            TAG_USER+14
  138. #define LABX_Text                TAG_USER+15
  139. #define LABX_AlignText        TAG_USER+27
  140. #define LABX_DrawBox            TAG_USER+11
  141. #define LABX_FirstLabel        TAG_USER+44
  142. #define LABX_LastLabel        TAG_USER+45
  143. #define LABX_ReserveSpace    TAG_USER+72
  144. #define LABX_LabelTable        TAG_USER+98
  145. #define LABX_FirstLine        TAG_USER+152
  146. #define LABX_LastLine        TAG_USER+153
  147. #define LABX_LineTable        TAG_USER+156
  148. #define LABX_Line                TAG_USER+161
  149. #define LABX_LineID            TAG_USER+162
  150. #define LABX_TextPen            TAG_USER+172
  151. #define LABX_BackPen            TAG_USER+173
  152. #define LABX_Spacing            TAG_USER+180
  153.  
  154. /* BUTTON_KIND */
  155. #define LABT_ReturnKey        TAG_USER+34
  156. #define LABT_DefaultButton    TAG_USER+34
  157. #define LABT_EscKey            TAG_USER+56
  158. #define LABT_ExtraFat        TAG_USER+29
  159. #define LABT_Lines            TAG_USER+140
  160. #define LABT_FirstLine        TAG_USER+44
  161. #define LABT_LastLine        TAG_USER+45
  162. #define LABT_DefaultCorrection    TAG_USER+145
  163. #define LABT_Smaller            TAG_USER+147
  164.  
  165. /* CYCLE_KIND */
  166. #define LACY_FirstLabel        TAG_USER+44
  167. #define LACY_LastLabel        TAG_USER+45
  168. #define LACY_LabelTable        TAG_USER+98
  169. #define LACY_AutoPageID        TAG_USER+103
  170. #define LACY_TabKey            TAG_USER+118
  171.  
  172. /* FRACTION_KIND */
  173. #define LAFR_IncrementerHook    TAG_USER+85
  174.  
  175. /* FRAME_KIND */
  176. #define LAFR_InnerWidth        TAG_USER+9
  177. #define LAFR_InnerHeight    TAG_USER+10
  178. #define LAFR_DrawBox            TAG_USER+11
  179. #define LAFR_RefreshHook    TAG_USER+117
  180. #define LAFR_GenerateEvents    TAG_USER+155
  181. #define LAFR_ResizeX            LALV_ResizeX
  182. #define LAFR_ResizeY            LALV_ResizeY
  183.  
  184. /* GAUGE_KIND */
  185. #define LAGA_Percent            TAG_USER+36
  186. #define LAGA_InfoLength        TAG_USER+70
  187. #define LAGA_InfoText        TAG_USER+71
  188. #define LAGA_NoTicks            TAG_USER+143
  189. #define LAGA_Discrete        TAG_USER+144
  190. #define LAGA_Tenth            TAG_USER+144
  191.  
  192. /* IMAGE_KIND */
  193. #define LAIM_Image            TAG_USER+181
  194. #define LAIM_BitMap            TAG_USER+182
  195. #define LAIM_BitMapLeft        TAG_USER+183
  196. #define LAIM_BitMapTop        TAG_USER+184
  197. #define LAIM_BitMapWidth    TAG_USER+185
  198. #define LAIM_BitMapHeight    TAG_USER+186
  199. #define LAIM_BitMapMask        TAG_USER+187
  200.  
  201. /* INTEGER_KIND */
  202. #define LAIN_LastGadget        TAG_USER+28
  203. #define LAIN_Min                TAG_USER+23
  204. #define LAIN_Max                TAG_USER+24
  205. #define LAIN_UseIncrementers    TAG_USER+57
  206. #define LAIN_Incrementers    TAG_USER+57
  207. #define LAIN_HistoryLines    TAG_USER+59
  208. #define LAIN_HistoryHook    TAG_USER+80
  209. #define LAIN_IncrementerHook    TAG_USER+85
  210. #define LAIN_Activate        TAG_USER+148
  211.  
  212. /* LISTVIEW_KIND */
  213. #define LALV_ExtraLabels    TAG_USER+26
  214. #define LALV_Labels            TAG_USER+33
  215. #define LALV_CursorKey        TAG_USER+35
  216. #define LALV_Columns            TAG_USER+2
  217. #define LALV_Lines            TAG_USER+1
  218. #define LALV_Link                TAG_USER+7
  219. #define LALV_FirstLabel        TAG_USER+44
  220. #define LALV_LastLabel        TAG_USER+45
  221. #define LALV_MaxGrowX        TAG_USER+77
  222. #define LALV_MaxGrowY        TAG_USER+78
  223. #define LALV_LabelTable        TAG_USER+98
  224. #define LALV_LockSize        TAG_USER+106
  225. #define LALV_ResizeX            TAG_USER+109
  226. #define LALV_ResizeY            TAG_USER+110
  227. #define LALV_MinChars        TAG_USER+111
  228. #define LALV_MinLines        TAG_USER+112
  229. #define LALV_FlushLabelLeft    TAG_USER+113
  230. #define LALV_TextAttr        TAG_USER+138
  231. #define LALV_AutoPageID        TAG_USER+103
  232. #define LALV_Selected        TAG_USER+167
  233. #define LALV_AdjustForString    TAG_USER+174
  234.  
  235. /* LEVEL_KIND */
  236. #define LAVL_Min                GTSL_Min
  237. #define LAVL_Max                GTSL_Max
  238. #define LAVL_Level            GTSL_Level
  239. #define LAVL_LevelFormat    GTSL_LevelFormat
  240. #define LAVL_LevelPlace        GTSL_LevelPlace
  241. #define LAVL_DispFunc        GTSL_DispFunc
  242. #define LAVL_FullCheck        LASL_FullCheck
  243. #define LAVL_Freedom            TAG_USER+177    /* (I)  New in V41 */
  244. #define LAVL_Ticks            TAG_USER+178    /* (I)  New in V41 */
  245. #define LAVL_NumTicks        TAG_USER+179    /* (IS) New in V41 */
  246. #define LAVL_Lines            TAG_USER+1
  247.  
  248. /* MX_KIND */
  249. #define LAMX_FirstLabel        TAG_USER+44
  250. #define LAMX_LastLabel        TAG_USER+45
  251. #define LAMX_LabelTable        TAG_USER+98
  252. #define LAMX_TabKey            TAG_USER+118
  253. #define LAMX_AutoPageID        TAG_USER+103
  254.  
  255. /* PALETTE_KIND */
  256. #define LAPA_SmallPalette    TAG_USER+32
  257. #define LAPA_Lines            TAG_USER+1
  258. #define LAPA_UsePicker        TAG_USER+137
  259. #define LAPA_Picker            TAG_USER+137
  260.  
  261. /* PASSWORD_KIND */
  262. #define LAPW_String            GTST_String
  263. #define LAPW_LastGadget        TAG_USER+28
  264. #define LAPW_HistoryLines    TAG_USER+59
  265. #define LAPW_HistoryHook    TAG_USER+80
  266. #define LAPW_Activate        TAG_USER+148
  267. #define LAPW_MaxChars        GTST_MaxChars
  268.  
  269. /* POPUP_KIND */
  270. #define LAPU_FirstLabel        TAG_USER+44
  271. #define LAPU_LastLabel        TAG_USER+45
  272. #define LAPU_LabelTable        TAG_USER+98
  273. #define LAPU_AutoPageID        TAG_USER+103
  274. #define LAPU_TabKey            TAG_USER+118
  275. #define LAPU_Labels            GTCY_Labels
  276. #define LAPU_Active            GTCY_Active
  277. #define LAPU_CentreActive    TAG_USER+163
  278.  
  279. /* SLIDER_KIND */
  280. #define LASL_FullCheck        TAG_USER+22
  281.  
  282. /* SCROLLER_KIND */
  283. #define LASC_Thin                TAG_USER+62
  284. #define LASC_FullSize        TAG_USER+188
  285.  
  286. /* STRING_KIND */
  287. #define LAST_LastGadget        TAG_USER+28
  288. #define LAST_Link                TAG_USER+7
  289. #define LAST_Picker            TAG_USER+5
  290. #define LAST_UsePicker        TAG_USER+5
  291. #define LAST_HistoryLines    TAG_USER+59
  292. #define LAST_HistoryHook    TAG_USER+80
  293. #define LAST_CursorPosition    TAG_USER+105
  294. #define LAST_Activate        TAG_USER+148
  295. #define LAST_ValidateHook    TAG_USER+165
  296.  
  297. /* TAB_KIND */
  298. #define LATB_FirstLabel        TAG_USER+44
  299. #define LATB_LastLabel        TAG_USER+45
  300. #define LATB_LabelTable        TAG_USER+98
  301. #define LATB_AutoPageID        TAG_USER+103
  302. #define LATB_TabKey            TAG_USER+118
  303. #define LATB_Labels            GTCY_Labels
  304. #define LATB_Active            GTCY_Active
  305. #define LATB_FullWidth        TAG_USER+149
  306. #define LATB_FullSize        TAG_USER+149
  307.  
  308. /* TAPEDECK_KIND */
  309. #define LATD_ButtonType        TAG_USER+86
  310. #define LATD_Toggle            TAG_USER+87
  311. #define LATD_Pressed            TAG_USER+88
  312. #define LATD_Smaller            TAG_USER+89
  313. #define LATD_Tick                TAG_USER+139
  314.  
  315. /* TEXT_KIND */
  316. #define LATX_Picker            TAG_USER+5
  317. #define LATX_UsePicker        TAG_USER+5
  318. #define LATX_LockSize        TAG_USER+106
  319.  
  320. /* VERTICAL_KIND and HORIZONTAL_KIND */
  321. #define LAGR_Spread            TAG_USER+6
  322. #define LAGR_SameSize        TAG_USER+8
  323. #define LAGR_LastAttributes    TAG_USER+46
  324. #define LAGR_ActivePage        TAG_USER+58
  325. #define LAGR_Frame            TAG_USER+104
  326. #define LAGR_IndentX            TAG_USER+130
  327. #define LAGR_IndentY            TAG_USER+134
  328. #define LAGR_NoIndent        TAG_USER+146
  329. #define LAGR_SameWidth        TAG_USER+150
  330. #define LAGR_SameHeight        TAG_USER+151
  331. #define LAGR_FrameGroup        TAG_USER+168
  332. #define LAGR_AlignRight        TAG_USER+171
  333.  
  334. /* XBAR_KIND */
  335. #define LAXB_FullSize        TAG_USER+50
  336. #define LAXB_FullWidth        TAG_USER+50
  337.  
  338. /* Applicable for layout handle only */
  339. #define LAHN_TextAttr        TAG_USER+41
  340. #define LAHN_AutoActivate    TAG_USER+42
  341. #define LAHN_LocaleHook        TAG_USER+4
  342. #define LAHN_CloningPermitted    TAG_USER+61
  343. #define LAHN_EditHook        TAG_USER+74
  344. #define LAHN_ExactClone        TAG_USER+75
  345. #define LAHN_MenuGlyphs        TAG_USER+76
  346. #define LAHN_Parent            TAG_USER+83
  347. #define LAHN_BlockParent    TAG_USER+84
  348. #define LAHN_SimpleClone    TAG_USER+90
  349. #define LAHN_ExitFlush        TAG_USER+108
  350. #define LAHN_UserData        TAG_USER+116
  351. #define LAHN_RawKeyFilter    TAG_USER+142
  352. #define LAHN_DontPickShortcuts    TAG_USER+154
  353. #define LAHN_NoKeys            TAG_USER+154
  354. #define LAHN_PubScreen        TAG_USER+157
  355. #define LAHN_PubScreenName    TAG_USER+158
  356. #define LAHN_PubScreenFallBack    TAG_USER+159
  357. #define LAHN_CloneScreenTitle    TAG_USER+175
  358. #define LAHN_CloneScreenTitleID    TAG_USER+176
  359. #define LAHN_TopGroupType    TAG_USER+190
  360.  
  361. /* Applicable for menus only. */
  362. #define LAMN_FirstLabel        LABX_FirstLabel
  363. #define LAMN_LastLabel        LABX_LastLabel
  364. #define LAMN_LabelTable        TAG_USER+98
  365. #define LAMN_TitleText        TAG_USER+17000
  366. #define LAMN_TitleID            TAG_USER+17001
  367. #define LAMN_ItemText        TAG_USER+17002
  368. #define LAMN_ItemID            TAG_USER+17003
  369. #define LAMN_SubText            TAG_USER+17004
  370. #define LAMN_SubID            TAG_USER+17005
  371. #define LAMN_KeyText            TAG_USER+17006
  372. #define LAMN_KeyID            TAG_USER+17007
  373. #define LAMN_CommandText    TAG_USER+17008
  374. #define LAMN_CommandID        TAG_USER+17009
  375. #define LAMN_MutualExclude    TAG_USER+17010
  376. #define LAMN_UserData        TAG_USER+17011
  377. #define LAMN_Disabled        TAG_USER+17012
  378. #define LAMN_CheckIt            TAG_USER+17013
  379. #define LAMN_Checked            TAG_USER+17014
  380. #define LAMN_Toggle            TAG_USER+17015
  381. #define LAMN_Code                TAG_USER+17016
  382. #define LAMN_Qualifier        TAG_USER+17017
  383. #define LAMN_Char                TAG_USER+17018
  384. #define LAMN_ID                TAG_USER+17019
  385. #define LAMN_AmigaGlyph        TAG_USER+17020
  386. #define LAMN_CheckmarkGlyph    TAG_USER+17021
  387. #define LAMN_Error            TAG_USER+17022
  388. #define LAMN_Screen            TAG_USER+17023
  389. #define LAMN_TextAttr        TAG_USER+17024
  390. #define LAMN_LayoutHandle    TAG_USER+17025
  391. #define LAMN_Handle            TAG_USER+17025
  392. #define LAMN_ExtraSpace        TAG_USER+17026
  393. #define LAMN_FullMenuNum    TAG_USER+160
  394.  
  395. /* Applicable for window only */
  396. #define LAWN_Menu                TAG_USER+25
  397. #define LAWN_UserPort        TAG_USER+47
  398. #define LAWN_Left                TAG_USER+48
  399. #define LAWN_Top                TAG_USER+49
  400. #define LAWN_Zoom                TAG_USER+50
  401. #define LAWN_MaxPen            TAG_USER+52
  402. #define LAWN_BelowMouse        TAG_USER+53
  403. #define LAWN_MoveToWindow    TAG_USER+54
  404. #define LAWN_AutoRefresh    TAG_USER+55
  405. #define LAWN_HelpHook        TAG_USER+73
  406. #define LAWN_Parent            TAG_USER+81
  407. #define LAWN_BlockParent    TAG_USER+82
  408. #define LAWN_SmartZoom        TAG_USER+91
  409. #define LAWN_Title            TAG_USER+92
  410. #define LAWN_TitleText        TAG_USER+92
  411. #define LAWN_Bounds            TAG_USER+93
  412. #define LAWN_ExtraWidth        TAG_USER+94
  413. #define LAWN_ExtraHeight    TAG_USER+95
  414. #define LAWN_IDCMP            TAG_USER+96
  415. #define LAWN_AlignWindow    TAG_USER+97
  416. #define LAWN_TitleID            TAG_USER+99
  417. #define LAWN_FlushLeft        TAG_USER+14000    /* NOTEZ-BIEN: TAG_USER+99 = WA_Dummy and can crash */
  418. #define LAWN_FlushTop        TAG_USER+14001    /*             with Intuition!                      */
  419. #define LAWN_Show                TAG_USER+14002
  420. #define LAWN_MenuTemplate    TAG_USER+14003
  421. #define LAWN_MenuTags        TAG_USER+14004
  422. #define LAWN_NoInitialRefresh    TAG_USER+164
  423. #define LAWN_LimitWidth        TAG_USER+165
  424. #define LAWN_LimitHeight    TAG_USER+166
  425. #define LAWN_UserData        TAG_USER+169
  426.  
  427. /* Private tags; do not use, or you'll run into trouble! */
  428. #define LA_Private1            TAG_USER+100
  429. #define LA_Private2            TAG_USER+101
  430.  
  431. /* Last tag item value used */
  432. #define LAST_TAG                TAG_USER+190
  433.  
  434.  
  435. /*****************************************************************************/
  436.  
  437. /* Identifies the absence of a link for a listview or a string gadget */
  438. CONST    NIL_LINK=-2
  439.  
  440.  
  441. /*****************************************************************************/
  442.  
  443. /* String gadget type history hook support: you will either get
  444.  * the following value passed as the message parameter to your
  445.  * hook function, or a pointer to a null-terminated string you should
  446.  * copy and create a Node from, which you should then add to the tail
  447.  * of your history list. Place a pointer to your history list in the
  448.  * Hook.h_Data entry.
  449.  */
  450. CONST    HISTORYHOOK_DiscardOldest=0
  451.  
  452.  
  453. /*****************************************************************************/
  454.  
  455. /* Refresh hook support: you will get the following structure
  456.  * passed as the message and a pointer to the LayoutHandle as
  457.  * the object.
  458.  */
  459. OBJECT RefreshMsg
  460.     ID:LONG,
  461.     Left:WORD,
  462.     Top:WORD,
  463.     Width:WORD,
  464.     Height:WORD
  465.  
  466.  
  467. /*****************************************************************************/
  468.  
  469. /* Incrementer hook support: you will get the current value
  470.  * passed as the object and one of the following values as
  471.  * the message. Return the number to be used.
  472.  */
  473. ENUM    INCREMENTERMSG_Decrement=-1,    /* Decrement value */
  474.         INCREMENTERMSG_Initial,            /* Initial value passed upon gadget creation */
  475.         INCREMENTERMSG_Increment        /* Increment value */
  476.  
  477.  
  478. /*****************************************************************************/
  479.  
  480. /* Help key hook support: the hook will be called with a "struct IBox *"
  481.  * as the object and a "struct HelpMsg *". The IBox describes the object
  482.  * the mouse was positioned over, such as a button, a listview, etc.
  483.  * The "ObjectID" will indicate the ID of the object the mouse was
  484.  * positioned over. The ID will be -1 if no object was to be found.
  485.  */
  486. OBJECT HelpMsg
  487.     Handle:PTR TO LayoutHandle,        /* Window layout handle */
  488.     ObjectID:LONG                            /* ID of the object, -1 for full window */
  489.  
  490.  
  491. /*****************************************************************************/
  492.  
  493. /* This selects whether ticks should be placed next to the body of
  494.  * a LEVEL_KIND object.
  495.  */
  496. ENUM    TICKS_None,        /* No ticks please */
  497.         TICKS_Left,        /* Place ticks left of the slider (FREEVERT only) */
  498.         TICKS_Both        /* Place ticks on both sides of the slider */
  499.  
  500. CONST    TICKS_Above=TICKS_Left    /* Place ticks above the slider (FREEHORIZ only) */
  501.  
  502.  
  503. /*****************************************************************************/
  504.  
  505. /* The central data structure of the layout process. */
  506. OBJECT LayoutHandle
  507.     Screen:PTR TO Screen,
  508.     DrawInfo:PTR TO DrawInfo,
  509.     Window:PTR TO Window,
  510.     VisualInfo:APTR,
  511.     AmigaGlyph:PTR TO Image,
  512.     CheckGlyph:PTR TO Image,
  513.     UserData:APTR,                    /* Requires gtlayout.library V9 */
  514.     Menu:PTR TO Menu                /* Requires gtlayout.library V13 */
  515.     /* Hands off, private fields follow.... */
  516.  
  517.  
  518. /*****************************************************************************/
  519.  
  520. /* Handy for LT_LevelWidth and LT_NewLevelWidth. Note: parameters must be passed
  521.  * over the stack.
  522.  */
  523. //typedef LONG (* DISPFUNC)(struct Gadget *gad,LONG value,...);
  524.  
  525.  
  526. /*****************************************************************************/
  527.  
  528.  
  529. /* Useful macros */
  530. #define LT_GetString(Handle,Code)    LT_GetAttributesA((Handle),(Code),NIL)
  531.  
  532. //#define LAMN_Menu_UserData(m)        (*(APTR *)(((struct Menu *)(m)) + 1))
  533. //#define LAMN_Menu_ID(m)            (((ULONG *)(((struct Menu *)(m)) + 1))[1])
  534.  
  535. //#define LAMN_Item_UserData(m)        (*(APTR *)(((struct MenuItem *)(m)) + 1))
  536. //#define LAMN_Item_ID(m)            (((ULONG *)(((struct MenuItem *)(m)) + 1))[1])
  537.  
  538.  
  539. /*****************************************************************************/
  540. /* Obsolete tags, don't use in new code */
  541. #define LA_Lines        LABX_Rows
  542. #define LA_Spread        LAGR_Spread
  543. #define LA_SameSize        LAGR_SameSize
  544. #define LA_FullCheck        LASL_FullCheck
  545. #define LA_ExtraLabels        LALV_ExtraLabels
  546. #define LA_LastGadget        TAG_USER+28
  547. #define LA_SmallPalette        LAPA_SmallPalette
  548. #define LA_Labels        LALV_Labels
  549. #define LA_Picker        LATX_Picker
  550. #define LA_DrawBox        LAFR_DrawBox
  551. #define LA_FirstLabel        LABX_FirstLabel
  552. #define LA_LastLabel        LABX_LastLabel
  553. #define LA_LabelTable        LABX_LabelTable
  554. #define LA_Min            TAG_USER+23
  555. #define LA_Max            TAG_USER+24
  556. #define LA_Link            LALV_Link
  557. #define LA_Menu            LAWN_Menu
  558. #define LA_HistoryLines        LAST_HistoryLines
  559. #define LA_HistoryHook        LAST_HistoryHook
  560. #define LA_ReturnKey        LABT_ReturnKey
  561. #define LA_ExtraFat        LABT_ExtraFat
  562. #define LA_CursorKey        LALV_CursorKey
  563. #define STORE_BYTE        TAG_USER+63
  564. #define STORE_UBYTE        TAG_USER+64
  565. #define STORE_WORD        TAG_USER+65
  566. #define STORE_BOOL        TAG_USER+65
  567. #define STORE_UWORD        TAG_USER+66
  568. #define STORE_LONG        TAG_USER+67
  569. #define STORE_ULONG        TAG_USER+68
  570. #define STORE_STRPTR        TAG_USER+69
  571. #define LAHN_Font        TAG_USER+41
  572. #define LH_Font            TAG_USER+41
  573. #define LH_AutoActivate        TAG_USER+42
  574. #define LH_LocaleHook        TAG_USER+4
  575. #define LH_CloningPermitted    TAG_USER+61
  576. #define LH_EditHook        TAG_USER+74
  577. #define LH_ExactClone        TAG_USER+75
  578. #define LH_MenuGlyphs        TAG_USER+76
  579. #define LH_Parent        TAG_USER+83
  580. #define LH_BlockParent        TAG_USER+84
  581. #define LH_SimpleClone        TAG_USER+90
  582. #define LH_ExitFlush        TAG_USER+108
  583. #define LH_UserData        TAG_USER+116
  584. #define LH_RawKeyFilter        TAG_USER+142
  585.  
  586.  
  587. /* Obsolete defines, don't use in new code */
  588. #define PLACE_LEFT        PLACE_Left
  589. #define PLACE_RIGHT        PLACE_Right
  590. #define PLACE_ABOVE        PLACE_Above
  591. #define PLACE_IN        PLACE_In
  592. #define PLACE_BELOW        PLACE_Below
  593.  
  594. #define ALIGNTEXT_LEFT        ALIGNTEXT_Left
  595. #define ALIGNTEXT_CENTERED    ALIGNTEXT_Centered
  596. #define ALIGNTEXT_RIGHT        ALIGNTEXT_Right
  597. #define ALIGNTEXT_PAD        ALIGNTEXT_Pad
  598.  
  599. #define TDBT_BACKWARD        TDBT_Backward
  600. #define TDBT_FORWARD        TDBT_Forward
  601. #define TDBT_PREVIOUS        TDBT_Previous
  602. #define TDBT_NEXT        TDBT_Next
  603. #define TDBT_STOP        TDBT_Stop
  604. #define TDBT_PAUSE        TDBT_Pause
  605. #define TDBT_RECORD        TDBT_Record
  606. #define TDBT_REWIND        TDBT_Rewind
  607. #define TDBT_EJECT        TDBT_Eject
  608. #define TDBT_PLAY        TDBT_Play
  609.  
  610. #define ALIGNF_RIGHT        ALIGNF_Right
  611. #define ALIGNF_LEFT        ALIGNF_Left
  612. #define ALIGNF_TOP        ALIGNF_Top
  613. #define ALIGNF_BOTTOM        ALIGNF_Bottom
  614. #define ALIGNF_EXTRA_RIGHT    ALIGNF_ExtraRight
  615. #define ALIGNF_EXTRA_LEFT    ALIGNF_ExtraLeft
  616. #define ALIGNF_EXTRA_TOP    ALIGNF_ExtraTop
  617. #define ALIGNF_EXTRA_BOTTOM    ALIGNF_ExtraBottom
  618.  
  619. #define HISTORYHOOK_DISCARD_OLDEST    HISTORYHOOK_DiscardOldest
  620.  
  621. #define INCREMENTERMSG_DECREMENT    INCREMENTERMSG_Decrement
  622. #define INCREMENTERMSG_INITIAL        INCREMENTERMSG_Initial
  623. #define INCREMENTERMSG_INCREMENT    INCREMENTERMSG_Increment
  624.  
  625. /* Obsolete routines redone as macros. */
  626. #define LT_GetDrawInfo(Handle)        (IF Handle THEN (Handle).DrawInfo ELSE NIL
  627. #define LT_GetVisualInfo(Handle)        (IF Handle THEN (Handle).VisualInfo ELSE NIL
  628. #define LT_GetScreen(Handle)            (IF Handle THEN (Handle).Screen ELSE NIL
  629. #define LT_SetAutoActivate(Handle,Mode)    LT_SetAttributes(Handle,0,LH_AutoActivate,Mode,TAG_DONE)
  630.