home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / source / term43-source.lha / Extras / Source / gtlayout-Source.lha / gtlayout.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-18  |  19.9 KB  |  617 lines

  1. #ifndef _GTLAYOUT_H
  2. #define _GTLAYOUT_H
  3.  
  4. /*
  5. **    GadTools layout toolkit
  6. **
  7. **    Copyright © 1993-1994 by Olaf `Olsen' Barthel
  8. **    Freely distributable.
  9. */
  10.  
  11.  
  12. /*****************************************************************************/
  13.  
  14.  
  15. #if !defined(LIB_CODE) && !defined(SHARED_LIB) && !defined(LINK_LIB)
  16. #define SHARED_LIB 1
  17. #endif
  18.  
  19. #ifdef _DCC
  20. #define __stdargs __stkargs
  21. #endif    /* _DCC */
  22.  
  23. #ifdef LIB_CODE
  24. #define REG(x)    register __ ## x
  25. #define LIBENT    __asm __saveds
  26. #endif    /* LIB_CODE */
  27.  
  28. #ifdef SHARED_LIB
  29. #define REG(x)
  30. #define LIBENT
  31. #endif    /* SHARED_LIB */
  32.  
  33. #ifdef LINK_LIB
  34. #define REG(x)
  35. #define LIBENT    __regargs
  36. #endif    /* LINK_LIB */
  37.  
  38.  
  39. /*****************************************************************************/
  40.  
  41.  
  42. #ifndef EXEC_TYPES_H
  43. #include <exec/types.h>
  44. #endif
  45.  
  46. #ifndef INTUITION_INTUITION_H
  47. #include <intuition/intuition.h>
  48. #endif
  49.  
  50. #ifndef UTILITY_TAGITEM_H
  51. #include <utility/tagitem.h>
  52. #endif
  53.  
  54. #ifndef INTUITION_GADGETCLASS_H
  55. #include <intuition/gadgetclass.h>
  56. #endif
  57.  
  58.  
  59. /*****************************************************************************/
  60.  
  61.  
  62. typedef enum PlacementTypes
  63. {
  64.     PLACE_LEFT,
  65.     PLACE_RIGHT,
  66.     PLACE_ABOVE,
  67.     PLACE_IN,
  68.     PLACE_BELOW
  69. } PlacementTypes;
  70.  
  71. typedef enum AlignmentTypes
  72. {
  73.     ALIGNTEXT_LEFT,
  74.     ALIGNTEXT_CENTERED,
  75.     ALIGNTEXT_RIGHT,
  76.     ALIGNTEXT_PAD
  77. } AlignmentTypes;
  78.  
  79. typedef enum TapeDeckButtonTypes
  80. {
  81.     TDBT_BACKWARD,
  82.     TDBT_FORWARD,
  83.     TDBT_PREVIOUS,
  84.     TDBT_NEXT,
  85.     TDBT_STOP,
  86.     TDBT_PAUSE,
  87.     TDBT_RECORD,
  88.     TDBT_REWIND,
  89.     TDBT_EJECT,
  90.     TDBT_PLAY,
  91.  
  92.     TDBTLAST
  93. } TapeDeckButtonTypes;
  94.  
  95. typedef LONG (* __stdargs DISPFUNC)(struct Gadget *gad,WORD value);
  96.  
  97. #define ALIGNF_RIGHT        (1 << 0)
  98. #define ALIGNF_LEFT        (1 << 1)
  99. #define ALIGNF_TOP        (1 << 2)
  100. #define ALIGNF_BOTTOM        (1 << 3)
  101. #define ALIGNF_EXTRA_RIGHT    (1 << 4)
  102. #define ALIGNF_EXTRA_LEFT    (1 << 5)
  103. #define ALIGNF_EXTRA_TOP    (1 << 6)
  104. #define ALIGNF_EXTRA_BOTTOM    (1 << 7)
  105.  
  106.  
  107. /*****************************************************************************/
  108.  
  109.  
  110. /* Generic tags, applicable for several object types */
  111. #define LA_Chars        TAG_USER+2
  112. #define LA_LabelPlace        TAG_USER+3
  113. #define LA_ExtraSpace        TAG_USER+4
  114. #define LA_NoKey        TAG_USER+30
  115. #define LA_HighLabel        TAG_USER+31
  116. #define LA_LabelText        TAG_USER+37
  117. #define LA_LabelID        TAG_USER+38
  118. #define LA_ID            TAG_USER+39
  119. #define LA_Type            TAG_USER+40
  120. #define LA_PageSelector        TAG_USER+79
  121. #define LA_LabelChars        TAG_USER+107
  122.  
  123. /* Storage type tags */
  124. #define STORE_BYTE        TAG_USER+63
  125. #define LA_BYTE            TAG_USER+63
  126. #define STORE_UBYTE        TAG_USER+64
  127. #define LA_UBYTE        TAG_USER+64
  128. #define STORE_WORD        TAG_USER+65
  129. #define LA_WORD            TAG_USER+65
  130. #define STORE_BOOL        TAG_USER+65
  131. #define LA_BOOL            TAG_USER+65
  132. #define STORE_UWORD        TAG_USER+66
  133. #define LA_UWORD        TAG_USER+66
  134. #define STORE_LONG        TAG_USER+67
  135. #define LA_LONG            TAG_USER+67
  136. #define STORE_ULONG        TAG_USER+68
  137. #define LA_ULONG        TAG_USER+68
  138. #define STORE_STRPTR        TAG_USER+69
  139. #define LA_STRPTR        TAG_USER+69
  140. #define STORE_FRACTION        TAG_USER+68
  141. #define LA_FRACTION        TAG_USER+68
  142.  
  143. /* for use with LT_GetAttributes() only */
  144. #define LA_Left            TAG_USER+16
  145. #define LA_Top            TAG_USER+17
  146. #define LA_Width        TAG_USER+18
  147. #define LA_Height        TAG_USER+19
  148. #define LA_LabelLeft        TAG_USER+114
  149. #define LA_LabelTop        TAG_USER+115
  150.  
  151. /* TEXT_KIND */
  152. #define LATX_Picker        TAG_USER+5
  153.  
  154. /* VERTICAL_KIND, HORIZONTAL_KIND */
  155. #define LAGR_Spread        TAG_USER+6
  156. #define LAGR_SameSize        TAG_USER+8
  157. #define LAGR_LastAttributes    TAG_USER+46
  158. #define LAGR_ActivePage        TAG_USER+58
  159. #define LAGR_Frame        TAG_USER+104
  160.  
  161. /* FRAME_KIND */
  162. #define LAFR_InnerWidth        TAG_USER+9
  163. #define LAFR_InnerHeight    TAG_USER+10
  164. #define LAFR_DrawBox        TAG_USER+11
  165. #define LAFR_RefreshHook    TAG_USER+117
  166.  
  167. /* BOX_KIND */
  168. #define LABX_Labels        TAG_USER+12
  169. #define LABX_Lines        TAG_USER+13
  170. #define LABX_Rows        TAG_USER+1
  171. #define LABX_Index        TAG_USER+14
  172. #define LABX_Text        TAG_USER+15
  173. #define LABX_AlignText        TAG_USER+27
  174. #define LABX_DrawBox        TAG_USER+11
  175. #define LABX_FirstLabel        TAG_USER+44
  176. #define LABX_LastLabel        TAG_USER+45
  177. #define LABX_ReserveSpace    TAG_USER+72
  178. #define LABX_LabelTable        TAG_USER+98
  179.  
  180. /* FRACTION_KIND */
  181. #define LAFC_MaxChars        TAG_USER+20
  182. #define LAFC_Number        TAG_USER+21
  183. #define LAFC_LastGadget        TAG_USER+28
  184. #define LAFC_Min        TAG_USER+23
  185. #define LAFC_Max        TAG_USER+24
  186. #define LAFC_HistoryLines    TAG_USER+59
  187. #define LAFC_HistoryHook    TAG_USER+80
  188.  
  189. /* SLIDER_KIND */
  190. #define LASL_FullCheck        TAG_USER+22
  191.  
  192. /* LISTVIEW_KIND */
  193. #define LALV_ExtraLabels    TAG_USER+26
  194. #define LALV_Labels        TAG_USER+33
  195. #define LALV_CursorKey        TAG_USER+35
  196. #define LALV_Lines        TAG_USER+1
  197. #define LALV_Link        TAG_USER+7
  198. #define LALV_FirstLabel        TAG_USER+44
  199. #define LALV_LastLabel        TAG_USER+45
  200. #define LALV_MaxGrowX        TAG_USER+77
  201. #define LALV_MaxGrowY        TAG_USER+78
  202. #define LALV_LabelTable        TAG_USER+98
  203. #define LALV_LockSize        TAG_USER+106
  204. #define LALV_ResizeX        TAG_USER+109
  205. #define LALV_ResizeY        TAG_USER+110
  206. #define LALV_MinChars        TAG_USER+111
  207. #define LALV_MinLines        TAG_USER+112
  208. #define LALV_FlushLabelLeft    TAG_USER+113
  209.  
  210. /* INTEGER_KIND */
  211. #define LAIN_LastGadget        TAG_USER+28
  212. #define LAIN_Min        TAG_USER+23
  213. #define LAIN_Max        TAG_USER+24
  214. #define LAIN_UseIncrementers    TAG_USER+57
  215. #define LAIN_HistoryLines    TAG_USER+59
  216. #define LAIN_HistoryHook    TAG_USER+80
  217. #define LAIN_IncrementerHook    TAG_USER+85
  218.  
  219. /* STRING_KIND */
  220. #define LAST_LastGadget        TAG_USER+28
  221. #define LAST_Link        TAG_USER+7
  222. #define LAST_Picker        TAG_USER+5
  223. #define LAST_HistoryLines    TAG_USER+59
  224. #define LAST_HistoryHook    TAG_USER+80
  225. #define LAST_CursorPosition    TAG_USER+105
  226.  
  227. /* PASSWORD_KIND */
  228. #define LAPW_String             GTST_String
  229. #define LAPW_LastGadget        TAG_USER+28
  230. #define LAPW_HistoryLines    TAG_USER+59
  231. #define LAPW_HistoryHook    TAG_USER+80
  232.  
  233. /* PALETTE_KIND */
  234. #define LAPA_SmallPalette    TAG_USER+32
  235. #define LAPA_Lines        LA_Lines
  236.  
  237. /* BUTTON_KIND */
  238. #define LABT_ReturnKey        TAG_USER+34
  239. #define LABT_EscKey        TAG_USER+56
  240. #define LABT_ExtraFat        TAG_USER+29
  241.  
  242. /* GAUGE_KIND */
  243. #define LAGA_Percent        TAG_USER+36
  244. #define LAGA_InfoLength        TAG_USER+70
  245. #define LAGA_InfoText        TAG_USER+71
  246.  
  247. /* CYCLE_KIND */
  248. #define LACY_FirstLabel        TAG_USER+44
  249. #define LACY_LastLabel        TAG_USER+45
  250. #define LACY_LabelTable        TAG_USER+98
  251. #define LACY_AutoPageID        TAG_USER+103
  252. #define LACY_TabKey        TAG_USER+118
  253.  
  254. /* LEVEL_KIND */
  255. #define LAVL_Min        GTSL_Min
  256. #define LAVL_Max        GTSL_Max
  257. #define LAVL_Level        GTSL_Level
  258. #define LAVL_LevelFormat    GTSL_LevelFormat
  259. #define LAVL_LevelPlace        GTSL_LevelPlace
  260. #define LAVL_DispFunc        GTSL_DispFunc
  261. #define LAVL_FullCheck        LASL_FullCheck
  262.  
  263. /* MX_KIND */
  264. #define LAMX_FirstLabel        TAG_USER+44
  265. #define LAMX_LastLabel        TAG_USER+45
  266. #define LAMX_LabelTable        TAG_USER+98
  267. #define LAMX_TabKey        TAG_USER+118
  268.  
  269. /* SCROLLER_KIND */
  270. #define LASC_Thin        TAG_USER+62
  271.  
  272. /* XBAR_KIND */
  273. #define LAXB_FullSize        TAG_USER+50
  274.  
  275. /* TAPEDECK_KIND */
  276. #define LATD_ButtonType        TAG_USER+86
  277. #define LATD_Toggle        TAG_USER+87
  278. #define LATD_Pressed        TAG_USER+88
  279. #define LATD_Smaller        TAG_USER+89
  280.  
  281. /* MX_KIND */
  282. #define LAMX_AutoPageID        TAG_USER+103
  283.  
  284. /* Applicable for window only */
  285. #define LAWN_Menu        TAG_USER+25
  286. #define LAWN_UserPort        TAG_USER+47
  287. #define LAWN_Left        TAG_USER+48
  288. #define LAWN_Top        TAG_USER+49
  289. #define LAWN_Zoom        TAG_USER+50
  290. #define LAWN_MaxPen        TAG_USER+52
  291. #define LAWN_BelowMouse        TAG_USER+53
  292. #define LAWN_MoveToWindow    TAG_USER+54
  293. #define LAWN_AutoRefresh    TAG_USER+55
  294. #define LAWN_HelpHook        TAG_USER+73
  295. #define LAWN_Parent        TAG_USER+81
  296. #define LAWN_BlockParent    TAG_USER+82
  297. #define LAWN_SmartZoom        TAG_USER+91
  298. #define LAWN_Title        TAG_USER+92
  299. #define LAWN_TitleText        TAG_USER+92
  300. #define LAWN_Bounds        TAG_USER+93
  301. #define LAWN_ExtraWidth        TAG_USER+94
  302. #define LAWN_ExtraHeight    TAG_USER+95
  303. #define LAWN_IDCMP        TAG_USER+96
  304. #define LAWN_AlignWindow    TAG_USER+97
  305. #define LAWN_TitleID        TAG_USER+99
  306.  
  307. /* Applicable for menus only. */
  308. #define LAMN_FirstLabel        LABX_FirstLabel
  309. #define LAMN_LastLabel        LABX_LastLabel
  310. #define LAMN_LabelTable        TAG_USER+98
  311.  
  312. /* Applicable for layout handle only */
  313. #define LH_Font            TAG_USER+41
  314. #define LH_AutoActivate        TAG_USER+42
  315. #define LH_LocaleHook        TAG_USER+4
  316. #define LH_CloningPermitted    TAG_USER+61
  317. #define LH_EditHook        TAG_USER+74
  318. #define LH_ExactClone        TAG_USER+75
  319. #define LH_MenuGlyphs        TAG_USER+76
  320. #define LH_Parent        TAG_USER+83
  321. #define LH_BlockParent        TAG_USER+84
  322. #define LH_SimpleClone        TAG_USER+90
  323. #define LH_Expand        TAG_USER+102
  324. #define LH_ExitFlush        TAG_USER+108
  325. #define LH_UserData        TAG_USER+116
  326.  
  327. /* Private tags; do not use, or you'll run into trouble! */
  328. #define LA_Private1        TAG_USER+100
  329. #define LA_Private2        TAG_USER+101
  330.  
  331. /* Last tag item value used */
  332. #define LAST_TAG        TAG_USER+118
  333.  
  334.  
  335. /*****************************************************************************/
  336.  
  337.  
  338. /* Identifies the absence of a link for a listview or a string gadget */
  339. #define NIL_LINK        -2
  340.  
  341.  
  342. /*****************************************************************************/
  343.  
  344.  
  345.     /* String gadget type history hook support: you will either get
  346.      * the following value passed as the message parameter to your
  347.      * hook function, or a pointer to a null-terminated string you should
  348.      * copy and create a Node from, which you should then add to the tail
  349.      * of your history list. Place a pointer to your history list in the
  350.      * Hook.h_Data entry.
  351.      */
  352.  
  353. #define HISTORYHOOK_DISCARD_OLDEST    0    // Discard oldest entry
  354.  
  355.  
  356. /*****************************************************************************/
  357.  
  358.  
  359.     /* Refresh hook support: you will get the following structure
  360.      * passed as the message and a pointer to the LayoutHandle as
  361.      * the object.
  362.      */
  363.  
  364. typedef struct RefreshMsg
  365. {
  366.     LONG    ID;
  367.     WORD    Left,
  368.         Top,
  369.         Width,
  370.         Height;
  371. } RefreshMsg;
  372.  
  373. /*****************************************************************************/
  374.  
  375.  
  376.     /* Incrementer hook support: you will get the current value
  377.      * passed as the object and one of the following values as
  378.      * the message. Return the number to be used.
  379.      */
  380.  
  381. typedef enum IncrementerMsgTypes
  382. {
  383.     INCREMENTERMSG_DECREMENT = -1,    // Decrement value
  384.     INCREMENTERMSG_INITIAL   =  0,    // Initial value passed upon gadget creation
  385.     INCREMENTERMSG_INCREMENT =  1    // Increment value
  386. } IncrementerMsgTypes;
  387.  
  388.  
  389. /*****************************************************************************/
  390.  
  391.     /* Help key hook support: the hook will be called with a "struct IBox *"
  392.      * as the object and a "struct HelpMsg *". The IBox describes the object
  393.      * the mouse was positioned over, such as a button, a listview, etc.
  394.      * The "ObjectID" will indicate the ID of the object the mouse was
  395.      * positioned over. The ID will be -1 if no object was to be found.
  396.      */
  397.  
  398. typedef struct HelpMsg
  399. {
  400.     struct LayoutHandle    *Handle;    // Window layout handle
  401.     LONG             ObjectID;    // ID of the object, -1 for full window
  402. } HelpMsg;
  403.  
  404.  
  405. /*****************************************************************************/
  406.  
  407.  
  408. /* Obsolete tags, don't use in new code */
  409. #define LA_Lines        LABX_Rows
  410. #define LA_Spread        LAGR_Spread
  411. #define LA_SameSize        LAGR_SameSize
  412. #define LA_FullCheck        LASL_FullCheck
  413. #define LA_ExtraLabels        LALV_ExtraLabels
  414. #define LA_LastGadget        LAFC_LastGadget
  415. #define LA_SmallPalette        LAPA_SmallPalette
  416. #define LA_Labels        LALV_Labels
  417. #define LA_Picker        LATX_Picker
  418. #define LA_DrawBox        LAFR_DrawBox
  419. #define LA_FirstLabel        LABX_FirstLabel
  420. #define LA_LastLabel        LABX_LastLabel
  421. #define LA_LabelTable        LABX_LabelTable
  422. #define LA_Min            LAFC_Min
  423. #define LA_Max            LAFC_Max
  424. #define LA_Link            LALV_Link
  425. #define LA_Menu            LAWN_Menu
  426. #define LA_HistoryLines        LAST_HistoryLines
  427. #define LA_HistoryHook        LAST_HistoryHook
  428. #define LA_ReturnKey        LABT_ReturnKey
  429. #define LA_ExtraFat        LABT_ExtraFat
  430. #define LA_CursorKey        LALV_CursorKey
  431.  
  432.  
  433. /*****************************************************************************/
  434.  
  435.  
  436. /* kinds of objects supported in addition to the normal GadTools kinds */
  437. #define HORIZONTAL_KIND        45
  438. #define VERTICAL_KIND        46
  439. #define END_KIND        47
  440. #define FRAME_KIND        48
  441. #define BOX_KIND        49
  442. #define FRACTION_KIND        50
  443. #define XBAR_KIND        51
  444. #define YBAR_KIND        52
  445. #define PASSWORD_KIND        53
  446. #define GAUGE_KIND        54
  447. #define TAPEDECK_KIND        55
  448. #define LEVEL_KIND        56
  449.  
  450.  
  451. /*****************************************************************************/
  452.  
  453.  
  454. /* in support of FRACTION_KIND gadgets */
  455.  
  456. typedef ULONG            FIXED;
  457. #define FIXED_UNITY        10000
  458.  
  459. #define TO_FIXED(l,r)        (FIXED_UNITY * (l) + (r))
  460. #define FIXED_LEFT(f)        ((f) / FIXED_UNITY)
  461. #define FIXED_RIGHT(f)        ((f) % FIXED_UNITY)
  462.  
  463.  
  464. /*****************************************************************************/
  465.  
  466.  
  467. #ifndef _GTLAYOUT_C
  468. typedef struct LayoutHandle
  469. {
  470.     struct Screen        *Screen;
  471.     struct DrawInfo        *DrawInfo;
  472.     struct Window        *Window;
  473.     APTR             VisualInfo;
  474.     struct Image        *AmigaGlyph,
  475.                 *CheckGlyph;
  476.     APTR             UserData;    // Requires gtlayout.library v9
  477.  
  478.     /* private fields follow.... */
  479. } LayoutHandle;
  480. #endif
  481.  
  482.  
  483. /*****************************************************************************/
  484.  
  485.  
  486. VOID LIBENT            LT_LevelWidth(REG(a0) struct LayoutHandle *handle,REG(a1) STRPTR levelFormat,REG(a2) DISPFUNC dispFunc,REG(d0) LONG min,REG(d1) LONG max,REG(a3) LONG *maxWidth,REG(a5) LONG *maxLen,REG(d2) BOOL fullCheck);
  487. VOID LIBENT            LT_DeleteHandle(REG(a0) struct LayoutHandle *Handle);
  488. struct LayoutHandle * LIBENT    LT_CreateHandle(REG(a0) struct Screen *Screen,REG(a1) struct TextAttr *Font);
  489. struct LayoutHandle * LIBENT    LT_CreateHandleTagList(REG(a0) struct Screen *Screen,REG(a1) struct TagItem *TagList);
  490. BOOL LIBENT            LT_RebuildTagList(REG(a0) struct LayoutHandle *handle,REG(d0) BOOL clear,REG(a1) struct TagItem *TagParams);
  491. VOID LIBENT            LT_HandleInput(REG(a0) struct LayoutHandle *Handle,REG(d0) ULONG MsgQualifier,REG(a1) ULONG *MsgClass,REG(a2) UWORD *MsgCode,REG(a3) struct Gadget **MsgGadget);
  492. VOID LIBENT            LT_BeginRefresh(REG(a0) struct LayoutHandle *handle);
  493. VOID LIBENT            LT_EndRefresh(REG(a0) struct LayoutHandle *handle,REG(d0) BOOL complete);
  494. LONG LIBENT            LT_GetAttributesA(REG(a0) struct LayoutHandle *Handle,REG(d0) LONG ID,REG(a1) struct TagItem *TagList);
  495. VOID LIBENT            LT_SetAttributesA(REG(a0) struct LayoutHandle *handle,REG(d0) LONG id,REG(a1) struct TagItem *TagList);
  496. VOID LIBENT            LT_NewA(REG(a0) struct LayoutHandle *handle,REG(a1) struct TagItem *tagList);
  497. VOID LIBENT            LT_EndGroup(REG(a0) struct LayoutHandle *handle);
  498. struct Window * LIBENT        LT_BuildA(REG(a0) struct LayoutHandle *Handle,REG(a1) struct TagItem *TagParams);
  499. struct Menu * LIBENT        LT_LayoutMenusA(REG(a0) struct LayoutHandle *handle,REG(a1) struct NewMenu *menuTemplate,REG(a2) struct TagItem *TagParams);
  500. VOID LIBENT            LT_Fixed2String(REG(d0) FIXED fixed,REG(d1) STRPTR buffer);
  501. FIXED LIBENT            LT_String2Fixed(REG(a0) STRPTR buffer);
  502. ULONG LIBENT            LT_FixedMult(REG(d0) FIXED fixed,REG(d1) ULONG factor);
  503. LONG LIBENT            LT_LabelWidth(REG(a0) struct LayoutHandle *handle,REG(a1) STRPTR label);
  504. LONG LIBENT            LT_LabelChars(REG(a0) struct LayoutHandle *handle,REG(a1) STRPTR label);
  505. VOID LIBENT            LT_LockWindow(REG(a0) struct Window *window);
  506. VOID LIBENT            LT_UnlockWindow(REG(a0) struct Window *window);
  507. VOID LIBENT            LT_DeleteWindowLock(REG(a0) struct Window *window);
  508. VOID LIBENT            LT_ShowWindow(REG(a0) struct LayoutHandle *handle,REG(a1) BOOL activate);
  509. VOID LIBENT            LT_Activate(REG(a0) struct LayoutHandle *handle,REG(d0) LONG id);
  510. VOID LIBENT            LT_PressButton(REG(a0) struct LayoutHandle *handle,REG(d0) LONG id);
  511. WORD LIBENT            LT_GetCode(REG(d0) ULONG MsgQualifier,REG(d1) ULONG MsgClass,REG(d2) UWORD MsgCode,REG(a0) struct Gadget *MsgGadget);
  512. struct IntuiMessage * LIBENT    LT_GetIMsg(REG(a0) struct LayoutHandle *Handle);
  513. VOID LIBENT            LT_ReplyIMsg(REG(a0) struct IntuiMessage *Msg);
  514. VOID LIBENT            LT_UpdateStrings(REG(a0) struct LayoutHandle *Handle);
  515.  
  516.  
  517. /*****************************************************************************/
  518.  
  519.  
  520. /* For use as link library */
  521.  
  522. BOOL                LT_Init(VOID);
  523. VOID                LT_Exit(VOID);
  524.  
  525. /* Available for library-internal use and as link library */
  526.  
  527. BOOL __stdargs            LT_RebuildTags(struct LayoutHandle *handle,BOOL clear,...);
  528. struct LayoutHandle * __stdargs    LT_CreateHandleTags(struct Screen *Screen,...);
  529. LONG __stdargs            LT_GetAttributes(struct LayoutHandle *Handle,LONG ID,...);
  530. VOID __stdargs            LT_SetAttributes(struct LayoutHandle *handle,LONG id,...);
  531. VOID __stdargs            LT_AddL(struct LayoutHandle *handle,UBYTE type,ULONG labelID,LONG id,...);
  532. VOID __stdargs            LT_Add(struct LayoutHandle *Handle,UBYTE Type,STRPTR Label,LONG ID,...);
  533. VOID __stdargs            LT_New(struct LayoutHandle *handle,...);
  534. struct Window * __stdargs    LT_Build(struct LayoutHandle *Handle,...);
  535. struct Window * __stdargs    LT_Layout(struct LayoutHandle *handle, STRPTR title,struct IBox *bounds,LONG extraWidth, LONG extraHeight,ULONG IDCMP, UBYTE align, ...);
  536. struct Menu * __stdargs        LT_LayoutMenus(struct LayoutHandle *handle,struct NewMenu *menuTemplate,...);
  537.  
  538.  
  539. /*****************************************************************************/
  540.  
  541.  
  542. /* Useful macros */
  543.  
  544. #define LT_GetString(Handle,Code)    ((STRPTR)LT_GetAttributes((Handle),(Code),TAG_DONE))
  545.  
  546.  
  547. /*****************************************************************************/
  548.  
  549.  
  550. /* Obsolete routines, do not use in new code. */
  551.  
  552. BOOL LIBENT                LT_Rebuild(REG(a0) struct LayoutHandle *handle,REG(a1) struct IBox *bounds,REG(a2) LONG extraWidth,REG(d0) LONG extraHeight,REG(d1) BOOL clear);
  553. struct Window * LIBENT            LT_LayoutA(REG(a0) struct LayoutHandle *handle, REG(a1) STRPTR title,REG(a2) struct IBox *bounds,REG(d0) LONG extraWidth, REG(d1) LONG extraHeight,REG(d2) ULONG IDCMP, REG(d3) UBYTE align, REG(a3) struct TagItem *TagParams);
  554. VOID LIBENT                LT_AddA(REG(a0) struct LayoutHandle *Handle,REG(d0) UBYTE Type,REG(d1) STRPTR Label,REG(d2) LONG ID,REG(a1) struct TagItem *TagList);
  555.  
  556. #define LT_GetDrawInfo(Handle)        (Handle) ? ((Handle) -> DrawInfo)    : NULL
  557. #define LT_GetVisualInfo(Handle)    (Handle) ? ((Handle) -> VisualInfo)    : NULL
  558. #define LT_GetScreen(Handle)        (Handle) ? ((Handle) -> Screen)        : NULL
  559. #define LT_SetAutoActivate(Handle,Mode)    LT_SetAttributes(Handle,0,LH_AutoActivate,Mode,TAG_DONE)
  560.  
  561.  
  562. /*****************************************************************************/
  563.  
  564.  
  565. #if !defined(LIB_CODE) && !defined(_GTLAYOUT_C) && !defined(NO_PRAGMAS)
  566. /*#pragma libcall GTLayoutBase LT_LevelWidth 1e 2DB10A907*/
  567. #pragma libcall GTLayoutBase LT_DeleteHandle 24 801
  568. #pragma libcall GTLayoutBase LT_CreateHandle 2a 9802
  569. #pragma libcall GTLayoutBase LT_CreateHandleTagList 30 9802
  570. #pragma tagcall GTLayoutBase LT_CreateHandleTags 30 9802
  571. #pragma libcall GTLayoutBase LT_Rebuild 36 10A9805
  572. #pragma libcall GTLayoutBase LT_HandleInput 3c BA90805
  573. #pragma libcall GTLayoutBase LT_BeginRefresh 42 801
  574. #pragma libcall GTLayoutBase LT_EndRefresh 48 0802
  575. #pragma libcall GTLayoutBase LT_GetAttributesA 4e 90803
  576. #pragma tagcall GTLayoutBase LT_GetAttributes 4e 90803
  577. #pragma libcall GTLayoutBase LT_SetAttributesA 54 90803
  578. #pragma tagcall GTLayoutBase LT_SetAttributes 54 90803
  579. #pragma libcall GTLayoutBase LT_AddA 5a 9210805
  580. #pragma tagcall GTLayoutBase LT_Add 5a 9210805
  581. #pragma libcall GTLayoutBase LT_NewA 60 9802
  582. #pragma tagcall GTLayoutBase LT_New 60 9802
  583. #pragma libcall GTLayoutBase LT_EndGroup 66 801
  584. #pragma libcall GTLayoutBase LT_LayoutA 6c B3210A9808
  585. #pragma tagcall GTLayoutBase LT_Layout 6c B3210A9808
  586. #pragma libcall GTLayoutBase LT_LayoutMenusA 72 A9803
  587. #pragma tagcall GTLayoutBase LT_LayoutMenus 72 A9803
  588. #pragma libcall GTLayoutBase LT_Fixed2String 78 1002
  589. #pragma libcall GTLayoutBase LT_String2Fixed 7e 801
  590. #pragma libcall GTLayoutBase LT_FixedMult 84 1002
  591. #pragma libcall GTLayoutBase LT_LabelWidth 8a 9802
  592. #pragma libcall GTLayoutBase LT_LabelChars 90 9802
  593. #pragma libcall GTLayoutBase LT_LockWindow 96 801
  594. #pragma libcall GTLayoutBase LT_UnlockWindow 9c 801
  595. #pragma libcall GTLayoutBase LT_DeleteWindowLock a2 801
  596. #pragma libcall GTLayoutBase LT_ShowWindow a8 9802
  597. #pragma libcall GTLayoutBase LT_Activate ae 0802
  598. #pragma libcall GTLayoutBase LT_PressButton b4 0802
  599. #pragma libcall GTLayoutBase LT_GetCode ba 821004
  600. /*--- Added in v1.78 --------------------------------------------------*/
  601. #pragma libcall GTLayoutBase LT_GetIMsg c0 801
  602. #pragma libcall GTLayoutBase LT_ReplyIMsg c6 801
  603. /*--- Added in v3.0 ---------------------------------------------------*/
  604. #pragma libcall GTLayoutBase LT_BuildA cc 9802
  605. #pragma tagcall GTLayoutBase LT_Build cc 9802
  606. #pragma libcall GTLayoutBase LT_RebuildTagList d2 90803
  607. #pragma tagcall GTLayoutBase LT_RebuildTags d2 90803
  608. /*--- Added in v9.0 ---------------------------------------------------*/
  609. #pragma libcall GTLayoutBase LT_UpdateStrings d8 801
  610. #endif    /* !LIB_CODE && !_GTLAYOUT_C && !NO_PRAGMAS */
  611.  
  612.  
  613. /*****************************************************************************/
  614.  
  615.  
  616. #endif    /* _GTLAYOUT_H */
  617.