home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Programming / gtlayout / Doc / gtlayout.doc < prev   
Encoding:
Text File  |  1999-10-11  |  132.5 KB  |  3,992 lines

  1. TABLE OF CONTENTS
  2.  
  3. gtlayout.library/--background--
  4. gtlayout.library/--version--
  5. gtlayout.library/LT_Activate
  6. gtlayout.library/LT_BeginRefresh
  7. gtlayout.library/LT_BuildA
  8. gtlayout.library/LT_CatchUpRefresh
  9. gtlayout.library/LT_CreateHandleTagList
  10. gtlayout.library/LT_DeleteHandle
  11. gtlayout.library/LT_DeleteWindowLock
  12. gtlayout.library/LT_DisposeMenu
  13. gtlayout.library/LT_EndGroup
  14. gtlayout.library/LT_EndRefresh
  15. gtlayout.library/LT_Exit
  16. gtlayout.library/LT_FindMenuCommand
  17. gtlayout.library/LT_GetAttributesA
  18. gtlayout.library/LT_GetCode
  19. gtlayout.library/LT_GetIMsg
  20. gtlayout.library/LT_GetMenuItem
  21. gtlayout.library/LT_GetWindowUserData
  22. gtlayout.library/LT_HandleInput
  23. gtlayout.library/LT_Init
  24. gtlayout.library/LT_LabelChars
  25. gtlayout.library/LT_LabelWidth
  26. gtlayout.library/LT_LayoutMenusA
  27. gtlayout.library/LT_LevelWidth
  28. gtlayout.library/LT_LockWindow
  29. gtlayout.library/LT_MenuControlTagList
  30. gtlayout.library/LT_NewA
  31. gtlayout.library/LT_NewLevelWidth
  32. gtlayout.library/LT_NewMenuTagList
  33. gtlayout.library/LT_NewMenuTemplate
  34. gtlayout.library/LT_PressButton
  35. gtlayout.library/LT_RebuildTagList
  36. gtlayout.library/LT_Redraw
  37. gtlayout.library/LT_Refresh
  38. gtlayout.library/LT_ReplyIMsg
  39. gtlayout.library/LT_SetAttributesA
  40. gtlayout.library/LT_ShowWindow
  41. gtlayout.library/LT_UnlockWindow
  42. gtlayout.library/LT_UpdateStrings
  43. gtlayout.library/--background--               gtlayout.library/--background--
  44.  
  45.    NOTES
  46.     1. General information
  47.  
  48.     1.1 Purpose
  49.  
  50.     The GUI code included in this archive helps to create user interfaces
  51.     using gadtools.library with a minimum of effort. The code
  52.     automatically takes care of the font to be used, making the user
  53.     interface font independent. Localizing support is built right into
  54.     the code, just install a callback hook and pass numeric IDs for the
  55.     gadget labels: the code will invoke your hook in order to get the
  56.     text required. Keystroke activation of gadgets is also taken care
  57.     of, in fact the code will -- unless told not to do so -- assign keyboard
  58.     shortcuts to the gadgets created all on its own. Every effort has been
  59.     made to make the code reentrant, so it can be put into a shared library.
  60.     If a user interface does not fit onto a screen provisions are made to
  61.     choose a smaller font and to rescale the window contents until they fit.
  62.     Last but not least the user interface code offers transparent extensions
  63.     to the standard gadtools.library objects, such as LISTVIEW_KIND objects
  64.     which respond to double-clicks or STRING_KIND objects which can be used
  65.     to enter password text as they will not display the characters entered.
  66.  
  67.  
  68.     1.2 Distribution
  69.  
  70.     The code is *free*, you don't need to pay any money to use it, nor
  71.     do you need to quote my name in the documentation, the program or
  72.     anywhere else. You are allowed to make changes to the code, but if
  73.     you stumble across any bugs or even know how to fix them, please
  74.     let me know. It does not matter whether you intend to sell a program
  75.     to use the code, use the code in shareware, gift-ware, freeware or
  76.     etc.-ware programs: the code still remains royalty-free.
  77.  
  78.  
  79.     1.3 Caveats
  80.  
  81.     The code is pretty large, about 80K-100K bytes in size. Not all
  82.     gadtools.library type objects are supported, notably
  83.     GENERIC_KIND objects. The code is not as flexible as
  84.     gadtools.library, so certain things which are easily done using
  85.     gadtools.library may be pretty difficult or even impossible.
  86.     The code is written entirely in `C' and requires SAS/C to
  87.     compile. Some parts of the code are highly recursive; I haven't
  88.     tested how much stack they might require in certain cases,
  89.     but I recommend that you don't overuse the grouping feature.
  90.     The data structures required to create and maintain the
  91.     user interface are huge, a single window might require more
  92.     than 4K-6K of memory. Proportional font support only works
  93.     well starting with Kickstart v39 and up, v2.04 will probably
  94.     not look quite that pretty.
  95.  
  96.  
  97.     2. Programming
  98.  
  99.     2.1 Client libraries required for link library version
  100.  
  101.     You need to have SysBase and GadToolsBase initialized in order to make
  102.     use of the code, i.e. your code has to do
  103.     WaitPort()...GT_GetIMsg()...GT_ReplyIMsg all on its own. The code makes
  104.     use of the memory pools introduced in exec.library v39, but calls the
  105.     equivalent routines in amiga.lib. Note: as of this writing the pools
  106.     code in amiga.lib v40.14 is broken, so you need to link with Mike
  107.     Sinz' fixed pools.lib.
  108.  
  109.  
  110.     2.2 Invocation procedure
  111.  
  112.     The typical invocation procedure looks roughly like this:
  113.  
  114.        LT_Init();    // only for link library version
  115.        :
  116.        :
  117.           LT_CreateHandleTags();
  118.              LT_New();
  119.              :
  120.              :
  121.              LT_New();
  122.                 LT_Build();
  123.                    LT_HandleInput();
  124.           LT_DeleteHandle();
  125.        :
  126.        :
  127.        LT_Exit();    // only for link library version
  128.  
  129.     You need to call LT_Init() only once in your program, it will initialize
  130.     the libraries and global data structures required by the user interface
  131.     code. When you are finished with the user interface and your program is
  132.     about to exit you need to call LT_Exit() or memory will get lost.
  133.     Note that LT_Init() is not protected against multiple invocations. If
  134.     called repeatedly memory will get lost which can never be reclaimed.
  135.     However, LT_Exit() is protected against multiple invocations, you can
  136.     also call it before ever giving LT_Init() a call, but I doubt this
  137.     would make much sense. If you are using the shared gtlayout.library
  138.     no call to LT_Init()/LT_Exit() is necessary as these calls are already
  139.     wrapped into the library opening code.
  140.        Before you can actually start building a window layout a call to
  141.     LT_CreateHandleTags() needs to be made. You need to pass in a pointer
  142.     to the Screen your user interface window is to be opened on and,
  143.     optionally, a few tags to control the look and performance of the
  144.     interface. *Never* close the screen in question before calling
  145.     LT_DeleteHandle() or nasty things will happen. For public screens
  146.     the code will try to lock the screen in question. With the handle
  147.     LT_CreateHandleTags() returned you can call LT_New() to build the
  148.     user interface. When finished a call to LT_Build() will finally
  149.     open a window and place the gadgets inside. A pointer to the
  150.     Window created will be returned, ready to be used for the
  151.     WaitPort()...GT_GetIMsg()...LT_HandleInput()...GT_ReplyIMsg()
  152.     loop. When finished, a call to LT_DeleteHandle() will close the
  153.     window and release all the memory associated with it. The design
  154.     of the interface code is similar to the corresponding calls in
  155.     gadtools.library, i.e. you don't need to worry about LT_New()
  156.     failing to allocate memory for the objects required. When it comes
  157.     to LT_Build() the code will know about any trouble which would
  158.     show up during previous invocations of LT_New(). In essence,
  159.     if LT_Build() returns NULL something is wrong.
  160.  
  161.  
  162.     2.3 Hierarchic grouping
  163.  
  164.     The basic building block of the user interface is a group, either
  165.     a horizontal or a vertical group. Adding gadgets or other objects
  166.     to a horizontal group will place them side by side from left to
  167.     right. A vertical group causes objects to be place from top to
  168.     bottom in one straight line. Groups help to arrange objects
  169.     neatly stacked, centered and properly aligned with other
  170.     members of the group.
  171.  
  172.     MUCHO IMPORTANTE: there is a bug lurking in the code which I never
  173.     had the luck to find and fix. One would expect to create
  174.     user interface structures like this:
  175.  
  176.        <group start>
  177.           <button>
  178.           <list>
  179.           <group start>
  180.              <slider>
  181.              <text>
  182.           <group end>
  183.           <button>
  184.        <group end>
  185.  
  186.     However, it is in fact not possible to mix gadgets and groups.
  187.     Thus, the user interface structure would have to look like this:
  188.  
  189.        <group start>
  190.           <group start>
  191.              <button>
  192.              <list>
  193.           <group end>
  194.           <group start>
  195.              <slider>
  196.              <text>
  197.           <group end>
  198.           <group start>
  199.              <button>
  200.           <group end>
  201.        <group end>
  202.  
  203.     Or in other words: groups only mix with other groups.
  204.  
  205.     You build groups using three different object types. In this
  206.     context `object type' refers to a specific numeric value the
  207.     LT_New() routine knows which will cause it to add another leaf
  208.     to the user interface structure tree. Here is an example:
  209.  
  210.        struct LayoutHandle *Handle;
  211.  
  212.        if(Handle = LT_CreateHandleTags(NULL,
  213.           LAHN_AutoActivate,FALSE,
  214.        TAG_DONE))
  215.        {
  216.           struct Window *Window;
  217.  
  218.           LT_New(Handle,
  219.              LA_Type,      VERTICAL_KIND,  /* A vertical group. */
  220.              LA_LabelText, "Main group",   /* Group title text. */
  221.           TAG_DONE);
  222.           {
  223.              LT_New(Handle,
  224.                 LA_Type,      BUTTON_KIND, /* A plain button. */
  225.                 LA_LabelText, "A button",
  226.                 LA_ID,        11,
  227.              TAG_DONE);
  228.  
  229.              LT_New(Handle,
  230.                 LA_Type,      XBAR_KIND,   /* A separator bar. */
  231.              TAG_DONE);
  232.  
  233.              LT_New(Handle,
  234.                 LA_Type,      BUTTON_KIND, /* A plain button. */
  235.                 LA_LabelText, "Another button",
  236.                 LA_ID,        22,
  237.              TAG_DONE);
  238.  
  239.              LT_New(Handle,
  240.                 LA_Type,      END_KIND,    /* This ends the current group. */
  241.              TAG_DONE);
  242.           }
  243.  
  244.           if(Window = LT_Build(Handle,
  245.             LAWN_Title,     "Window title",
  246.             LAWN_IDCMP,     IDCMP_CLOSEWINDOW,
  247.             WA_CloseGadget, TRUE,
  248.           TAG_DONE))
  249.           {
  250.               struct IntuiMessage *Message;
  251.               ULONG                MsgQualifier,
  252.                                    MsgClass;
  253.               UWORD                MsgCode;
  254.               struct Gadget       *MsgGadget;
  255.               BOOL                 Done = FALSE;
  256.  
  257.               do
  258.               {
  259.                   WaitPort(Window->UserPort);
  260.  
  261.                   while(Message = GT_GetIMsg(Window->UserPort))
  262.                   {
  263.                      MsgClass     = Message->Class;
  264.                      MsgCode      = Message->Code;
  265.                      MsgQualifier = Message->Qualifier;
  266.                      MsgGadget    = Message->IAddress;
  267.  
  268.                      GT_ReplyIMsg(Message);
  269.  
  270.                      LT_HandleInput(Handle,MsgQualifier,&MsgClass,
  271.                          &MsgCode,&MsgGadget);
  272.  
  273.                      switch(MsgClass)
  274.                      {
  275.                         case IDCMP_CLOSEWINDOW:
  276.  
  277.                             Done = TRUE;
  278.                             break;
  279.  
  280.                         case IDCMP_GADGETUP:
  281.  
  282.                             switch(MsgGadget->GadgetID)
  283.                             {
  284.                                 case 11: printf("First gadget\n");
  285.                                          break;
  286.  
  287.                                 case 22: printf("Second gadget\n");
  288.                                          break;
  289.                             }
  290.  
  291.                             break;
  292.                      }
  293.                   }
  294.               }
  295.               while(!Done);
  296.           }
  297.  
  298.           LT_DeleteHandle(Handle);
  299.        }
  300.  
  301.     The example creates one single group, places a few objects inside,
  302.     calls the layout routine, handles the input and finally cleans
  303.     things up again. This example also shows that you *need* at
  304.     least one group in your tree (to form the root) in order to get
  305.     things to work.
  306.        The input loop requires you to call LT_HandleInput() in order
  307.     to get the user interface code to filter out certain events and
  308.     to update internal information. The data passed in must have
  309.     been processed via the gadtools.library routines. You *must not*
  310.     call LT_HandleInput() before GT_ReplyIMsg() is called since the
  311.     routine may call intuition.library and gadtools.library routines
  312.     which in turn might lead to a system lock-up if the message
  313.     has not been processed yet. The first thing to do after LT_HandleInput()
  314.     has done whatever was necessary to the data you passed in is
  315.     examine the MsgClass variable. The user interface code will
  316.     `fake' certain message events using the variables passed in,
  317.     *do not* use any other data gathered from the original
  318.     IntuiMessage. The MsgClass may include event types you did
  319.     not ask for, i.e. the IDCMP flags of the window opened
  320.     will be set according to the objects you added to the window.
  321.     Also, the IDCMP_IDCMPUPDATE message class will show up for
  322.     certain objects. More on this later in this document.
  323.  
  324.  
  325.     2.4 Setting and getting object attributes
  326.  
  327.     The mechanism to update and query object attributes does not
  328.     exactly match the familiar gadtools.library interface. In
  329.     fact, the routine to change gadget attributes will forward
  330.     the tagitem list passed in to gadtools.library/GT_SetGadgetAttrs().
  331.     On the other hand the routine to query object attributes does
  332.     not work like gadtools.library/GT_GetGadgetAttrs(). The
  333.     user interface code assumes that all objects it can handle and
  334.     create posess certain attributes unique to the type of the
  335.     object in question. For example, the unique attribute of a
  336.     STRING_KIND object would be a pointer to the string it
  337.     `contains'. The unique attribute of a SLIDER_KIND object is
  338.     the current slider position. The LT_GetAttributes() routine
  339.     will return this attribute, but also accept a tagitem list
  340.     to fill in for certain special tag values.
  341.  
  342.  
  343.     2.5 Extra data
  344.  
  345.     Once a LayoutHandle has been created the interface code will
  346.     provide you with a number of information concerning the screen
  347.     the handle has been attached to. This information includes
  348.     the DrawInfo structure of the screen, the VisualInfo data
  349.     and the Screen address. This information is read-only.
  350.  
  351.  
  352.     2.6 Menus
  353.  
  354.     With a LayoutHandle available a routine called LT_LayoutMenuTags()
  355.     will create a standard Intuition menu structure via gadtools.library
  356.     which can be passed to LT_Build(). Note that this
  357.     routine does not modify any data passed in, it does neither
  358.     attach the menu created to the LayoutHandle passed in,
  359.     nor does it change the NewMenu table.
  360.  
  361.  
  362.     2.7 Localization
  363.  
  364.     All object and menu creation routines support localization via
  365.     a Hook callback interface, i.e. you can pass a pointer to an
  366.     initialized Hook structure to LT_CreateHandleTags() which will
  367.     later be used to supply label and list text for objects
  368.     created. The Hook callback routine is called in the following
  369.     fashion:
  370.  
  371.        String = HookFunc(struct Hook *Hook,struct LayoutHandle *Handle,LONG ID)
  372.          D0                            A0                         A2        A1
  373.  
  374.     Or in other words: a locale string ID is passed in, the routine is supposed
  375.     to look up the string to match this ID and to return it.
  376.  
  377.  
  378.     2.8 Object types to generate IDCMP_IDCMPUPDATE events
  379.  
  380.     Certain objects convey extra information which is merged into the `fake'
  381.     input stream passed to the client calling LT_HandleInput(). These objects
  382.     are:
  383.  
  384.        STRING_KIND
  385.        TEXT_KIND
  386.        PALETTE_KIND
  387.  
  388.           The user pressed the `select' button which belongs
  389.           to this gadget. The MsgGadget pointer indicates the
  390.           STRING_KIND/TEXT_KIND/PALETTE_KIND object the `select'
  391.           button belongs to.
  392.  
  393.        LISTVIEW_KIND
  394.  
  395.           The user double-clicked on an entry. The entry number
  396.           is returned in the MsgCode variable. The MsgGadget
  397.           pointer indicates the LISTVIEW_KIND object the user
  398.           has clicked on.
  399.  
  400.  
  401.     2.9 Keystroke activation
  402.  
  403.     Unless forbidden via the the LA_NoKey tag item the user interface
  404.     code will pick the keyboard shortcuts for all gadgets on its own.
  405.     The currently active global console keymap will be checked at the
  406.     time when LT_Init() is called in order to make sure subsequent
  407.     calls to LT_Build() will use only keys the user can press on
  408.     the keyboard. Double-dead keys are also excluded from the
  409.     table created. This avoids problems with gadget labels such as
  410.     "éééé" which would require the user to hit two keys in a row to
  411.     activate the gadget.
  412.        If the window created happens to feature a close gadget
  413.     pressing the `Esc' key will cause the client to receive
  414.     an IDCMP_CLOSEWINDOW event.
  415.        A single LISTVIEW_KIND object may receive special treatment
  416.     if the LALV_CursorKey tag is used: the user will be able to
  417.     operate the listview using the cursor keys. Note: this
  418.     will also keep the user interface code from choosing a
  419.     special keystroke from the gadget label.
  420.        The user will be able to operate a single BUTTON_KIND
  421.     object using the return key if the LABT_ReturnKey tag is
  422.     used. A recessed frame will be drawn around the button hit
  423.     box to indicate its special status.
  424.        Pressing the Tab key can be bound to operate a cycle or
  425.     mx kind object.
  426.  
  427.     3. Credits
  428.  
  429.     The original design is based upon the user interface layout code used by
  430.     `term' 3.1. I put the first version of the layout routines together back
  431.     in Summer 1993 when I wanted to write the follow-up to `term' v3.4.
  432.  
  433.     Martin Taillefer rewrote large parts of the code, added new routines and
  434.     generally improved the performance of the layout process. I owe Martin
  435.     much for the ideas he put into the library.
  436.  
  437.     Kai Iske, Christoph Feck, Stefan Becker, Michael Barsoom, Sven Stullich
  438.     and Mark Ritter helped to iron out the remaining bugs and piled up bug
  439.     reports and enhancement requests.
  440.  
  441. gtlayout.library/--version--                     gtlayout.library/--version--
  442.  
  443.    NOTES
  444.     This document describes gtlayout.library v5.12 or higher. Do not assume that
  445.     previous library releases support the same features.
  446.  
  447. gtlayout.library/LT_Activate                     gtlayout.library/LT_Activate
  448.  
  449.    NAME
  450.     LT_Activate -- Activate a string type gadget.
  451.  
  452.    SYNOPSIS
  453.     LT_Activate(Handle,ID);
  454.                   A0   D0
  455.  
  456.     VOID LT_Activate(LayoutHandle *,LONG);
  457.  
  458.    FUNCTION
  459.     The equivalent to intuition.library/ActivateGadget().
  460.  
  461.    INPUTS
  462.     Handle - Pointer to LayoutHandle structure.
  463.  
  464.     ID - ID of Gadget to activate.
  465.  
  466.    RESULT
  467.     none
  468.  
  469.    SEE ALSO
  470.     intuition.library/ActivateGadget
  471.  
  472. gtlayout.library/LT_BeginRefresh             gtlayout.library/LT_BeginRefresh
  473.  
  474.    NAME
  475.     LT_BeginRefresh -- Optimized window refreshing
  476.  
  477.    SYNOPSIS
  478.     LT_BeginRefresh(Handle)
  479.                       A0
  480.  
  481.    FUNCTION
  482.     If you wish to handle window refreshing all on your own, you
  483.     might want to use the LT_BeginRefresh...LT_EndRefresh pair
  484.     in your program. By default the user interface layout engine
  485.     will automatically intercept IDCMP_REFRESHWINDOW events and
  486.     react to them accordingly.
  487.  
  488.    INPUTS
  489.     Handle - Pointer to a LayoutHandle structure.
  490.  
  491.    RESULT
  492.     none
  493.  
  494.    SEE ALSO
  495.     intuition.library/BeginRefresh
  496.     intuition.library/EndRefresh
  497.     gtlayout.library/LT_EndRefresh
  498.  
  499. gtlayout.library/LT_BuildA                         gtlayout.library/LT_BuildA
  500.  
  501.    NAME
  502.     LT_BuildA -- turn the user interface specs into a window
  503.                  and gadgets.
  504.  
  505.    SYNOPSIS
  506.     Window = LT_BuildA(Handle,Tags);
  507.       D0                 A0    A1
  508.  
  509.     struct Window *LT_BuildA(LayoutHandle *,struct TagItem *);
  510.  
  511.     Window = LT_Build(Handle,...);
  512.  
  513.     struct Window *LT_Build(LayoutHandle *,...);
  514.  
  515.    FUNCTION
  516.     This is the big one. After building up a user interface specification
  517.     using LT_NewA() a call to LT_BuildA() will finally lay out the single
  518.     user interface elements, open a window and put the gadgets, etc.
  519.     inside.
  520.  
  521.     The code tries to fit all the gadgets into the window, but if it
  522.     runs out of space it will fall back to a different font and
  523.     rescale the user interface objects to match it. It will first
  524.     fall back onto the system default font. If unsuccessful it will
  525.     as a last resort try to use topaz.font/8.
  526.  
  527.     To make it easier to distinguish between different handles that
  528.     share the same Window->UserPort, the Window->UserData pointer
  529.     will point to the LayoutHandle that created it (V13).
  530.  
  531.         NOTE: Earlier library releases did not support this feature,
  532.             so be prepared to deal with Window->UserData == NULL.
  533.  
  534.    INPUTS
  535.     Handle - Pointer to a LayoutHandle structure.
  536.  
  537.     Tags - Pointer to TagItem list controlling window
  538.         and layout attributes.
  539.  
  540.  
  541.     All the tag values given are passed straight away to OpenWindowTags(),
  542.     see intuition.doc for more information.
  543.  
  544.     In addition to this a number of private tag values are supported:
  545.  
  546.     LAWN_Menu (struct Menu *) - The menu to attach to the window. The
  547.         IDCMP flags will be updated to include IDCMP_MENUPICK if this
  548.         tag is used.
  549.  
  550.     LAWN_MenuTemplate (struct NewMenu *) - A list of filled-in
  551.         NewMenu structures which will get passed straight through
  552.         to LT_NewMenuTemplate(). If a menu could be created, it will
  553.         be attached to the window. LT_DeleteHandle() will then later
  554.         automatically dispose of the menu. Please note that the window
  555.         may fail to open due to the menu layout going wrong. Separate
  556.         calls to LT_NewMenuTemplate() and LT_Build() may be a better
  557.         approach since it is easier to find out which process went
  558.         wrong. You will find a pointer to the menu attached to the
  559.         LayoutHandle in LayoutHandle->Menu. Please note that this
  560.         entry only exists in LayoutHandles created by gtlayout.library
  561.         v13 or higher. (V13)
  562.  
  563.             NOTE: This tag effectively overrides LAWN_Menu.
  564.  
  565.     LAWN_MenuTags (struct TagItem *) - A list of TagItems which
  566.         will get passed straight through to LT_NewMenuTagList().
  567.         Even if you don't ask for it, LT_Build() will pass
  568.         "LAMN_Handle,<Handle>" in for you, so any additional tags
  569.         specifying screen, fonts, etc. will be overridden. If a menu
  570.         could be created, it will be attached to the window.
  571.         LT_DeleteHandle() will then later automatically dispose of the
  572.         menu. Please note that the window may fail to open due to the
  573.         menu layout going wrong. Separate calls to LT_NewMenuTagList()
  574.         and LT_Build() may be a better approach since it is easier to
  575.         find out which process went wrong. You will find a pointer to the
  576.         menu attached to the LayoutHandle in LayoutHandle->Menu. Please note
  577.         that this entry only exists in LayoutHandles created by
  578.         gtlayout.library v13 or higher. (V13)
  579.  
  580.             NOTE: This tag effectively overrides LAWN_Menu and has
  581.                   precedence over LAWN_MenuTemplate.
  582.  
  583.     LAWN_UserPort (struct MsgPort *) - The MsgPort to use as the
  584.         window user port. The MsgPort will be attached using the
  585.         common ModifyIDCMP() method, closing the window will
  586.         first remove and reply all pending messages at this port.
  587.  
  588.     LAWN_Left (LONG) - The left edge position the window is to use.
  589.         This effectively overrides any horizontal alignment flags.
  590.  
  591.             NOTE: the code may choose to ignore this value if it finds
  592.                 that the window will not fit onto the screen unless
  593.                 the left edge position is changed.
  594.  
  595.     LAWN_Top (LONG) - The top edge position the window is to use.
  596.         This effectively overrides any vertical alignment flags.
  597.  
  598.             NOTE: the code may choose to ignore this value if it finds
  599.                 that the window will not fit onto the screen unless
  600.                 the top edge position is changed.
  601.  
  602.     LAWN_Zoom (BOOL) - Adds a zoom gadget to the window. Clicking
  603.         on this gadget will cause the window to shrink/zoom back
  604.         to its original position. This differs from the WA_Zoom
  605.         tag behaviour. When the window zooms back to its original
  606.         position the gadgets are automatically refreshed.
  607.         Default: FALSE
  608.  
  609.     LAWN_MaxPen (LONG) - The maximum rendering pen index your code
  610.         will use. Since you are -- with some restrictions -- allowed
  611.         to render into the window created you may want to avoid
  612.         silly side effects if drawing images or other colourful
  613.         textures which do not share the common user interface colours.
  614.         By default the layout code will change the maximum rendering
  615.         pen number for the window to include only the user interface
  616.         pen colours. This can, but need not disturb your own private
  617.         window rendering.
  618.         Look up graphics.library/SetMaxPen for more information.
  619.         Default: determined by looking up Screen->DrawInfo.dri_Pens
  620.  
  621.     LAWN_BelowMouse (BOOL) - This instructs the layout routine to
  622.         centre the window created -- if possible -- below the
  623.         mouse pointer. This effectively ignores any left edge,
  624.         top edge or alignment settings.
  625.         Default: FALSE
  626.  
  627.     LAWN_MoveToWindow (BOOL) - When the window is finally open the
  628.         user interface code will try to make sure the entire window
  629.         is visible on the screen, this may involve moving the
  630.         currently visible portion of an autoscrolling screen.
  631.         Default: TRUE
  632.  
  633.     LAWN_AutoRefresh (BOOL) - Handle IDCMP_REFRESHWINDOW events
  634.         automatically.
  635.         Default: TRUE
  636.  
  637.     LAWN_HelpHook (struct Hook *) - Hook code to invoke when the user
  638.         presses the "Help" key. See gtlayout.h for more information.
  639.         Default: NULL
  640.  
  641.     LAWN_Parent (struct Window *) - Parent window to centre the child
  642.         window in.
  643.         Default: NULL
  644.  
  645.     LAWN_BlockParent (BOOL) - Lock the parent window via LT_LockWindow()
  646.         until the child window is closed.
  647.  
  648.             NOTE: requires LAWN_Parent attribute.
  649.  
  650.         Default: FALSE
  651.  
  652.     LAWN_SmartZoom (BOOL) - Attach a zoom gadget to the window created.
  653.         When in zoomed state, the window will be as small as possible,
  654.         showing only the window title and window gadgets:
  655.  
  656.             NOTE: this tag implies LAWN_Zoom,TRUE
  657.  
  658.         Default: FALSE
  659.  
  660.     LAWN_Title (STRPTR) - The window title to use. Use this tag in
  661.         place of WA_Title or you will break the layout code.
  662.         Default: no title
  663.  
  664.     LAWN_Bounds (struct IBox *) - Bounds to centre the window in.
  665.         Default: NULL
  666.  
  667.     LAWN_ExtraWidth (LONG) - Extra width to add into the calculation
  668.         when opening the window.
  669.         Default: 0
  670.  
  671.     LAWN_ExtraHeight (LONG) - Extra height to add into the calculation
  672.         when opening the window.
  673.         Default: 0
  674.  
  675.     LAWN_IDCMP (ULONG) - Use this tag in place of WA_IDCMP or you
  676.         will break the object handling code.
  677.  
  678.     LAWN_AlignWindow (UWORD) - Alignment information for the window, must
  679.         be a mask made from the following bit values:
  680.  
  681.             ALIGNF_RIGHT - Align to screen right edge
  682.             ALIGNF_LEFT - Align to screen left edge
  683.             ALIGNF_TOP - Align to screen top edge
  684.             ALIGNF_BOTTOM - Align to screen bottom edge
  685.  
  686.         Unless forbidden (such as by passing ALIGNF_RIGHT|ALIGNF_TOP)
  687.         the window will be centered horizontally and/or vertically.
  688.  
  689.     LAWN_FlushLeft (BOOL) - Add no horizontal space surrounding the
  690.         objects the windows will hold. (V10)
  691.  
  692.     LAWN_FlushTop (BOOL) - Add no vertical space surrounding the
  693.         objects the windows will hold. (V10)
  694.  
  695.     LAWN_Show (BOOL) - Make the window visible when it is opened;
  696.         this may involve depth-arranging screens. (V10)
  697.            Default: FALSE
  698.  
  699.     LAWN_NoInitialRefresh (BOOL) - If set to TRUE, adds the
  700.         gadgets, but does not draw the window imagery. You need
  701.         to draw them later by calling gtlayout.library/LT_Refresh.
  702.         Default: FALSE
  703.  
  704.     LAWN_LimitWidth (UWORD) - Limit the width of the window to this
  705.         value. (V35)
  706.  
  707.     LAWN_LimitHeight (UWORD) - Limit the height of the window to this
  708.         value. (V35)
  709.  
  710.     LAWN_UserData (APTR) - Store this pointer with the Window information.
  711.         you can later retrieve it with the LT_GetWindowUserData()
  712.         call (V39).
  713.  
  714.    RESULT
  715.     Window - Pointer to a Window structure.
  716.  
  717.    SEE ALSO
  718.        gtlayout.library/LT_Refresh
  719.        gtlayout.library/LT_GetWindowUserData
  720.        intuition.library/OpenWindow
  721.        intuition.library/OpenWindowTagList
  722.  
  723. gtlayout.library/LT_CatchUpRefresh         gtlayout.library/LT_CatchUpRefresh
  724.  
  725.    NAME
  726.     LT_CatchUpRefresh -- Repair the display after missing the
  727.                          Window refresh message (V34).
  728.  
  729.    SYNOPSIS
  730.     LT_CatchUpRefresh(Handle)
  731.                         A0
  732.  
  733.     VOID LT_CatchUpRefresh(LayoutHandle *);
  734.  
  735.    FUNCTION
  736.     In case an application missed an IDCMP_REFRESHWINDOW event
  737.     the display may be damaged and in need of repair. This can
  738.     happen if the ASL requester is attached to the window,
  739.     sharing its IDCMP with the window. Any refresh events will then
  740.     go straight to nil. Call this routine if you believe that
  741.     you missed a refresh event. The display will be repaired only
  742.     if it is in need of repair, so there is no harm in calling it
  743.     if not actually necessary.
  744.  
  745.    INPUTS
  746.     Handle - Pointer to a LayoutHandle structure.
  747.  
  748.    RESULT
  749.     none
  750.  
  751.    SEE ALSO
  752.     gtlayout.library/LT_BeginRefresh
  753.     intuition.library/BeginRefresh
  754.     intuition.library/EndRefresh
  755.  
  756. gtlayout.library/LT_CreateHandleTagListtlayout.library/LT_CreateHandleTagList
  757.  
  758.    NAME
  759.     LT_CreateHandleTagList -- Allocate auxilary data required by LT_New()
  760.                               and LT_BuildA().
  761.  
  762.    SYNOPSIS
  763.     Handle = LT_CreateHandleTagList(Screen,Tags);
  764.       D0                              A0    A1
  765.  
  766.     LayoutHandle *LT_CreateHandleTagList(struct Screen *,struct TagItem *);
  767.  
  768.     Handle = LT_CreateHandleTags(Screen,...);
  769.  
  770.     struct LayoutHandle *LT_CreateHandleTags(struct Screen *,...);
  771.  
  772.    FUNCTION
  773.     Memory is allocated, tables are set up and data is collected
  774.     on a screen a user interface is to be opened on. This
  775.     involves calculating the screen font parameters.
  776.  
  777.    INPUTS
  778.     Screen - Pointer to the screen the user interface is to
  779.         use. Passing NULL will cause the default public
  780.         screen to be used.
  781.  
  782.             NOTE: if NULL is passed the default public screen
  783.                 will stay locked until LT_DeleteHandle()
  784.                 is called.
  785.  
  786.     Tags - Tag values to control certain aspects of the
  787.         user interface created.
  788.  
  789.  
  790.     Valid tags include:
  791.  
  792.     LAHN_AutoActivate (BOOL) - Set to TRUE if you want the interface
  793.         to always keep a string gadget active if possible. Hitting
  794.         the return key will then cause the next following string
  795.         gadget to get activated, either cycling through all the
  796.         string gadgets available or stopping at the next string
  797.         gadget to have the LAST_LastGadget attribute set.
  798.         Default: TRUE
  799.  
  800.     LAHN_RawKeyFilter (BOOL) - Discard unprocessed IDCMP_RAWKEY
  801.         events. (V13)
  802.         Default: TRUE
  803.  
  804.     LAHN_UserData (APTR) - Store user specific data in the
  805.         LayoutHandle->UserData entry.
  806.  
  807.             NOTE: This tag requires gtlayout.library v9 and the
  808.                 corresponding entry in the LayoutHandle exists
  809.                 only under gtlayout.library v9 and up. *NEVER*
  810.                 write to this entry, use LT_SetAttributes()
  811.                 instead.
  812.  
  813.     LAHN_LocaleHook (struct Hook *) - The hook to call when
  814.         locale string IDs are to be mapped to strings. The
  815.         hook function is called with the following parameters:
  816.  
  817.         String = HookFunc(struct Hook *Hook,struct LayoutHandle *Handle,
  818.           D0                            A0                         A2
  819.                           LONG ID)
  820.                                A1
  821.  
  822.         The function is to look up the string associated with the ID
  823.         passed in and return the string.
  824.         Default: no locale hook
  825.  
  826.     LAHN_TextAttr (struct TTextAttr *) - The text font to use when
  827.         creating the gadgets and objects.
  828.         Default: Screen->Font
  829.  
  830.     LAHN_CloningPermitted (BOOL) - If a window will not fit onto the
  831.         screen the user interface is intended for, the layout engine
  832.         will scale the interface data down while stepping down in
  833.         font size. If all this fails, the engine will open a custom
  834.         screen for the window; this process is called "cloning".
  835.         The LAHN_CloningPermitted tag controls whether the engine will
  836.         actually try to open the custom screen or just return NULL
  837.         when LT_Build fails.
  838.         Default: TRUE
  839.  
  840.     LAHN_EditHook (struct Hook *) - You can specify a default string
  841.         gadget editing hook to be used for all following string
  842.         gadgets. Your hook should obey the same rules that apply
  843.         to hooks passed via GTST_EditHook/GTIN_EditHook.
  844.         Default: NULL
  845.  
  846.     LAHN_ExactClone (BOOL) - This tag works in conjunction with the
  847.         LAHN_CloningPermitted tag. By default the layout engine will
  848.         try to replicate only the basic characteristics of the
  849.         screen the window was intended to open on. This may result
  850.         in a screen which uses less colours than the original
  851.         screen. You can force the engine to make an almost exact
  852.         clone of the original screen by passing the LAHN_ExactClone
  853.         tag with a value of TRUE.
  854.         Default: FALSE
  855.  
  856.     LAHN_MenuGlyphs (BOOL) - This tag will make the layout engine
  857.         fill in the AmigaGlyph and CheckGlyph entries of the
  858.         LayoutHandle if running under Kickstart 3.0 or higher.
  859.         The corresponding images will be scaled to fit the actual
  860.         screen aspect ratio values and can later be used for
  861.         menu layout.
  862.         Default: FALSE
  863.  
  864.     LAHN_Parent (struct Window *) - You can pass a pointer to the
  865.         parent window of the window you intend to open using
  866.         the user interface layout engine. The new window will
  867.         open inside the boundaries of the parent window. If the
  868.         size does not fit, it will be opened centered over the
  869.         parent window.
  870.         Default: NULL
  871.  
  872.     LAHN_BlockParent (BOOL) - This tag works in conjunction with the
  873.         LAHN_Parent tag. If in effect, will block the parent window
  874.         via LT_LockWindow until the new window is closed, after
  875.         which the parent window is unlocked again.
  876.         Default: FALSE
  877.  
  878.     LAHN_SimpleClone (BOOL) - This tag works in conjunction with the
  879.         LAHN_CloningPermitted tag. It will make the layout engine
  880.         forget most information about the original screen the
  881.         user interface was intended for. In short, it will open a
  882.         simple default screen for the interface.
  883.         Default: FALSE
  884.  
  885.     LAHN_ExitFlush (BOOL) - When the LayoutHandle is finally disposed
  886.         of with LT_DeleteHandle() all variables maintained by the
  887.         input handling code will be flushed. For example, if you
  888.         would use the LA_STRPTR tag for STRING_KIND objects the
  889.         last string gadget contents would be copied into the buffer
  890.         pointed to by LA_STRPTR. If you do not want to use this
  891.         feature, disable it with "LAHN_ExitFlush,FALSE". (V9)
  892.         Default: TRUE
  893.  
  894.     LAHN_NoKeys (BOOL) - Use TRUE to tell the library not to pick
  895.         keyboard shortcuts all on its own. This works like calling
  896.         LT_New() for all objects with "LA_NoKey,TRUE,". (V26)
  897.  
  898.     LAHN_PubScreen (struct Screen *) - Pointer to public screen
  899.         window is to open on. Must be locked and open until you call
  900.         LT_Built().
  901.  
  902.     LAHN_PubScreenName (STRPTR) - Name of public screen to open window
  903.         on. The library will try to lock the named screen as soon as
  904.         you call LT_CreateHandle.
  905.  
  906.     LAHN_PubScreenFallBack (BOOL) - If the named public screen cannot
  907.         be found and you ask for it, the library will lock the default
  908.         public screen (default: TRUE).
  909.  
  910.     LAHN_TopGroupType (LONG) - Request that after creating the layout
  911.         handle, a layout group should be added to it. This can be
  912.         either a vertical or a horizontal group. You specify the type
  913.         using VERTICAL_KIND or HORIZONTAL_KIND (default: don't add
  914.         any group). (V45)
  915.  
  916.    RESULT
  917.     Handle - Pointer to a LayoutHandle structure.
  918.  
  919. gtlayout.library/LT_DeleteHandle             gtlayout.library/LT_DeleteHandle
  920.  
  921.    NAME
  922.     LT_DeleteHandle -- Release storage space allocated by
  923.                        LT_CreateHandleTagList, closing windows,
  924.                        removing gadgets, etc.
  925.  
  926.    SYNOPSIS
  927.     LT_DeleteHandle(Handle);
  928.                       A0
  929.  
  930.     VOID LT_DeleteHandle(LayoutHandle *);
  931.  
  932.    FUNCTION
  933.     Windows and gadgets created by LT_CreateHandleTagList()
  934.     are removed, any associated memory is deallocated.
  935.  
  936.    INPUTS
  937.     Handle - Pointer to a LayoutHandle structure created
  938.         by LT_CreateHandleTaglist(). Passing NULL is
  939.         harmless.
  940.  
  941.    RESULT
  942.     none
  943.  
  944.    SEE ALSO
  945.     gtlayout.library/CreateHandleTagList
  946.  
  947. gtlayout.library/LT_DeleteWindowLock     gtlayout.library/LT_DeleteWindowLock
  948.  
  949.    NAME
  950.     LT_DeleteWindowLock -- Remove all locks from a window
  951.  
  952.    SYNOPSIS
  953.     LT_DeleteWindowLock(Window);
  954.                           A0
  955.  
  956.     VOID LT_DeleteWindowLock(struct Window *);
  957.  
  958.    FUNCTION
  959.     Before closing a locked window you should call this routine
  960.     which will remove all outstanding locks from it.
  961.  
  962.    INPUTS
  963.     Window - Pointer to window structure; passing NULL is
  964.     harmless.
  965.  
  966.    RESULT
  967.     none
  968.  
  969. gtlayout.library/LT_DisposeMenu               gtlayout.library/LT_DisposeMenu
  970.  
  971.    NAME
  972.     LT_DisposeMenu -- Release storage space allocated by
  973.                       LT_NewMenuTemplate or LT_NewMenuTagList (V11)
  974.  
  975.    SYNOPSIS
  976.     LT_DisposeMenu(Menu)
  977.                     A0
  978.  
  979.     VOID LT_DisposeMenu(struct Menu *);
  980.  
  981.    FUNCTION
  982.     Menus and MenuItems allocated by LT_NewMenuTemplate or
  983.     LT_NewMenuTagList are deallocated.
  984.  
  985.    INPUTS
  986.     Menu - Pointer to Menu structure as returned by
  987.         LT_NewMenuTemplate or LT_NewMenuTagList. Passing
  988.         NULL is harmless.
  989.  
  990.    RESULT
  991.     none
  992.  
  993.    SEE ALSO
  994.     gtlayout.library/LT_NewMenuTagList
  995.     gtlayout.library/LT_NewMenuTemplate
  996.  
  997. gtlayout.library/LT_EndGroup                     gtlayout.library/LT_EndGroup
  998.  
  999.    NAME
  1000.     LT_EndGroup -- end a group declaration.
  1001.  
  1002.    SYNOPSIS
  1003.     LT_EndGroup(Handle);
  1004.                  A0
  1005.  
  1006.     VOID LT_EndGroup(LayoutHandle *);
  1007.  
  1008.    FUNCTION
  1009.       This is just a short form of
  1010.  
  1011.            LT_New(Handle,
  1012.                LA_Type, END_KIND,
  1013.            TAG_DONE);
  1014.  
  1015.       It helps to save (some) space.
  1016.  
  1017.    INPUTS
  1018.         Handle - Pointer to LayoutHandle.
  1019.  
  1020.    RESULT
  1021.     none
  1022.  
  1023.    SEE ALSO
  1024.     gtlayout.library/LT_New
  1025.  
  1026. gtlayout.library/LT_EndRefresh                 gtlayout.library/LT_EndRefresh
  1027.  
  1028.    NAME
  1029.     LT_EndRefresh -- Optimized window refreshing
  1030.  
  1031.    SYNOPSIS
  1032.     LT_EndRefresh(Handle)
  1033.                     A0
  1034.  
  1035.     VOID LT_EndRefresh(LayoutHandle *);
  1036.  
  1037.    FUNCTION
  1038.     If you wish to handle window refreshing all on your own, you
  1039.     might want to use the LT_BeginRefresh...LT_EndRefresh pair
  1040.     in your program. By default the user interface layout engine
  1041.     will automatically intercept IDCMP_REFRESHWINDOW events and
  1042.     react to them accordingly.
  1043.  
  1044.    INPUTS
  1045.     Handle - Pointer to a LayoutHandle structure.
  1046.  
  1047.    RESULT
  1048.     none
  1049.  
  1050.    SEE ALSO
  1051.     gtlayout.library/LT_BeginRefresh
  1052.     intuition.library/BeginRefresh
  1053.     intuition.library/EndRefresh
  1054.  
  1055. gtlayout.library/LT_Exit                             gtlayout.library/LT_Exit
  1056.  
  1057.    NAME
  1058.     LT_Exit -- Clean up user interface allocations
  1059.  
  1060.    SYNOPSIS
  1061.     LT_Exit();
  1062.  
  1063.     VOID LT_Exit(VOID);
  1064.  
  1065.    FUNCTION
  1066.     When you are finished with user interface creation and
  1067.     do not not need the code any more you should call this
  1068.     routine. It will free all the memory allocated by
  1069.     LT_Init(), close libraries, etc.
  1070.  
  1071.    INPUTS
  1072.     none
  1073.  
  1074.    RESULT
  1075.     none
  1076.  
  1077.    NOTES
  1078.     This function is not present in the shared library, only
  1079.     in the link library. You need not and cannot invoke it in
  1080.     the shared library.
  1081.  
  1082.    SEE ALSO
  1083.     gtlayout.library/LT_Init
  1084.  
  1085. gtlayout.library/LT_FindMenuCommand       gtlayout.library/LT_FindMenuCommand
  1086.  
  1087.    NAME
  1088.     LT_FindMenuCommand -- Get the menu/submenu item associated
  1089.                           with a rawkey event (V11)
  1090.  
  1091.    SYNOPSIS
  1092.     Item = LT_FindMenuCommand(Menu,Code,Qualifier,Gadget)
  1093.      D0                        A0  D0       D0      A1
  1094.  
  1095.     struct MenuItem *LT_FindMenuCommand(struct Menu *,
  1096.  
  1097.                          UWORD,ULONG,struct Gadget *);
  1098.  
  1099.    FUNCTION
  1100.     With the IntuiMessage data copied from a type IDCMP_RAWKEY message
  1101.     tries to find the MenuItem the event referred to.
  1102.  
  1103.    INPUTS
  1104.     Menu - Pointer to Menu structure as returned by LT_NewMenuTagList.
  1105.  
  1106.     Code - Value copied from IntuiMessage->Code
  1107.  
  1108.     Qualifier - Value copied from IntuiMessage->Qualifier
  1109.  
  1110.     Gadget - Value copied from IntuiMessage->IAddress
  1111.  
  1112.    RESULT
  1113.     Item - Pointer to the struct MenuItem * in question or NULL
  1114.         if none could be found
  1115.  
  1116.    SEE ALSO
  1117.     gtlayout.library/LT_NewMenuTagList
  1118.  
  1119. gtlayout.library/LT_GetAttributesA         gtlayout.library/LT_GetAttributesA
  1120.  
  1121.    NAME
  1122.     LT_GetAttributesA -- Inquire information on a gadget.
  1123.  
  1124.    SYNOPSIS
  1125.     Value = LT_GetAttributesA(Handle,ID,Tags);
  1126.       D0                        A0   D0  A1
  1127.  
  1128.     LONG LT_GetAttributesA(LayoutHandle *,LONG ID,struct TagItem *);
  1129.  
  1130.     Value = LT_GetAttributes(Handle,ID,...);
  1131.  
  1132.     LONG LT_GetAttributes(LayoutHandle *,LONG ID,...);
  1133.  
  1134.    FUNCTION
  1135.     All objects created by the user interface layout code posess
  1136.     certain unique properties. The LT_GetAttributes() function will
  1137.     will inquire this information and return it. The implementation
  1138.     differs from gadtools.library/GT_GetGadgetAttrs in that you
  1139.     can inquire only a small subset of the object properties possible
  1140.     via the taglist passed in.
  1141.  
  1142.    INPUTS
  1143.     Handle - Pointer to LayoutHandle structure.
  1144.  
  1145.     ID - ID number of the object to inquire information about. This
  1146.         is the same value you passed via LA_ID to LT_New() when
  1147.         you created this object.
  1148.  
  1149.     Tags - TagItem list to receive information about the object
  1150.         in question.
  1151.  
  1152.  
  1153.     LA_Left (LONG *) - Left edge of object.
  1154.  
  1155.     LA_Top (LONG *) - Top edge of object.
  1156.  
  1157.     LA_Width (LONG *) - Width of object.
  1158.  
  1159.     LA_Height (LONG *) - Height of object.
  1160.  
  1161.     LA_Chars (LONG *) - Width of object measured in character
  1162.         widths. (V9)
  1163.  
  1164.     LA_Lines (LONG *) - Height of object measured in character
  1165.         heights. (V9)
  1166.  
  1167.     LA_LabelLeft (LONG *) - Left edge of label text. (V9)
  1168.  
  1169.     LA_LabelTop (LONG *) - Top edge of label text. (V9)
  1170.  
  1171.     LABO_Object (Object *) - Returns a pointer to the BOOPSI object
  1172.         the BOOPSI_KIND object is based upon. (V10)
  1173.  
  1174.             NOTE: Don't unlink the object or dispose of it or
  1175.                 terrible things are bound to happen.
  1176.  
  1177.     LAST_CursorPosition (LONG *) - Current position of the cursor
  1178.         in STRING_KIND and FRACTION_KIND objects. (V
  1179.  
  1180.    RESULT
  1181.     The result depends on the object type:
  1182.  
  1183.         VERTICAL_KIND:
  1184.         HORIZONTAL_KIND:
  1185.  
  1186.             active page
  1187.  
  1188.         SCROLLER_KIND:
  1189.  
  1190.             current GTSC_Top value
  1191.  
  1192.         TAPEDECK_KIND:
  1193.  
  1194.             current LATD_Pressed value
  1195.  
  1196.         LEVEL_KIND:
  1197.  
  1198.             current LAVL_Level state
  1199.  
  1200.         CHECKBOX_KIND:
  1201.  
  1202.             current GTCB_Checked state
  1203.  
  1204.         LISTVIEW_KIND:
  1205.  
  1206.             current GTLV_Selected state
  1207.  
  1208.         MX_KIND:
  1209.  
  1210.             current GTMX_Active state
  1211.  
  1212.         CYCLE_KIND:
  1213.  
  1214.             current GTCY_Active state
  1215.  
  1216.         POPUP_KIND:
  1217.  
  1218.             current LAPU_Active state
  1219.  
  1220.         TAB_KIND:
  1221.  
  1222.             current LATB_Active state
  1223.  
  1224.         PALETTE_KIND:
  1225.  
  1226.             current GTPA_Color state
  1227.  
  1228.         SLIDER_KIND:
  1229.  
  1230.             current GTSL_Level state
  1231.  
  1232.         GAUGE_KIND:
  1233.  
  1234.             current LAGA_Percent state
  1235.  
  1236.         STRING_KIND:
  1237.  
  1238.             pointer to current string
  1239.  
  1240.         PASSWORD_KIND:
  1241.  
  1242.             pointer to current string
  1243.  
  1244.         INTEGER_KIND:
  1245.  
  1246.             number currently entered
  1247.  
  1248.         BOOPSI_KIND:
  1249.  
  1250.             whatever the object thinks is its
  1251.             current value
  1252.  
  1253.         TEXTEDIT_KIND:
  1254.  
  1255.             pointer to current string
  1256.  
  1257. gtlayout.library/LT_GetCode                       gtlayout.library/LT_GetCode
  1258.  
  1259.    NAME
  1260.     LT_GetCode -- Easy raw key event to ANSI conversion.
  1261.  
  1262.    SYNOPSIS
  1263.     Key = LT_GetCode(Qualifier,Class,Code,Gadget);
  1264.      D0                  D0     D1    D2    A0
  1265.  
  1266.     LONG LT_GetCode(ULONG,ULONG,UWORD,struct Gadget *);
  1267.  
  1268.    FUNCTION
  1269.     The user interface layout engine can convert IDCMP_RAWKEY
  1270.     events into ANSI codes. Pass in the data you copied from
  1271.     the IntuiMessage here.
  1272.  
  1273.    INPUTS
  1274.     Qualifier - Copied from IntuiMessage->Qualifier
  1275.  
  1276.     Class - Copied from IntuiMessage->Class
  1277.  
  1278.     Code - Copied from IntuiMessage->Code
  1279.  
  1280.     Gadget - Copied from IntuiMessage->IAddress
  1281.  
  1282.    RESULT
  1283.     Key - ANSI code generated from the input data
  1284.         or -1 if no such code was to be generated.
  1285.  
  1286. gtlayout.library/LT_GetIMsg                       gtlayout.library/LT_GetIMsg
  1287.  
  1288.    NAME
  1289.     LT_GetIMsg -- Retrieve the next pending IntuiMessage
  1290.                   from the window associated with a
  1291.                   LayoutHandle.
  1292.  
  1293.    SYNOPSIS
  1294.     IntuiMessage = LT_GetIMsg(Handle);
  1295.          D0                     A0
  1296.  
  1297.     struct IntuiMessage *LT_GetIMsg(LayoutHandle *);
  1298.  
  1299.    FUNCTION
  1300.     This routine will handle most of the input loop for
  1301.     you. Just pass the pointer to the layout handle in,
  1302.     check if the result code is non-null, copy the data
  1303.     you need and reply the message via LT_ReplyIMsg().
  1304.  
  1305.     You will still need to wait for new input, as LT_GetIMsg
  1306.     will poll the MsgPort of the window.
  1307.  
  1308.     LT_GetIMsg() will try its best to distinguish between
  1309.     different LayoutHandles sharing the same Window->UserPort.
  1310.     If it finds that the window the message was sent to is
  1311.     using a different LayoutHandle, it will switch to using
  1312.     this handle (V13).
  1313.  
  1314.    INPUTS
  1315.     Handle - Pointer to LayoutHandle structure
  1316.  
  1317.    RESULT
  1318.     IntuiMessage - Pointer to IntuiMessage structure
  1319.  
  1320.    NOTES
  1321.     You *must not* make any assumptions about the contents
  1322.     of the IntuiMessage structure except for the following
  1323.     entries:
  1324.  
  1325.        Class
  1326.        Code
  1327.        Qualifier
  1328.        IAddress
  1329.  
  1330.     When finished, you must dispose the IntuiMessage via
  1331.     LT_ReplyIMsg or memory will be lost which can never
  1332.     be reclaimed.
  1333.  
  1334.     DO NOT CALL LT_HandleInput() ON THE DATA YOU RECEIVE
  1335.     FROM LT_GetIMsg() AS LT_GetIMsg() ALREADY DOES ALL THE
  1336.     MAGIC LT_HandleInput() OTHERWISE WOULD NEED TO DO!
  1337.     IF YOU STILL DO CALL LT_HandleInput() ON THE DATA YOU
  1338.     WILL RECEIVE `GHOST' EVENTS.
  1339.  
  1340.    SEE ALSO
  1341.     gtlayout.library/LT_ReplyIMsg
  1342.  
  1343. gtlayout.library/LT_GetMenuItem               gtlayout.library/LT_GetMenuItem
  1344.  
  1345.    NAME
  1346.     LT_GetMenuItem -- Get the menu/submenu item associated with an ID (V11)
  1347.  
  1348.    SYNOPSIS
  1349.     Item = LT_GetMenuItem(Menu,ID)
  1350.      D0                    A0  D0
  1351.  
  1352.     struct MenuItem *LT_GetMenuItem(struct Menu *,ULONG);
  1353.  
  1354.    FUNCTION
  1355.     This routine scans through all menu items associated with the
  1356.     menu and returns a pointer to the item associated with the
  1357.     given ID value.
  1358.  
  1359.    INPUTS
  1360.     Menu - Pointer to Menu structure as returned by LT_NewMenuTagList.
  1361.  
  1362.     ID - Unique ID of the item to find.
  1363.  
  1364.    RESULT
  1365.     Item - Pointer to the struct MenuItem * in question or NULL
  1366.         if none could be found
  1367.  
  1368.    SEE ALSO
  1369.     gtlayout.library/LT_NewMenuTagList
  1370.  
  1371. gtlayout.library/LT_GetWindowUserData   gtlayout.library/LT_GetWindowUserData
  1372.  
  1373.    NAME
  1374.     LT_GetWindowUserData -- Obtain user data information associated
  1375.         with a Window created by gtlayout.library/LT_Build (V39).
  1376.  
  1377.    SYNOPSIS
  1378.     Data = LT_GetWindowUserData(Window,DefaultValue);
  1379.       D0                         A0        A1
  1380.  
  1381.     APTR LT_GetWindowUserData(struct Window *,APTR);
  1382.  
  1383.    FUNCTION
  1384.     You can tell the build process to store user data with the Window
  1385.     it creates. This can be used as a replacement for the Window->UserData
  1386.     pointer information which gtlayout.library uses for itself. If the
  1387.     Window you pass to this routine was created by gtlayout.library/LT_Build
  1388.     you will receive the user data pointer you passed in, otherwise the
  1389.     given default value will be returned.
  1390.  
  1391.    INPUTS
  1392.     Window - Pointer to a Window created by gtlayout.library/LT_Build
  1393.  
  1394.    RESULT
  1395.     Data - The user data pointer you provided for gtlayout.library/LT_Build
  1396.         with the LAWN_UserData tag or the default value if no such pointer
  1397.         was provided or this Window was not created by
  1398.         gtlayout.library/LT_Build.
  1399.  
  1400.     DefaultValue - If the window was not created by gtlayout.library/LT_Build
  1401.         this is the value you will receive as the function result.
  1402.  
  1403.    SEE ALSO
  1404.        gtlayout.library/LT_Build
  1405.  
  1406. gtlayout.library/LT_HandleInput               gtlayout.library/LT_HandleInput
  1407.  
  1408.    NAME
  1409.     LT_HandleInput -- Filter IntuiMessage data.
  1410.  
  1411.    SYNOPSIS
  1412.     LT_HandleInput(Handle,Qualifier,Class,Code,Gadget);
  1413.                      A0      D0      A1    A2    A3
  1414.  
  1415.     VOID LT_HandleInput(LayoutHandle *,ULONG,ULONG *,
  1416.                         UWORD *,struct Gadget **);
  1417.  
  1418.    FUNCTION
  1419.     In order to keep track of user interface actions, such as
  1420.     keys getting pressed, sliders getting moved, etc. your
  1421.     code is to call LT_HandleInput() with data copied from the
  1422.     IntuiMessage it has just received and replied.
  1423.  
  1424.    INPUTS
  1425.     Handle - Pointer to a LayoutHandle structure.
  1426.  
  1427.     Qualifier - The Qualifier value copied from the
  1428.         IntuiMessage structure.
  1429.  
  1430.     Class - Pointer to the ULONG variable which holds the
  1431.         value copied from the Class entry of the
  1432.         IntuiMessage structure.
  1433.  
  1434.     Code - Pointer to the UWORD variable which holds the
  1435.         value copied from the Code entry of the
  1436.         IntuiMessage structure.
  1437.  
  1438.     Gadget - Pointer to the Gadget value copied from the
  1439.         IAddress entry of the IntuiMessage structure.
  1440.  
  1441.    RESULT
  1442.     none
  1443.  
  1444.    EXAMPLE
  1445.     struct IntuiMessage *IntuiMessage;
  1446.     ULONG Qualifier,Class;
  1447.     UWORD Code;
  1448.     struct Gadget *Gadget;
  1449.  
  1450.     for(;;)
  1451.     {
  1452.         WaitPort(Window->UserPort);
  1453.  
  1454.         while(IntuiMessage = GT_GetIMsg(Window->UserPort))
  1455.         {
  1456.             Class = IntuiMessage->Class;
  1457.             Code = IntuiMessage->Code;
  1458.             Qualifier = IntuiMessage->Qualifier;
  1459.             Gadget = IntuiMessage->Gadget;
  1460.  
  1461.             GT_ReplyIMsg(IntuiMessage);
  1462.  
  1463.             LT_HandleInput(Handle,Qualifier,&Class,&Code,&Gadget);
  1464.         }
  1465.     }
  1466.  
  1467.    NOTES
  1468.     For BOOPSI_KIND objects keystroke activation may lead to
  1469.     unexpected results. Your application will hear a IDCMP_GADGETUP
  1470.     event, the IntuiMessage->Code value will hold the ANSI key
  1471.     code of the key the user pressed.
  1472.  
  1473.     Do not call this routine before you have actually
  1474.     replied the IntuiMessage received or weird things
  1475.     may happen. This is not a suggestion, it's a threat.
  1476.  
  1477. gtlayout.library/LT_Init                             gtlayout.library/LT_Init
  1478.  
  1479.    NAME
  1480.     LT_Init -- Initialize user interface code.
  1481.  
  1482.    SYNOPSIS
  1483.     LT_Init();
  1484.  
  1485.     VOID LT_Init(VOID);
  1486.  
  1487.    FUNCTION
  1488.     You need to initialize the user interface code only once,
  1489.     so it can set up its internals, open libraries, etc.
  1490.     The code has to be initialized before any user interface
  1491.     creation can take place.
  1492.  
  1493.    NOTES
  1494.     This function is not present in the shared library, only
  1495.     in the link library. You need not and cannot invoke it in
  1496.     the shared library.
  1497.  
  1498.    SEE ALSO
  1499.     gtlayout.library/LT_Exit
  1500.  
  1501. gtlayout.library/LT_LabelChars                 gtlayout.library/LT_LabelChars
  1502.  
  1503.    NAME
  1504.     LT_LabelChars -- Calculate the width of a a string
  1505.                      according to the user interface font
  1506.                      associated with a LayoutHandle.
  1507.  
  1508.    SYNOPSIS
  1509.     Length = LT_LabelChars(Handle,Label);
  1510.       D0                     A0    A1
  1511.  
  1512.     LONG LT_LabelChars(struct LayoutHandle *,STRPTR);
  1513.  
  1514.    FUNCTION
  1515.     Calculates the width of a string according to the user
  1516.     interface font used. The width is then converted to a number
  1517.     of characters suitable for using with the LA_Chars tag
  1518.     item when calling LT_New().
  1519.  
  1520.     You can pass multi-line label texts to this routine,
  1521.     it will calculate the maximum length of the single
  1522.     lines. (V12)
  1523.  
  1524.    INPUTS
  1525.     Handle - Pointer to LayoutHandle structure.
  1526.  
  1527.     Label - Pointer to string.
  1528.  
  1529.    RESULT
  1530.     Length - Number of characters that are considered
  1531.         equivalent to the string length in pixels.
  1532.  
  1533. gtlayout.library/LT_LabelWidth                 gtlayout.library/LT_LabelWidth
  1534.  
  1535.    NAME
  1536.     LT_LabelWidth -- Calculate the width of a string according
  1537.                      to the user interface font used.
  1538.  
  1539.    SYNOPSIS
  1540.     Width = LT_LabelWidth(Handle,Label);
  1541.       D0                    A0    A1
  1542.  
  1543.     LONG LT_LabelWidth(LayoutHandle *,STRPTR);
  1544.  
  1545.    FUNCTION
  1546.     This routine calculates the width of strings in
  1547.     terms of pixels according to the user interface
  1548.     font associated with the LayoutHandle.
  1549.  
  1550.     You can pass multi-line label texts to this routine,
  1551.     it will calculate the maximum length of the single
  1552.     lines. (V12)
  1553.  
  1554.    INPUTS
  1555.     Handle - Pointer to LayoutHandle structure.
  1556.  
  1557.    RESULT
  1558.     Width - Width of the text string in pixels.
  1559.  
  1560. gtlayout.library/LT_LayoutMenusA             gtlayout.library/LT_LayoutMenusA
  1561.  
  1562.    NAME
  1563.     LT_LayoutMenusA -- Create a menu according to a template.
  1564.  
  1565.    SYNOPSIS
  1566.     Menu = LT_LayoutMenusA(Handle,Template,Tags);
  1567.      D0                      A0     A1      A2
  1568.  
  1569.     struct Menu *LT_LayoutMenusA(LayoutHandle *,struct NewMenu *,
  1570.  
  1571.         struct TagItem *);
  1572.  
  1573.     Menu = LT_LayoutMenus(Handle,Template,...);
  1574.  
  1575.     struct Menu *LT_LayoutMenus(LayoutHandle *,struct NewMenu *,...);
  1576.  
  1577.    FUNCTION
  1578.     Unlike the corresponding routines in gadtools.library
  1579.     LT_LayoutMenusA() will both create and layout a menu.
  1580.     Also included is locale support.
  1581.  
  1582.    INPUTS
  1583.     Handle - Pointer to LayoutHandle structure.
  1584.  
  1585.     Template - Address of a ready-to-use NewMenu table to
  1586.         create the menu from.
  1587.  
  1588.     Tags - Tagitem list to control menu attributes
  1589.  
  1590.     Tags:
  1591.  
  1592.     LAMN_FirstLabel (LONG) - Locale ID of the first string to
  1593.         use as a menu title/item/subitem label. This tag
  1594.         works in conjunction with LA_LastLabel.
  1595.  
  1596.     LAMN_LastLabel (LONG) - Locale ID of the last string to
  1597.         use as a menu title/item/subitem label. This tag
  1598.         works in conjunction with LA_FirstLabel. The code
  1599.         will loop through FirstLabel..LastLabel and assign
  1600.         the corresponding locale text for each ID to the
  1601.         NewMenu.nm_Label entries. Labels which are already
  1602.         initialized with NM_BARLABEL are skipped.
  1603.  
  1604.     LAMN_LabelTable (LONG *) - Pointer to an array of IDs
  1605.         to use for building the menu labels. This requires
  1606.         that a locale hook is provided with the layout handle.
  1607.         The array is terminated by -1.
  1608.  
  1609.    RESULT
  1610.     Menu - Pointer to a Menu structure. You can free this
  1611.            using gadtools.library/FreeMenus().
  1612.  
  1613. gtlayout.library/LT_LevelWidth                 gtlayout.library/LT_LevelWidth
  1614.  
  1615.    NAME
  1616.     LT_LevelWidth -- Determine the maximum width of a SLIDER_KIND
  1617.                      level string.
  1618.  
  1619.    SYNOPSIS
  1620.     Index = LT_LevelWidth(Handle,FormatString,DispFunc,Min,Max,MaxWidth,
  1621.       D0                    A0        A1         A2     D0  D1    A3
  1622.  
  1623.                               MaxLen,FullCheck);
  1624.                                 A5      D2
  1625.  
  1626.     LONG LT_LevelWidth(LayoutHandle *,STRPTR,
  1627.                        LONG (*)(struct Gadget *,WORD),LONG,LONG,LONG *,
  1628.                        LONG *,BOOL);
  1629.  
  1630.    FUNCTION
  1631.     In order to make room for the level text displayed by a
  1632.     SLIDER_KIND object one needs to know how much space the
  1633.     longest level string will occupy. Otherwise, the level
  1634.     text may overwrite the gadget label text or the slider
  1635.     container. This routine will rattle through all possible
  1636.     slider settings (as given via the Min and the Max
  1637.     level values) and determine the longest label string
  1638.     according to the font used.
  1639.  
  1640.    INPUTS
  1641.     Handle - Pointer to a LayoutHandle structure, as returned by
  1642.         a call to LT_CreateHandleTags().
  1643.  
  1644.     FormatString - The sprintf() style formatting string to be used
  1645.         to format the slider level settings into text.
  1646.         This is the same string you would pass in via
  1647.         the GTSL_LevelFormat tag when creating the
  1648.         slider object.
  1649.         Default: "%lD" for systems which have locale.library
  1650.             installed, "%ld" otherwise.
  1651.  
  1652.     DispFunc - A pointer to the function to filter the slider level
  1653.         values. The result of this function will then be
  1654.         used to format a string into the slider level text.
  1655.         This is the same parameter you would pass in via
  1656.         the GTSL_DispFunc tag when creating the slider
  1657.         object.
  1658.  
  1659.             NOTE: the routine will be called with a NULL Gadget
  1660.                 parameter, make sure your code will handle
  1661.                 this nicely.
  1662.  
  1663.         Default: no display function
  1664.  
  1665.     Min - The smallest value the slider can be set to. This is
  1666.         same value you would pass in via GTSL_Min when creating
  1667.         the slider object.
  1668.  
  1669.     Max - The largest value the slider can be set to. This is
  1670.         same value you would pass in via GTSL_Max when creating
  1671.         the slider object.
  1672.  
  1673.     MaxWidth - Pointer to a place to store the width of the
  1674.         longest level string in pixels. If you pass
  1675.         in NULL instead of the address of a variable
  1676.         no harm will be done.
  1677.  
  1678.     MaxLen - Pointer to a place to store the length of the
  1679.         longest level string in characters. If you pass
  1680.         in NULL instead of the address of a variable
  1681.         no harm will be done.
  1682.  
  1683.     FullCheck - TRUE will cause the code to rattle through all
  1684.         possible slider settings, starting from the
  1685.         minimum value, ending at the maximum value.
  1686.         While this may be a good idea for a display
  1687.         function to map slider levels to text strings
  1688.         of varying length it might be a problem when
  1689.         it comes to display a range of numbers from
  1690.         1 to 40,000: the code will loop through
  1691.         40,000 iterations trying to find the longest
  1692.         string.
  1693.  
  1694.         FALSE will cause the code to calculate the
  1695.         longest level string based only on the
  1696.         minimum and the maximum value to check.
  1697.         While this is certainly a good a idea when
  1698.         it comes to display a range of numbers from
  1699.         1 to 40,000 as only two values will be
  1700.         checked the code may fail to produce
  1701.         accurate results for sliders using display
  1702.         functions mapping slider levels to strings.
  1703.  
  1704.    RESULT
  1705.     Index - The slider level which gives the longest
  1706.         level string.
  1707.  
  1708.    NOTES
  1709.     Some compilers have trouble passing parameters in A5. In such
  1710.     a case it is recommended to use gtlayout.library/LT_NewLevelWidth
  1711.     instead.
  1712.  
  1713.    SEE ALSO
  1714.     gtlayout.library/LT_NewLevelWidth
  1715.  
  1716. gtlayout.library/LT_LockWindow                 gtlayout.library/LT_LockWindow
  1717.  
  1718.    NAME
  1719.     LT_LockWindow -- Block user access to a window.
  1720.  
  1721.    SYNOPSIS
  1722.     LT_LockWindow(Window);
  1723.                     A0
  1724.  
  1725.     VOID LT_LockWindow(struct Window *);
  1726.  
  1727.    FUNCTION
  1728.     The window will get a wait mouse pointer attached and a blank
  1729.     Requester, preventing any user gadgets from getting used. The
  1730.     window minimum and maximum sizes are set to the current window
  1731.     size so the user will be unable to resize the window or click
  1732.     on the zoom gadget.
  1733.  
  1734.     This routine nests, multiple calls to LT_LockWindow() using the
  1735.     same window will increment a usage counter, so exactly the
  1736.     same number of calls to LT_UnlockWindow() will be required to
  1737.     unlock the window.
  1738.  
  1739.    INPUTS
  1740.     Window - Pointer to window structure; passign NULL is harmless.
  1741.  
  1742.    RESULT
  1743.     none
  1744.  
  1745.    NOTES
  1746.     Do not close the window you have locked unless all the
  1747.     outstanding locks are freed or memory will be lost which
  1748.     can never be reclaimed. Before you close the window,
  1749.     call gtlayout.library/LT_DeleteWindowLock.
  1750.  
  1751.    SEE ALSO
  1752.     gtlayout.library/LT_DeleteWindowLock
  1753.  
  1754. gtlayout.library/LT_MenuControlTagList gtlayout.library/LT_MenuControlTagList
  1755.  
  1756.    NAME
  1757.     LT_MenuControlTagList -- Manipulate menus, menu/submenu items (V11)
  1758.  
  1759.    SYNOPSIS
  1760.     LT_MenuControlTagList(Window,Menu,Tags)
  1761.                            A0   A1     A2
  1762.  
  1763.     VOID LT_MenuControlTagList(struct Window *,struct Menu *,struct TagItem *);
  1764.  
  1765.     VOID LT_MenuControlTags(struct Window *,struct Menu *,...);
  1766.  
  1767.    FUNCTION
  1768.     This routine provides a rather efficient way to set and to clear,
  1769.     to enable and to disable a number of menus, menu/submenu items
  1770.     all at once.
  1771.  
  1772.     In v18 this routine was modified to disconnect a menu strip
  1773.     from a window if it is about to change checkmark states. In
  1774.     earlier releases or if a single menu is attached to several
  1775.     windows it is recommended that you disconnect the menu from
  1776.     the windows it is attached to before you call this routine.
  1777.  
  1778.     As of v18 this routine is smart enough to handle menu
  1779.     mutual exclusion.
  1780.  
  1781.    INPUTS
  1782.     Window - Pointer to Window this menu is attached to. Starting with
  1783.              gtlayout.library v16 this parameter may be NULL.
  1784.  
  1785.     Menu - Pointer to Menu structure as returned by LT_NewMenuTagList.
  1786.  
  1787.     Tags - Pointer to a list of tagitem values, as found
  1788.            in gtlayout.h
  1789.  
  1790.  
  1791.     Tags:
  1792.  
  1793.     LAMN_ID (ULONG) - Unique ID of menu/menu item/submenu item to
  1794.         manipulate.
  1795.  
  1796.     LAMN_Checked (BOOL) - Set the checkmark state of the
  1797.         menu/submenu item.
  1798.  
  1799.     LAMN_Disabled (BOOL) - Set the availability state of the
  1800.         menu/menu item/submenu item.
  1801.  
  1802.     LAMN_FullMenuNum (UWORD) - Intuition menu number of
  1803.         menu/submenu item to manipulate. You would pass the
  1804.         result of the FULLMENUNUM() macro here for the
  1805.         item in question. (V30)
  1806.  
  1807.    RESULT
  1808.     none
  1809.  
  1810.    EXAMPLE
  1811.     The following tagitem list will clear the checkmark and
  1812.     disable the menu item associated with ID 5 and set the
  1813.     checkmark for the item associated with ID 6:
  1814.  
  1815.         LAMN_ID,         5,
  1816.           LAMN_Checked,  FALSE,
  1817.           LAMN_Disabled, TRUE,
  1818.         LAMN_ID,         6,
  1819.           LAMN_Checked,  TRUE,
  1820.         TAG_DONE
  1821.  
  1822.    BUGS
  1823.     In library versions up to and including v17.2 this routine
  1824.     is broken. It won't do any harm, it just doesn't do what you
  1825.     want it to do.
  1826.  
  1827.     Up to and including V42.1 the library could fail to find the
  1828.     correct menu items corresponding to the LAMN_ID given. This
  1829.     has been fixed in V43.1.
  1830.  
  1831.     Up to and including V43.1 trying to change the attributes
  1832.     of an item with LAMN_ID whose ID number could not be found
  1833.     could lead to a crash. This has been fixed in V43.2.
  1834.  
  1835.    SEE ALSO
  1836.     gtlayout.library/LT_NewMenuTagList
  1837.  
  1838. gtlayout.library/LT_NewA                             gtlayout.library/LT_NewA
  1839.  
  1840.    NAME
  1841.     LT_NewA -- Add a new object to the user interface tree.
  1842.  
  1843.    SYNOPSIS
  1844.     LT_NewA(Handle,Tags);
  1845.              A0    A1
  1846.  
  1847.     VOID LT_NewA(LayoutHandle *,struct TagItem *);
  1848.  
  1849.     LT_New(Handle,...);
  1850.  
  1851.     VOID LT_New(LayoutHandle *,...);
  1852.  
  1853.    FUNCTION
  1854.     LT_NewA() is the routine you use to build the user interface,
  1855.     you give layout directions, design groups, etc. and finally
  1856.     call LT_BuildA() to turn these specifications into a window.
  1857.  
  1858.    INPUTS
  1859.     Handle - Pointer to LayoutHandle structure.
  1860.  
  1861.  
  1862.     This routine will accept almost all create-time tag items
  1863.     gadtools.library/CreateGadget will handle. In addition to
  1864.     this there are a bunch of extra gadget objects and extra
  1865.     tag items supported:
  1866.  
  1867.     All object types:
  1868.  
  1869.         LA_Type (LONG) - Type of the object to create, must be
  1870.             one of the following:
  1871.  
  1872.                 TEXT_KIND
  1873.                 VERTICAL_KIND
  1874.                 HORIZONTAL_KIND
  1875.                 END_KIND
  1876.                 FRAME_KIND
  1877.                 BOX_KIND
  1878.                 SLIDER_KIND
  1879.                 LISTVIEW_KIND
  1880.                 INTEGER_KIND
  1881.                 STRING_KIND
  1882.                 PASSWORD_KIND
  1883.                 PALETTE_KIND
  1884.                 BUTTON_KIND
  1885.                 CHECKBOX_KIND
  1886.                 NUMBER_KIND
  1887.                 GAUGE_KIND
  1888.                 CYCLE_KIND
  1889.                 POPUP_KIND
  1890.                 TAB_KIND
  1891.                 MX_KIND
  1892.                 XBAR_KIND
  1893.                 YBAR_KIND
  1894.                 TAPEDECK_KIND
  1895.                 LEVEL_KIND
  1896.                 BOOPSI_KIND
  1897.                 BLANK_KIND (V36)
  1898.                 FRACTION_KIND (V38)
  1899.                 IMAGE_KIND (V41)
  1900.                 TEXTEDIT_KIND (V46)
  1901.  
  1902.         LA_LabelText (STRPTR) - The object label text to use.
  1903.  
  1904.         LA_LabelID (LONG) - The locale text ID of the string to
  1905.             use as the object label text.
  1906.  
  1907.                 NOTE: LT_NewA() will fail if you forget
  1908.                     to select a hook with LAHN_LocaleHook
  1909.                     at LT_CreateHandleTagList.
  1910.  
  1911.         LA_ID (LONG) - The gadget ID to use for this object.
  1912.  
  1913.                 NOTE: User ID values *MUST* be greater than 0,
  1914.                       negative values are reserved for internal
  1915.                       use.
  1916.  
  1917.         LA_Chars (LONG) - The width of this object measured in
  1918.             characters. If each character of the user interface
  1919.             font is 8 pixels wide an object with LA_Chars set to
  1920.             10 will usually be 80 pixels wide.
  1921.  
  1922.         LA_LabelChars (LONG) - This forces the internal gadget
  1923.             label width the layout engine calculates during the
  1924.             layout pass to a specific value. Note: this does
  1925.             not work well with all objects. (V9)
  1926.  
  1927.         LA_LabelPlace (LONG) - Where to place the gadget label.
  1928.             Not all objects will support all label positions:
  1929.  
  1930.                 PLACE_LEFT - Place label text left of object
  1931.                 PLACE_RIGHT - Place label text right of object
  1932.                 PLACE_ABOVE - Place label text above object
  1933.                 PLACE_IN - Place label text in object
  1934.                 PLACE_BELOW - Place label text below object
  1935.  
  1936.         LA_ExtraSpace (BOOL) - Add extra vertical/horizontal
  1937.             space before this object.
  1938.             Default: FALSE
  1939.  
  1940.         LA_ExtraFat (BOOL) - Make this object a bit larger
  1941.             than its usual size.
  1942.             Default: FALSE
  1943.  
  1944.         LA_NoKey (BOOL) - Don't let the user interface choose
  1945.             a keyboard shortcut for this object.
  1946.             Default: FALSE
  1947.  
  1948.         LA_HighLabel (BOOL) - Use highlight pen when rendering
  1949.             the gadget label text.
  1950.             Default: FALSE
  1951.  
  1952.         LA_BYTE (BYTE *) - Pointer to the variable that holds
  1953.             the "current value" of the object. The layout engine
  1954.             will retrieve this value initially during the creation
  1955.             of the object and maintain it during its lifespan.
  1956.             This means you do not need to worry about checking
  1957.             the state of the object, the user interface layout
  1958.             engine will do it for you.
  1959.  
  1960.         LA_UBYTE (UBYTE *) - Pointer to the variable that holds
  1961.             the "current value" of the object. The layout engine
  1962.             will retrieve this value initially during the creation
  1963.             of the object and maintain it during its lifespan.
  1964.             This means you do not need to worry about checking
  1965.             the state of the object, the user interface layout
  1966.             engine will do it for you.
  1967.  
  1968.         LA_WORD (WORD *) - Pointer to the variable that holds
  1969.             the "current value" of the object. The layout engine
  1970.             will retrieve this value initially during the creation
  1971.             of the object and maintain it during its lifespan.
  1972.             This means you do not need to worry about checking
  1973.             the state of the object, the user interface layout
  1974.             engine will do it for you.
  1975.  
  1976.         LA_UWORD (UWORD *) - Pointer to the variable that holds
  1977.             the "current value" of the object. The layout engine
  1978.             will retrieve this value initially during the creation
  1979.             of the object and maintain it during its lifespan.
  1980.             This means you do not need to worry about checking
  1981.             the state of the object, the user interface layout
  1982.             engine will do it for you.
  1983.  
  1984.         LA_BOOL (BOOL *) - Pointer to the variable that holds
  1985.             the "current value" of the object. The layout engine
  1986.             will retrieve this value initially during the creation
  1987.             of the object and maintain it during its lifespan.
  1988.             This means you do not need to worry about checking
  1989.             the state of the object, the user interface layout
  1990.             engine will do it for you.
  1991.  
  1992.         LA_LONG (LONG *) - Pointer to the variable that holds
  1993.             the "current value" of the object. The layout engine
  1994.             will retrieve this value initially during the creation
  1995.             of the object and maintain it during its lifespan.
  1996.             This means you do not need to worry about checking
  1997.             the state of the object, the user interface layout
  1998.             engine will do it for you.
  1999.  
  2000.         LA_ULONG (ULONG *) - Pointer to the variable that holds
  2001.             the "current value" of the object. The layout engine
  2002.             will retrieve this value initially during the creation
  2003.             of the object and maintain it during its lifespan.
  2004.             This means you do not need to worry about checking
  2005.             the state of the object, the user interface layout
  2006.             engine will do it for you.
  2007.  
  2008.         LA_STRPTR (STRPTR) - Pointer to the variable that holds
  2009.             the "current value" of the object. The layout engine
  2010.             will retrieve this value initially during the creation
  2011.             of the object and maintain it during its lifespan.
  2012.             This means you do not need to worry about checking
  2013.             the state of the object, the user interface layout
  2014.             engine will do it for you.
  2015.  
  2016.         LA_FRACTION (FRACTION *) - Pointer to the variable that holds
  2017.             the "current value" of the object. The layout engine
  2018.             will retrieve this value initially during the creation
  2019.             of the object and maintain it during its lifespan.
  2020.             This means you do not need to worry about checking
  2021.             the state of the object, the user interface layout
  2022.             engine will do it for you.
  2023.  
  2024.  
  2025.         BLANK_KIND (transparent placeholder):
  2026.  
  2027.             (requires gtlayout.library V36 or higher)
  2028.  
  2029.             No tags are defined for this type of object.
  2030.  
  2031.  
  2032.         BOOPSI_KIND:
  2033.  
  2034.             (requires gtlayout.library V10 or higher)
  2035.  
  2036.             LABO_TagCurrent (Tag) - The Tag ID that represents the
  2037.                 current object value. For PROPGCLASS this would be
  2038.                 PGA_Top.
  2039.  
  2040.             LABO_TagTextAttr (Tag) - The Tag ID that represents the
  2041.                 TextAttr value the object expects. For gadgets this
  2042.                 would be GA_TextAttr.
  2043.  
  2044.             LABO_TagDrawInfo (Tag) - The Tag ID that represents the
  2045.                 DrawInfo value the object expects.
  2046.  
  2047.             LABO_TagLink (Tag) - The Tag ID that represents a pointer
  2048.                 to a different object the object expects. For the
  2049.                 colorwheel.gadget this would be WHEEL_GradientSlider.
  2050.  
  2051.             LABO_TagScreen (Tag) - The Tag ID that represents the
  2052.                 screen the object expects. For the colorwheel.gadget
  2053.                 this would be WHEEL_Screen.
  2054.  
  2055.             LABO_Link (LONG) - The ID of the object this object should
  2056.                 be linked to. This will be resolved later when gadgets
  2057.                 are created.
  2058.  
  2059.                     NOTE: Forward references are not resolved, only
  2060.                         backward references are allowed. This means that
  2061.                         if you wish to link object A to object B,
  2062.                         object A must be created before object B
  2063.                         is created.
  2064.  
  2065.             LABO_ClassInstance (Class *) - This is the first parameter
  2066.                 you would pass to NewObjectA().
  2067.  
  2068.                     NOTE: Only classes derived from gadgetclass and
  2069.                       gadgetclass itself may be used.
  2070.  
  2071.             LABO_ClassName (STRPTR) - This is the second parameter you would
  2072.                 pass to NewObject().
  2073.  
  2074.                     NOTE: Only classes derived from gadgetclass and
  2075.                         gadgetclass itself may be used.
  2076.  
  2077.             LABO_ClassLibraryName (STRPTR) - This tag is particularly useful
  2078.                 for gadget class implementations wrapped into libraries, such as
  2079.                 colorwheel.gadget. When opened, they make the classes they
  2080.                 represent publicly available so subsequent calls to
  2081.                 NewObject(NULL,<Classname>,...) can be made. The
  2082.                 LABO_ClassLibraryName tag will cause gtlayout.library to open
  2083.                 the class library before any calls to NewObject() are made.
  2084.  
  2085.                     NOTE: Only classes derived from gadgetclass and
  2086.                         gadgetclass itself may be used.
  2087.  
  2088.                         The LABO_ClassLibraryName tag requires that you
  2089.                         specify the class name with the LABO_ClassName. It is
  2090.                         not enough to just use the LABO_ClassLibraryName tag.
  2091.  
  2092.             LABO_ExactWidth (WORD) - This is the exact width of the object to
  2093.                 use. This effectively overrides whatever you specified using
  2094.                 the LA_Chars tag and keeps gtlayout.library from shrinking and
  2095.                 expanding the object as needed.
  2096.  
  2097.             LABO_ExactHeight (WORD) - This is the exact height of the object to
  2098.                 use. This effectively overrides whatever you specified using
  2099.                 the LA_Lines tag and keeps gtlayout.library from shrinking and
  2100.                 expanding the object as needed.
  2101.  
  2102.             LABO_RelFontHeight (WORD) - This tag affects the height of the
  2103.                 object; when specified, it is derived from the user interface
  2104.                 font height plus the value given with LABO_RelFontHeight.
  2105.  
  2106.             LABO_FullWidth (BOOL) - Use this tag if you wish the object to
  2107.                 cover the entire width of the group it resides within.
  2108.  
  2109.             LABO_FullHeight (BOOL) - Use this tag if you wish the object to
  2110.                 cover the entire height of the group it resides within.
  2111.  
  2112.             LABO_ActivateHook (struct Hook *) - Hook to invoke when the
  2113.                 layout engine decides that this particular object should
  2114.                 be activated. The hook is called with the following
  2115.                 parameters:
  2116.  
  2117.                 Success = ActivateFunc(struct Hook *Hook,LayoutHandle *Handle,
  2118.                   D0                                 A0                  A2
  2119.  
  2120.                              Object *object)
  2121.                                        A1
  2122.  
  2123.                 The object pointer actually refers to the instance of the
  2124.                 BOOPSI object created. Return FALSE if your object could not
  2125.                 be activated, TRUE if it worked. If you return TRUE, no special
  2126.                 keyboard event will be generated. (V13)
  2127.  
  2128.             NOTE: All tags passed to LT_New() for BOOPSI_KIND objects are
  2129.                 passed through to NewObjectA() later. The library makes
  2130.                 a copy of the tag item list, so all data valid in the
  2131.                 scope when LT_New() is called must also be valid later
  2132.                 when LT_Build() is invoked.
  2133.  
  2134.                 The gadget label is *NOT* passed through to the object,
  2135.                 it effectively receives the label a plain gadtools object
  2136.                 would receive, similar to what happens to FRAME_KIND
  2137.                 objects and the like.
  2138.  
  2139.  
  2140.         BOX_KIND (multiline text display):
  2141.  
  2142.             LABX_Chars (LONG) - The width of this object in
  2143.                 characters. The layout routine will try to make
  2144.                 sure that the given number of characters will
  2145.                 fit into a single line of text in this box.
  2146.                 This may be a problem with proportional spaced
  2147.                 fonts.
  2148.                Default: 10
  2149.  
  2150.             LABX_Labels (STRPTR *) - The label texts to display
  2151.                 on the right hand side of the box. Terminate
  2152.                 this array with NULL.
  2153.  
  2154.             LABX_Lines (STRPTR *) - The text to display in the
  2155.                 box. Terminate this array with NULL.
  2156.  
  2157.             LABX_Rows (LONG) - The height of this object in
  2158.                 characters.
  2159.  
  2160.             LABX_AlignText (LONG) - Controls how text is aligned
  2161.                 in box lines:
  2162.  
  2163.                     ALIGNTEXT_LEFT - Align text to the left edge
  2164.                     ALIGNTEXT_CENTERED - Centre the text
  2165.                     ALIGNTEXT_RIGHT - Align text to the right edge
  2166.                     ALIGNTEXT_PAD - Pad text lines
  2167.  
  2168.                 Default: ALIGNTEXT_LEFT
  2169.  
  2170.             LABX_DrawBox (BOOL) - Draw a recessed bevel box
  2171.                 around the text box.
  2172.                 Default: FALSE
  2173.  
  2174.             LABX_FirstLabel (LONG) - Locale string ID of the first
  2175.                 text to use as a box label. Works in conjunction
  2176.                 with LABX_LastLabel.
  2177.  
  2178.             LABX_LastLabel (LONG) - Locale string ID of the last
  2179.                 text to use as a box label. Works in conjunction
  2180.                 with LABX_FirstLabel. When building the interface the
  2181.                 code will loop from FirstLabel..LastLabel, look
  2182.                 up the corresponding locale strings and use the
  2183.                 data to make up the label text to appear at the
  2184.                 right hand side of the box.
  2185.  
  2186.             LABX_LabelTable (LONG *) - Pointer to an array of IDs
  2187.                 to use for building the box labels. This requires
  2188.                 that a locale hook is provided with the layout handle.
  2189.                 The array is terminated by -1.
  2190.  
  2191.             LABX_ReserveSpace (BOOL) - Allocate extra memory to hold
  2192.                 the contents of the lines displayed. This avoids nasty
  2193.                 side-effects when refreshing this object.
  2194.                 Default: FALSE
  2195.  
  2196.             LABX_FirstLine (LONG) - Locale string ID of the first
  2197.                 text to print inside the box. Works in conjunction
  2198.                 with LABX_LastLine. (V26)
  2199.  
  2200.             LABX_LastLine (LONG) - Locale string ID of the last
  2201.                 text to print inside the box. Works in conjunction
  2202.                 with LABX_FirstLine. (V26)
  2203.  
  2204.             LABX_LineTable (LONG *) - Pointer to an array of IDs
  2205.                 to use for building the box contents lines. This requires
  2206.                 that a locale hook is provided with the layout handle.
  2207.                 The array is terminated by -1. (V28)
  2208.  
  2209.             LABX_Line (STRPTR) - Line to display in the box, may
  2210.                 contain '\n' line break characters, the layout engine
  2211.                 will chop the single line into single consecutive lines
  2212.                 following the '\n' chars. (V31)
  2213.  
  2214.             LABX_LineID (LONG) - Locale ID of line text to display in the
  2215.                 box, may contain '\n' line break characters, the layout
  2216.                 engine will chop the single line into single consecutive lines
  2217.                 following the '\n' chars. (V31)
  2218.  
  2219.             LABX_TextPen (WORD) - Box text colour to use. (V40)
  2220.  
  2221.             LABX_BackPen (WORD) - Box text background colour to use. (V40)
  2222.  
  2223.             LABX_Spacing (UWORD) - Request that additional pixels should
  2224.                 separate lines of text. (V41)
  2225.                 Default: 0
  2226.  
  2227.  
  2228.         BUTTON_KIND:
  2229.  
  2230.             LA_Label (STRPTR)
  2231.             LA_LabelID (LONG) - These two define the button label, i.e.
  2232.                 the text that is printed within the button box. Optionally,
  2233.                 this text may include newline characters ("\n") which will
  2234.                 cause the button text to be broken into several lines.
  2235.                 This particular feature requires gtlayout.library v12 or
  2236.                 higher. Single line label have always been supported.
  2237.  
  2238.             LABT_ReturnKey (BOOL) - Let the user operate this
  2239.                 button by pressing the return key, making it the
  2240.                 so-called default button, or default choice. The
  2241.                 button select box will appear slightly bolder than
  2242.                 normal buttons are.
  2243.  
  2244.                     NOTE: there can be only one single button per
  2245.                         window to sport this feature.
  2246.  
  2247.                 Default: FALSE
  2248.  
  2249.             LABT_EscKey (BOOL) - Let the user operate this
  2250.                 button by pressing the Escape key.
  2251.  
  2252.                     NOTE: there can be only one single button per
  2253.                         window to use this feature.
  2254.  
  2255.                 Default: FALSE
  2256.  
  2257.             LABT_ExtraFat (BOOL) - Make this button a bit
  2258.                 larger than usual.
  2259.                 Default: FALSE
  2260.  
  2261.             LABT_Lines (STRPTR *) - Use the given string array
  2262.                 to create a multiline gadget label. Terminate the
  2263.                 array with a NULL. (V12)
  2264.  
  2265.             LABT_FirstLine (LONG) - Locale ID of first label line. (V12)
  2266.  
  2267.             LABT_LastLine (LONG) - Locale ID of last label line. (V12)
  2268.  
  2269.             LABT_DefaultCorrection (BOOL) - Make the button slightly
  2270.                 wider and taller so its size matches the default
  2271.                 button. (V21)
  2272.  
  2273.             LABT_Smaller (BOOL) - Make this button a little smaller
  2274.                 than usual. (V21)
  2275.  
  2276.  
  2277.         CYCLE_KIND:
  2278.  
  2279.             LACY_FirstLabel (LONG) - Locale string ID of the first
  2280.                 text to use as a label. Works in conjunction
  2281.                 with LACY_LastLabel.
  2282.  
  2283.             LACY_LastLabel (LONG) - Locale string ID of the last
  2284.                 text to use as a label. Works in conjunction
  2285.                 with LACY_FirstLabel. When building the interface the
  2286.                 code will loop from FirstLabel..LastLabel, look
  2287.                 up the corresponding locale strings and use the
  2288.                 data to make up the label text.
  2289.  
  2290.             LACY_LabelTable (LONG *) - Pointer to an array of IDs
  2291.                 to use for building the cycle labels. This requires
  2292.                 that a locale hook is provided with the layout handle.
  2293.                 The array is terminated by -1.
  2294.  
  2295.             LACY_TabKey (BOOL) - Connect this object to the tabulator
  2296.                 key. Press [Tab] to cycle to the next entry, [Shift][Tab]
  2297.                 to cycle to the previous entry. (V9)
  2298.  
  2299.                     NOTE: there can be only one single button per
  2300.                         window to use this feature.
  2301.  
  2302.                 Default: FALSE
  2303.  
  2304.             LACY_AutoPageID (LONG) - ID of paged GROUP_KIND object
  2305.                 which will be set to the gadget's current setting.
  2306.                 If this tag is set, you will hear no events from this
  2307.                 object any more. (V7)
  2308.  
  2309.                     NOTE: Listen to IDCMP_CLOSEWINDOW events
  2310.                         which may be generated if the layout
  2311.                         engine runs out of memory when rebuilding
  2312.                         the user interface.
  2313.  
  2314.  
  2315.         FRACTION_KIND:
  2316.  
  2317.             (requires gtlayout.library V38 or higher)
  2318.  
  2319.             This is a special kind of STRING_KIND which comes with a
  2320.             special input filter. It will allow only for floating point
  2321.             numbers to be entered, i.e. numbers (`0'-`9') and one
  2322.             decimal point (`.' or whatever your current locale uses
  2323.             as the decimal point character). What you will receive as
  2324.             user input text will be in the following format:
  2325.  
  2326.                 (0|#[0-9]).(0|#[0-9])
  2327.  
  2328.             Or in other words, text like this will be returned:
  2329.  
  2330.                 0.0
  2331.                 7.0
  2332.                 0.9
  2333.                 146654.0
  2334.  
  2335.             NOTE: While this object type did exist in earlier library
  2336.                   versions support for it was removed in V33. It was
  2337.                   eventually reintroduced with the functionality described
  2338.                   above in V38.
  2339.  
  2340.             LAFR_IncrementerHook (struct Hook *) - Hook to invoke when the
  2341.                 incrementer arrows are used. The hook function will receive
  2342.                 three parameters and has to return a result code:
  2343.  
  2344.                     a0 - (struct Hook *)  Pointer to this hook
  2345.                     a2 - (STRPTR) Current value of this object
  2346.                     a1 - (LONG) Either INCREMENTERMSG_Decrement or
  2347.                                 INCREMENTERMSG_Increment
  2348.  
  2349.                 If the hook function modifies the current value it must
  2350.                 return TRUE, otherwise FALSE must be returned. If you return
  2351.                 TRUE, then the library will update the object. (V40)
  2352.  
  2353.             This object type accepts all the GTST_#? tag items.
  2354.  
  2355.  
  2356.         FRAME_KIND (fixed size general purpose display,
  2357.             you may render into it):
  2358.  
  2359.             LAFR_InnerWidth (LONG) - Inner width of the
  2360.                 display box.
  2361.  
  2362.             LAFR_InnerHeight (LONG) - Inner height of the
  2363.                 display box.
  2364.  
  2365.             LAFR_DrawBox (BOOL) - Draw a recessed bevel box
  2366.                 around the display box.
  2367.                 Default: FALSE
  2368.  
  2369.             LAFR_RefreshHook (struct Hook *) - Hook to call
  2370.                 when refreshing/redrawing this object. See
  2371.                 gtlayout.h for more information. (V9)
  2372.  
  2373.             LAFR_GenerateEvents (BOOL) - If TRUE, clicking
  2374.                 inside the FRAME_KIND object will generate
  2375.                 IDCMP_GADGETUP/IDCMP_GADGETDOWN events. If
  2376.                 you wish to know where the click occured,
  2377.                 make a copy of the Window->MouseX/Y entries
  2378.                 before you call LT_HandleInput()/LT_GetIMsg(). (V28)
  2379.                 Default: FALSE
  2380.  
  2381.             LAFR_ResizeX (BOOL) - Makes this frame resizable
  2382.                 in the horizontal direction, attaches a sizing
  2383.                 gadget to the window to open and handles window
  2384.                 resize operations automatically. (V44)
  2385.  
  2386.                     NOTE: there can be only one single object
  2387.                         per window to sport this feature. This
  2388.                         means that you won't be able to have
  2389.                         both a resizable listview and a resizable
  2390.                         frame in the same window.
  2391.  
  2392.                         Also listen to IDCMP_CLOSEWINDOW events
  2393.                         which may be generated if the layout
  2394.                         engine runs out of memory when rebuilding
  2395.                         the user interface.
  2396.  
  2397.                 Default: FALSE
  2398.  
  2399.             LAFR_ResizeY (BOOL) - Makes this frame resizable
  2400.                 in the vertical direction, attaches a sizing
  2401.                 gadget to the window to open and handles window
  2402.                 resize operations automatically. (V44)
  2403.  
  2404.                     NOTE: there can be only one single object
  2405.                         per window to sport this feature. This
  2406.                         means that you won't be able to have
  2407.                         both a resizable listview and a resizable
  2408.                         frame in the same window.
  2409.  
  2410.                         Also listen to IDCMP_CLOSEWINDOW events
  2411.                         which may be generated if the layout
  2412.                         engine runs out of memory when rebuilding
  2413.                         the user interface.
  2414.  
  2415.                 Default: FALSE
  2416.  
  2417.         GAUGE_KIND (general purpose progress report display):
  2418.  
  2419.             LAGA_Percent (LONG) - Indicator position, can range
  2420.                 from 0..100.
  2421.                 Default: 0
  2422.  
  2423.             LAGA_InfoLength (LONG) - Maximum number of characters
  2424.                 to reserve for text printed in the gauge display.
  2425.                 Default: 0
  2426.  
  2427.             LAGA_InfoText (STRPTR) - Text to print in the gauge
  2428.                 display.
  2429.  
  2430.             LAGA_Tenth (BOOL) - Instead of a continuously growing
  2431.                 bar you will get a set of exactly ten blocks,
  2432.                 each separated by a hairline. (V19)
  2433.                 Default: FALSE
  2434.  
  2435.                LAGA_NoTicks (BOOL) - If TRUE suppresses drawing the
  2436.                    ticks below the gauge box.
  2437.                    Default: FALSE
  2438.  
  2439.  
  2440.         IMAGE_KIND (display area for Image or BitMap data):
  2441.  
  2442.             (requires gtlayout.library V41 or higher)
  2443.  
  2444.             LAIM_Image (struct Image *) - Image to draw in this
  2445.                 place. When the user interface is built, it will
  2446.                 be drawn using intuition.library/DrawImage().
  2447.  
  2448.             LAIM_BitMap (struct BitMap *) - You can supply a
  2449.                 BitMap instead of an Image which will be drawn
  2450.                 using either graphics.library/BltBitMapRastPort()
  2451.                 or graphics.library/BltMaskBitMapRastPort() if
  2452.                 a mask is provided.
  2453.  
  2454.             LAIM_BitMapLeft (UWORD) - Left corner of the image data
  2455.                 to blit into the window (the second parameter for
  2456.                 BltBitMapRastPort()).
  2457.  
  2458.             LAIM_BitMapTop (UWORD) - Top corner of the image data
  2459.                 to blit into the window (the third parameter for
  2460.                 BltBitMapRastPort()).
  2461.  
  2462.             LAIM_BitMapWidth (UWORD) - Width of the bitmap area to
  2463.                 blit into the window.
  2464.  
  2465.             LAIM_BitMapHeight (UWORD) - Height of the bitmap area to
  2466.                 blit into the window.
  2467.  
  2468.             LAIM_BitMapMask (PLANEPTR) - Pointer to a bit plane mask
  2469.                 to blit the image bitmap through. Must follow the
  2470.                 rules documented for for BltMaskBitMapRastPort().
  2471.                 The blit operation will use the minterm for
  2472.                 transparency.
  2473.  
  2474.  
  2475.         INTEGER_KIND:
  2476.  
  2477.             LAIN_LastGadget (BOOL) - Pressing return with this
  2478.                 gadget active will stop activating the next
  2479.                 following string gadget type if TRUE is passed.
  2480.                 Default: FALSE
  2481.  
  2482.             LAIN_Min (LONG) - Minimum accepted numeric value.
  2483.                 Default: -2147483647
  2484.  
  2485.             LAIN_Max (LONG) - Maximum accepted numeric value.
  2486.                 Default:  2147483647
  2487.  
  2488.             LAIN_UseIncrementers (BOOL) - Use TRUE to add incrementer
  2489.                 arrow buttons to the right of the numeric entry field.
  2490.                 These buttons will let you cycle through a set of
  2491.                 numbers to be displayed in the numeric entry field.
  2492.                 Default: FALSE
  2493.  
  2494.             LAIN_HistoryLines (LONG) - Number of numbers entered to
  2495.                 keep as a backlog.
  2496.                 Default: 0
  2497.  
  2498.             LAIN_HistoryHook (struct Hook *) - Hook code to call when
  2499.                 entering a number into the backlog. See gtlayout.h for
  2500.                 more information.
  2501.                 Default: NULL
  2502.  
  2503.             LAIN_IncrementerHook (struct Hook *) - Hook code to call
  2504.                 when cycling through numeric values. See gtlayout.h for
  2505.                 more information.
  2506.                 Default: NULL
  2507.  
  2508.             LAIN_Activate (BOOL) - When the window opens, make this
  2509.                 gadget the active one. (V21)
  2510.  
  2511.                     NOTE: There can be only one gadget of this type
  2512.                         per window.
  2513.  
  2514.                 Default: FALSE
  2515.  
  2516.  
  2517.         LEVEL_KIND:
  2518.  
  2519.             All tags are supported which SLIDER_KIND supports.
  2520.             The gadget level display however, can only be aligned
  2521.             to the left border.
  2522.  
  2523.             LAVL_Freedom (WORD) - Selects the orientation of the
  2524.                 slider body; can be either FREEHORIZ or FREEVERT. (V41)
  2525.  
  2526.                 Default: FREEHORIZ
  2527.  
  2528.             LAVL_Ticks (WORD) - Selects if and where to place tick
  2529.                 marks next to the slider body. Can be one of the
  2530.                 the following: TICKS_None (no ticks), TICKS_Left
  2531.                 (place ticks left of the body), TICKS_Above (place
  2532.                 ticks above the body), TICKS_Both (place ticks on
  2533.                 both sides of the body). (V41)
  2534.  
  2535.                 Default: TICKS_None
  2536.  
  2537.             LAVL_NumTicks (LONG) - Number of tick marks to draw. (V41)
  2538.  
  2539.             LAVL_Lines (LONG) - Height of the slider, if FREEVERT. (V41)
  2540.  
  2541.  
  2542.         LISTVIEW_KIND:
  2543.  
  2544.             LALV_ExtraLabels (STRPTR *) - Place extra line
  2545.                 labels at the right of the box. Terminate
  2546.                 this array with NULL.
  2547.  
  2548.             LALV_Labels (STRPTR *) - The labels to display
  2549.                 inside the box, you can pass this array of
  2550.                 strings in rather than passing an initialized
  2551.                 List of text via GTLV_Labels. Terminate
  2552.                 this array with NULL.
  2553.  
  2554.             LALV_CursorKey (BOOL) - Let the user operate this
  2555.                 listview using the cursor keys.
  2556.  
  2557.                     NOTE: there can be only one single listview
  2558.                         per window to sport this feature.
  2559.  
  2560.                 Default: FALSE
  2561.  
  2562.             LALV_Lines (LONG) - The number of text lines this
  2563.                 listview is to display.
  2564.  
  2565.             LALV_Link (LONG) - The Gadget ID of a string gadget
  2566.                 to attach to this listview.
  2567.  
  2568.                     NOTE: you need to
  2569.                         add the Gadget in question before you add the
  2570.                         listview to refer to it or the layout routine
  2571.                         will get confused.
  2572.  
  2573.                 Passing the value NIL_LINK will create a listview
  2574.                 which displays the currently selected item, otherwise
  2575.                 you will get a read-only list.
  2576.  
  2577.             LALV_FirstLabel (LONG) - Locale string ID of the first
  2578.                 text to use as a list label. Works in conjunction
  2579.                 with LALV_LastLabel.
  2580.  
  2581.             LALV_LastLabel (LONG) - Locale string ID of the last
  2582.                 text to use as a list label. Works in conjunction
  2583.                 with LALV_FirstLabel. When building the interface the
  2584.                 code will loop from FirstLabel..LastLabel, look
  2585.                 up the corresponding locale strings and use the
  2586.                 data to make up the label text to appear in the
  2587.                 list.
  2588.  
  2589.             LALV_LabelTable (LONG *) - Pointer to an array of IDs
  2590.                 to use for building the listview contents. This requires
  2591.                 that a locale hook is provided with the layout handle.
  2592.                 The array is terminated by -1.
  2593.  
  2594.             LALV_MaxGrowX (LONG) - Maximum width of this object
  2595.                 measured in characters. When the first layout pass
  2596.                 is finished and there is still enough space left
  2597.                 to make the listview wider, the width is increased
  2598.                 until it hits the limit specified using this tag.
  2599.  
  2600.                     NOTE: there can be only one single listview
  2601.                         per window to sport this feature.
  2602.  
  2603.                 Default: 0
  2604.  
  2605.             LALV_MaxGrowY (LONG) - Maximum height of this object
  2606.                 measured in lines. When the first layout pass is
  2607.                 finished and there is still enough space left to
  2608.                 make the listview higher, the height is increased
  2609.                 until it hits the limit specified using this tag.
  2610.  
  2611.                     NOTE: there can be only one single listview
  2612.                         per window to sport this feature.
  2613.  
  2614.                 Default: 0
  2615.  
  2616.             LALV_ResizeX (BOOL) - Makes this listview resizable
  2617.                 in the horizontal direction, attaches a sizing
  2618.                 gadget to the window to open and handles window
  2619.                 resize operations automatically. (V9)
  2620.  
  2621.                     NOTE: there can be only one single object
  2622.                         per window to sport this feature. This
  2623.                         means that you won't be able to have
  2624.                         both a resizable listview and a resizable
  2625.                         frame in the same window.
  2626.  
  2627.                         Also listen to IDCMP_CLOSEWINDOW events
  2628.                         which may be generated if the layout
  2629.                         engine runs out of memory when rebuilding
  2630.                         the user interface.
  2631.  
  2632.                 Default: FALSE
  2633.  
  2634.             LALV_ResizeY (BOOL) - Makes this listview resizable
  2635.                 in the vertical direction, attaches a sizing
  2636.                 gadget to the window to open and handles window
  2637.                 resize operations automatically. (V9)
  2638.  
  2639.                     NOTE: there can be only one single object
  2640.                         per window to sport this feature. This
  2641.                         means that you won't be able to have
  2642.                         both a resizable listview and a resizable
  2643.                         frame in the same window.
  2644.  
  2645.                         Also listen to IDCMP_CLOSEWINDOW events
  2646.                         which may be generated if the layout
  2647.                         engine runs out of memory when rebuilding
  2648.                         the user interface.
  2649.  
  2650.                 Default: FALSE
  2651.  
  2652.             LALV_MinChars (WORD) - Minimum width for this
  2653.                 object, measured in characters. Used in
  2654.                 conjunction with LALV_ResizeX. (V9)
  2655.  
  2656.             LALV_MinLines (WORD) - Minimum height for this
  2657.                 object, measured in lines. Used in
  2658.                 conjunction with LALV_ResizeY. (V9)
  2659.  
  2660.             LALV_LockSize (BOOL) - After doing the initial layout
  2661.                 for this object, do not adapt its size again during
  2662.                 subsequent layouts. This is particularly useful if
  2663.                 you have a LISTVIEW_KIND object in a paged group
  2664.                 and keep adding new entries to the list. You need
  2665.                 to specify an object width using LA_Chars, otherwise
  2666.                 the layout engine may make it not wide enough to
  2667.                 display any entries. (V8)
  2668.  
  2669.             LALV_FlushLabelLeft (BOOL) - For a gadget label placed
  2670.                 above the listview align the text to the left edge
  2671.                 of the view. (V9)
  2672.  
  2673.             LALV_TextAttr (struct TextAttr *) - You can specify a
  2674.                 fixed-width font to be used for the list display.
  2675.                 The TextAttr (or TTextAttr) you provide must be ready
  2676.                 to go so the layout code can open the font later.
  2677.  
  2678.                 To get the current system default font, which is
  2679.                 guaranteed to be fixed-width, pass ~0 instead of a
  2680.                 pointer to a TextAttr structure. (V10)
  2681.  
  2682.                     NOTE: The font *MUST* be fixed-width or the layout
  2683.                         will fail.
  2684.  
  2685.                          Choose your font in such a way that it matches
  2686.                          in width and height with the other probably
  2687.                          proportional-spaced user interface font.
  2688.  
  2689.                          If the layout engine decides to step down in
  2690.                          font size, all LISTVIEW_KIND objects which were
  2691.                          configured to use a special fixed-width font
  2692.                          will `forget' about it. This won't matter much
  2693.                          as the fonts the engine chooses will always be
  2694.                          fixed-width anyway.
  2695.  
  2696.             LALV_AutoPageID (LONG) - ID of paged GROUP_KIND object
  2697.                 which will be set to the gadget's current setting.
  2698.                 If this tag is set, you will hear no events from this
  2699.                 object any more. (V23)
  2700.  
  2701.                     NOTE: Listen to IDCMP_CLOSEWINDOW events
  2702.                         which may be generated if the layout
  2703.                         engine runs out of memory when rebuilding
  2704.                         the user interface.
  2705.  
  2706.             LALV_Selected (LONG) - In this context, this tag is an
  2707.                 alias for GTLV_Selected. See
  2708.                 gtlayout.library/LT_SetAttributes for more information
  2709.                 on how the meaning of this tag differs from this (V34).
  2710.  
  2711.  
  2712.         MX_KIND:
  2713.  
  2714.             LAMX_FirstLabel (LONG) - Locale string ID of the first
  2715.                 text to use as a label. Works in conjunction
  2716.                 with LAMX_LastLabel.
  2717.  
  2718.             LAMX_LastLabel (LONG) - Locale string ID of the last
  2719.                 text to use as a label. Works in conjunction
  2720.                 with LAMX_FirstLabel. When building the interface the
  2721.                 code will loop from FirstLabel..LastLabel, look
  2722.                 up the corresponding locale strings and use the
  2723.                 data to make up the label text.
  2724.  
  2725.             LAMX_LabelTable (LONG *) - Pointer to an array of IDs
  2726.                 to use for building the radio labels. This requires
  2727.                 that a locale hook is provided with the layout handle.
  2728.                 The array is terminated by -1.
  2729.  
  2730.             LAMX_TabKey (BOOL) - Connect this object to the tabulator
  2731.                 key. Press [Tab] to cycle to the next entry, [Shift][Tab]
  2732.                 to cycle to the previous entry. (V9)
  2733.  
  2734.                     NOTE: there can be only one single button per
  2735.                         window to use this feature.
  2736.  
  2737.                 Default: FALSE
  2738.  
  2739.             LAMX_AutoPageID (LONG) - ID of paged GROUP_KIND object
  2740.                 which will be set to the gadget's current setting.
  2741.                 If this tag is set, you will hear no events from this
  2742.                 object any more. (V7)
  2743.  
  2744.                     NOTE: Listen to IDCMP_CLOSEWINDOW events
  2745.                         which may be generated if the layout
  2746.                         engine runs out of memory when rebuilding
  2747.                         the user interface.
  2748.  
  2749.  
  2750.         PALETTE_KIND:
  2751.  
  2752.             LAPA_SmallPalette (BOOL) - Make the palette display
  2753.                 a bit smaller than usual.
  2754.                 Default: FALSE
  2755.  
  2756.             LAPA_Lines (LONG) - Number of lines the palette
  2757.                 display should cover.
  2758.                 Default: No preference
  2759.  
  2760.             LAPA_UsePicker (BOOL) - This tag effectively changes the
  2761.                 gadget type. Instead of a list of colours to pick from
  2762.                 the user will see a rectangle filled in the selected
  2763.                 colour with a picker button next to it. This gadget
  2764.                 will generate IDCMP_IDCMPUPDATE events when the picker
  2765.                 button is pressed. (V10)
  2766.  
  2767.  
  2768.         PASSWORD_KIND (string gadget type which does not
  2769.             display its contents):
  2770.  
  2771.             LAPW_LastGadget (BOOL) - Pressing return with this
  2772.                 gadget active will stop activating the next
  2773.                 following string gadget type if TRUE is passed.
  2774.                 Default: FALSE
  2775.  
  2776.             LAPW_HistoryLines (LONG) - Number of lines to keep as
  2777.                 a backlog.
  2778.                 Default: 0
  2779.  
  2780.             LAPW_HistoryHook (struct Hook *) - Hook code to call
  2781.                 when entering a line into the backlog. See gtlayout.h
  2782.                 for more information.
  2783.                 Default: NULL
  2784.  
  2785.             LAPW_Activate (BOOL) - When the window opens, make this
  2786.                 gadget the active one. (V21)
  2787.  
  2788.                     NOTE: There can be only one gadget of this type
  2789.                         per window.
  2790.  
  2791.                 Default: FALSE
  2792.  
  2793.             This object type accepts all the GTST_#? tag items.
  2794.  
  2795.  
  2796.         POPUP_KIND:
  2797.  
  2798.             (This features requires gtlayout.library v22 or higher
  2799.              and Kickstart 3.0 or higher).
  2800.  
  2801.             LAPU_FirstLabel (LONG) - Locale string ID of the first
  2802.                 text to use as a label. Works in conjunction
  2803.                 with LAPU_LastLabel.
  2804.  
  2805.             LAPU_LastLabel (LONG) - Locale string ID of the last
  2806.                 text to use as a label. Works in conjunction
  2807.                 with LAPU_FirstLabel. When building the interface the
  2808.                 code will loop from FirstLabel..LastLabel, look
  2809.                 up the corresponding locale strings and use the
  2810.                 data to make up the label text.
  2811.  
  2812.             LAPU_LabelTable (LONG *) - Pointer to an array of IDs
  2813.                 to use for building the cycle labels. This requires
  2814.                 that a locale hook is provided with the layout handle.
  2815.                 The array is terminated by -1.
  2816.  
  2817.             LAPU_TabKey (BOOL) - Connect this object to the tabulator
  2818.                 key. Press [Tab] to cycle to the next entry, [Shift][Tab]
  2819.                 to cycle to the previous entry.
  2820.  
  2821.                     NOTE: there can be only one single button per
  2822.                         window to use this feature.
  2823.  
  2824.                 Default: FALSE
  2825.  
  2826.             LAPU_AutoPageID (LONG) - ID of paged GROUP_KIND object
  2827.                 which will be set to the gadget's current setting.
  2828.                 If this tag is set, you will hear no events from this
  2829.                 object any more.
  2830.  
  2831.                     NOTE: Listen to IDCMP_CLOSEWINDOW events
  2832.                         which may be generated if the layout
  2833.                         engine runs out of memory when rebuilding
  2834.                         the user interface.
  2835.  
  2836.             LAPU_CentreActive (BOOL) - If TRUE, the popup menu will
  2837.                 appear with the currently active entry centred below
  2838.                 the mouse pointer. (V31)
  2839.  
  2840.             LAPU_Labels (STRPTR *) - Pointer to NULL-terminated array
  2841.                 of strings that are the choices offered.
  2842.  
  2843.  
  2844.         SCROLLER_KIND:
  2845.  
  2846.             LASC_Thin (BOOL) - Make the scroller a bit thinner
  2847.                 than usual.
  2848.                 Default: FALSE
  2849.  
  2850.             GA_RelVerify (BOOL) - Hear every IDCMP_GADGETUP
  2851.                 event from scroller.
  2852.                 Default: TRUE
  2853.  
  2854.                         NOTE: This is different from what
  2855.                          gadtools.library uses.
  2856.  
  2857.             GA_Immediate (BOOL) - Hear every IDCMP_GADGETDOWN
  2858.                 event from scroller
  2859.                 Default: TRUE
  2860.  
  2861.                         NOTE: This is different from what
  2862.                          gadtools.library uses.
  2863.  
  2864.  
  2865.         SLIDER_KIND:
  2866.  
  2867.             LASL_FullCheck: TRUE will cause the code to rattle
  2868.                 through all possible slider settings, starting
  2869.                 from the minimum value, ending at the maximum value.
  2870.                 While this may be a good idea for a display
  2871.                 function to map slider levels to text strings
  2872.                 of varying length it might be a problem when
  2873.                 it comes to display a range of numbers from
  2874.                 1 to 40,000: the code will loop through
  2875.                 40,000 iterations trying to find the longest
  2876.                 string.
  2877.  
  2878.                 FALSE will cause the code to calculate the
  2879.                 longest level string based only on the
  2880.                 minimum and the maximum value to check.
  2881.                 While this is certainly a good a idea when
  2882.                 it comes to display a range of numbers from
  2883.                 1 to 40,000 as only two values will be
  2884.                 checked the code may fail to produce
  2885.                 accurate results for sliders using display
  2886.                 functions mapping slider levels to strings.
  2887.  
  2888.                 Default: TRUE
  2889.  
  2890.  
  2891.         STRING_KIND:
  2892.  
  2893.             LAST_LastGadget (BOOL) - Pressing return with this
  2894.                 gadget active will stop activating the next
  2895.                 following string gadget type if TRUE is passed.
  2896.                 Default: FALSE
  2897.  
  2898.             LAST_Link (LONG) - Gadget ID of the listview to attach
  2899.                 this string gadget to.
  2900.  
  2901.                     NOTE: you need to add the string gadget before
  2902.                         you add the listview to refer to it or the
  2903.                         layout routine will get confused.
  2904.  
  2905.             LAST_Picker (BOOL) - Attach a `select' button to the
  2906.                 right hand side of the string gadget.
  2907.                 Default: FALSE
  2908.  
  2909.             LAST_HistoryLines (LONG) - Number of lines to keep as
  2910.                 a backlog.
  2911.                 Default: 0
  2912.  
  2913.             LAST_HistoryHook (struct Hook *) - Hook code to call
  2914.                 when entering a line into the backlog. See gtlayout.h
  2915.                 for more information.
  2916.                 Default: NULL
  2917.  
  2918.             LAST_Activate (BOOL) - When the window opens, make this
  2919.                 gadget the active one. (V21)
  2920.  
  2921.                     NOTE: There can be only one gadget of this type
  2922.                         per window.
  2923.  
  2924.                 Default: FALSE
  2925.  
  2926.  
  2927.         TAB_KIND:
  2928.  
  2929.             (This features requires gtlayout.library v24 or higher)
  2930.  
  2931.             LATB_FirstLabel (LONG) - Locale string ID of the first
  2932.                 text to use as a label. Works in conjunction
  2933.                 with LATB_LastLabel.
  2934.  
  2935.             LATB_LastLabel (LONG) - Locale string ID of the last
  2936.                 text to use as a label. Works in conjunction
  2937.                 with LATB_FirstLabel. When building the interface the
  2938.                 code will loop from FirstLabel..LastLabel, look
  2939.                 up the corresponding locale strings and use the
  2940.                 data to make up the label text.
  2941.  
  2942.             LATB_LabelTable (LONG *) - Pointer to an array of IDs
  2943.                 to use for building the cycle labels. This requires
  2944.                 that a locale hook is provided with the layout handle.
  2945.                 The array is terminated by -1.
  2946.  
  2947.             LATB_TabKey (BOOL) - Connect this object to the tabulator
  2948.                 key. Press [Tab] to cycle to the next entry, [Shift][Tab]
  2949.                 to cycle to the previous entry.
  2950.  
  2951.                     NOTE: there can be only one single button per
  2952.                         window to use this feature.
  2953.  
  2954.                 Default: FALSE
  2955.  
  2956.             LATB_AutoPageID (LONG) - ID of paged GROUP_KIND object
  2957.                 which will be set to the gadget's current setting.
  2958.                 If this tag is set, you will hear no events from this
  2959.                 object any more.
  2960.  
  2961.                     NOTE: Listen to IDCMP_CLOSEWINDOW events
  2962.                         which may be generated if the layout
  2963.                         engine runs out of memory when rebuilding
  2964.                         the user interface.
  2965.  
  2966.             LATB_FullSize (BOOL) - By default a TAB_KIND object
  2967.                 covers the entire width of the group it sits in.
  2968.                 With LATB_FullSize set to true it will cover the
  2969.                 width of the entire Window.
  2970.  
  2971.                 Default: FALSE
  2972.  
  2973.             LATB_Labels (STRPTR *) - Pointer to NULL-terminated array
  2974.                 of strings that are the choices offered.
  2975.  
  2976.  
  2977.         TAPEDECK_KIND:
  2978.  
  2979.             LATD_ButtonType (LONG) - Select the image to display
  2980.                 in the button, must be one of the following:
  2981.  
  2982.                     TDBT_BACKWARD
  2983.                         "<<" Symbol
  2984.  
  2985.                     TDBT_FORWARD
  2986.                         ">>" Symbol
  2987.  
  2988.                     TDBT_PREVIOUS
  2989.                         "|<" Symbol
  2990.  
  2991.                     TDBT_NEXT
  2992.                         ">|" Symbol
  2993.  
  2994.                     TDBT_STOP
  2995.                         Stop symbol (filled square)
  2996.  
  2997.                     TDBT_PAUSE
  2998.                         "||" pause symbol (broken square)
  2999.  
  3000.                     TDBT_RECORD
  3001.                         Record symbol (filled circle)
  3002.  
  3003.                     TDBT_REWIND
  3004.                         "<" symbol
  3005.  
  3006.                     TDBT_EJECT
  3007.                         Eject symbol (broken upward pointing arrow)
  3008.  
  3009.                     TDBT_PLAY
  3010.                         ">" symbol
  3011.  
  3012.             LATD_Toggle (BOOL) - Make this object a toggle-select
  3013.                 button.
  3014.                 Default: FALSE
  3015.  
  3016.             LATD_Pressed (BOOL) - Make this button appear to be
  3017.                 pressed.
  3018.  
  3019.                     NOTE: requires "LATD_Toggle,TRUE" attribute.
  3020.  
  3021.                 Default: FALSE
  3022.  
  3023.             LATD_Smaller (BOOL) - Make this button a bit smaller
  3024.                 than usual.
  3025.                 Default: FALSE
  3026.  
  3027.             LATD_Tick (BOOL) - Hear IDCMP_GADGETUP events while the
  3028.                 buttons is being pressed; the IntuiMessage->Code entry
  3029.                 will be 0 while the button is being pressed, and
  3030.                 will be 1 as soon as the button is released. (V12)
  3031.  
  3032.                 Default: FALSE
  3033.  
  3034.  
  3035.         TEXT_KIND:
  3036.  
  3037.             LATX_Picker (BOOL) - Attach a `select' button to the
  3038.                 right hand side of the text display.
  3039.                 Default: FALSE
  3040.  
  3041.             LATX_LockSize (BOOL) - After doing the initial layout
  3042.                 for this object, do not adapt its size again during
  3043.                 subsequent layouts. This is particularly useful if
  3044.                 you have a TEXT_KIND object in a paged group
  3045.                 and update its contents later. You need
  3046.                 to specify an object width using LA_Chars, otherwise
  3047.                 the layout engine may make it not wide enough to
  3048.                 display any text. (V15)
  3049.  
  3050.         TEXTEDIT_KIND (multiline string gadget):
  3051.  
  3052.             (requires gtlayout.library V46 or higher)
  3053.  
  3054.             LATE_String (STRPTR) - Pointer to the string to be
  3055.                 edited.
  3056.  
  3057.             LATE_CursorPosition (ULONG) - Index number of the
  3058.                 character the cursor should be positioned on.
  3059.                 For example, in the string "abcd", the index
  3060.                 number 0 would put the cursor on the "a" and
  3061.                 the number 3 would put it on the "d".
  3062.  
  3063.             LATE_Chars (LONG) - Width of the text editing area
  3064.                 in characters.
  3065.  
  3066.             LATE_Lines (LONG) - Height of the text editing area
  3067.                 in lines.
  3068.  
  3069.             LATE_TextAttr (struct TextAttr *) - You can specify the
  3070.                 font to be used for the editing area.
  3071.                 The TextAttr (or TTextAttr) you provide must be ready
  3072.                 to go so the layout code can open the font later.
  3073.  
  3074.                 To get the current system default font, which is
  3075.                 guaranteed to be fixed-width, pass ~0 instead of a
  3076.                 pointer to a TextAttr structure.
  3077.  
  3078.         VERTICAL_KIND (group to align objects vertically):
  3079.         HORIZONTAL_KIND (group to align objects horizontally):
  3080.  
  3081.             LAGR_Spread (BOOL) - Place all objects in this
  3082.                 group with roughly the same amount of space
  3083.                 between them.
  3084.                 Default: FALSE
  3085.  
  3086.             LAGR_SameSize (BOOL) - Make all objects in this
  3087.                 group the same size (for vertical groups:
  3088.                 the same height, for horizontal groups:
  3089.                 the same width).
  3090.                 Default: FALSE
  3091.  
  3092.             LAGR_LastAttributes (BOOL) - Try to copy the
  3093.                 size of the previous group for this new
  3094.                 group. May not work if this group turns
  3095.                 out to be larger than the previous group.
  3096.                 Default: FALSE
  3097.  
  3098.             LAGR_ActivePage (LONG) - Organize all child
  3099.                 groups as pages which can be flipped through
  3100.                 using LT_SetAttributes(). You need to
  3101.                 specify the number of the first page to
  3102.                 display, starting from 0.
  3103.  
  3104.                     NOTE: Specifying this tag actually enables
  3105.                         the paging feature. If you omit this
  3106.                         tag calls to flip to a specific
  3107.                         page will fail.
  3108.  
  3109.                 Default: No paging
  3110.  
  3111.             LAGR_Frame (BOOL) - Draw a recessed frame around
  3112.                 this group, even if there is no group label. (V7)
  3113.  
  3114.             LAGR_IndentX (BOOL) - Add extra horizontal indentation
  3115.                 for this group. (V10)
  3116.  
  3117.             LAGR_IndentY (BOOL) - Add extra vertical indentation
  3118.                 for this group. (V10)
  3119.  
  3120.             LAGR_NoIndent (BOOL) - Inhibit automatic size adjustion
  3121.                 and centring of this group if it is smaller than
  3122.                 the neighbouring groups. (V21)
  3123.  
  3124.             LAGR_SameWidth (WORD) - During the final layout pass,
  3125.                 make this group the same width as the group which
  3126.                 uses the given ID. Not implemented yet. (V25)
  3127.  
  3128.             LAGR_SameHeight (WORD) - During the final layout pass,
  3129.                 make this group the same height as the group which
  3130.                 uses the given ID. Not implemented yet. (V25)
  3131.  
  3132.             LAGR_FrameGroup (UWORD) - Surround this group with a
  3133.                 frame. Must be one of FRAMETYPE_Label or FRAMETYPE_Tab.
  3134.                 FRAMETYPE_Label works like "LAGR_Frame,TRUE," while
  3135.                 FRAMETYPE_Tab is for use with a TAB_KIND object you
  3136.                 must put directly on top of this group or the group
  3137.                 will look a little silly. (V38)
  3138.  
  3139.                 Default: FRAMETYPE_None
  3140.  
  3141.  
  3142.         XBAR_KIND (horizontal separator bar):
  3143.  
  3144.             LAXB_FullSize (BOOL) - Make this separator bar span
  3145.                 the entire window width.
  3146.  
  3147.  
  3148.         YBAR_KIND (vertical separator bar):
  3149.  
  3150.             No tags are defined for this type of object.
  3151.  
  3152.  
  3153.    RESULT
  3154.     none
  3155.  
  3156.    BUGS
  3157.     Up to v25 the SCROLLER_KIND object did not support GA_Immediate
  3158.     or GA_RelVerify. The space for the variables was there, but the
  3159.     code was missing.
  3160.  
  3161.     POPUP_KIND objects don't work well in simple refresh windows,
  3162.     as refresh events can get lost. Use a smart refresh window
  3163.     instead or call gadtools.library/LT_CatchUpRefresh() regularly.
  3164.  
  3165.    SEE ALSO
  3166.     gadtools.library/CreateGadgetA
  3167.  
  3168. gtlayout.library/LT_NewLevelWidth           gtlayout.library/LT_NewLevelWidth
  3169.  
  3170.    NAME
  3171.     LT_NewLevelWidth -- Determine the maximum width of a SLIDER_KIND
  3172.                         level string. (V14)
  3173.  
  3174.    SYNOPSIS
  3175.     Index = LT_LevelWidth(Handle,FormatString,DispFunc,Min,Max,MaxWidth,
  3176.       D0                    A0        A1         A2     D0  D1    A3
  3177.  
  3178.                               MaxLen,FullCheck);
  3179.                                 D3      D2
  3180.  
  3181.     LONG LT_LevelWidth(LayoutHandle *,STRPTR,
  3182.                        LONG (*)(struct Gadget *,WORD),LONG,LONG,LONG *,
  3183.                        LONG *,BOOL);
  3184.  
  3185.    FUNCTION
  3186.     In order to make room for the level text displayed by a
  3187.     SLIDER_KIND object one needs to know how much space the
  3188.     longest level string will occupy. Otherwise, the level
  3189.     text may overwrite the gadget label text or the slider
  3190.     container. This routine will rattle through all possible
  3191.     slider settings (as given via the Min and the Max
  3192.     level values) and determine the longest label string
  3193.     according to the font used.
  3194.  
  3195.    INPUTS
  3196.     Handle - Pointer to a LayoutHandle structure, as returned by
  3197.         a call to LT_CreateHandleTags().
  3198.  
  3199.     FormatString - The sprintf() style formatting string to be used
  3200.         to format the slider level settings into text.
  3201.         This is the same string you would pass in via
  3202.         the GTSL_LevelFormat tag when creating the
  3203.         slider object.
  3204.         Default: "%lD" for systems which have locale.library
  3205.             installed, "%ld" otherwise.
  3206.  
  3207.     DispFunc - A pointer to the function to filter the slider level
  3208.         values. The result of this function will then be
  3209.         used to format a string into the slider level text.
  3210.         This is the same parameter you would pass in via
  3211.         the GTSL_DispFunc tag when creating the slider
  3212.         object.
  3213.  
  3214.         NOTE: the routine will be called with a NULL Gadget
  3215.             parameter, make sure your code will handle
  3216.             this nicely.
  3217.  
  3218.         Default: no display function
  3219.  
  3220.     Min - The smallest value the slider can be set to. This is
  3221.         same value you would pass in via GTSL_Min when creating
  3222.         the slider object.
  3223.  
  3224.     Max - The largest value the slider can be set to. This is
  3225.         same value you would pass in via GTSL_Max when creating
  3226.         the slider object.
  3227.  
  3228.     MaxWidth - Pointer to a place to store the width of the
  3229.         longest level string in pixels. If you pass
  3230.         in NULL instead of the address of a variable
  3231.         no harm will be done.
  3232.  
  3233.     MaxLen - Pointer to a place to store the length of the
  3234.         longest level string in characters. If you pass
  3235.         in NULL instead of the address of a variable
  3236.         no harm will be done.
  3237.  
  3238.     FullCheck - TRUE will cause the code to rattle through all
  3239.         possible slider settings, starting from the
  3240.         minimum value, ending at the maximum value.
  3241.         While this may be a good idea for a display
  3242.         function to map slider levels to text strings
  3243.         of varying length it might be a problem when
  3244.         it comes to display a range of numbers from
  3245.         1 to 40,000: the code will loop through
  3246.         40,000 iterations trying to find the longest
  3247.         string.
  3248.  
  3249.         FALSE will cause the code to calculate the
  3250.         longest level string based only on the
  3251.         minimum and the maximum value to check.
  3252.         While this is certainly a good a idea when
  3253.         it comes to display a range of numbers from
  3254.         1 to 40,000 as only two values will be
  3255.         checked the code may fail to produce
  3256.         accurate results for sliders using display
  3257.         functions mapping slider levels to strings.
  3258.  
  3259.    RESULT
  3260.     Index - The slider level which gives the longest
  3261.         level string.
  3262.  
  3263.    NOTES
  3264.     This function does exactly what gtlayout.library/LT_LevelWidth
  3265.     does, but uses a slightly different register ordering. Namely,
  3266.     the MaxLen pointer is passed in D3 instead of A5.
  3267.  
  3268.    SEE ALSO
  3269.     gtlayout.library/LT_LevelWidth
  3270.  
  3271. gtlayout.library/LT_NewMenuTagList         gtlayout.library/LT_NewMenuTagList
  3272.  
  3273.    NAME
  3274.     LT_NewMenuTagList -- Allocate and layout menu items (V11)
  3275.  
  3276.    SYNOPSIS
  3277.     Menu = LT_NewMenuTagList(Tags)
  3278.      D0                       A0
  3279.  
  3280.     struct Menu *LT_NewMenuTagList(struct TagItem *);
  3281.  
  3282.     struct Menu *LT_NewMenuTags(...);
  3283.  
  3284.    FUNCTION
  3285.     Allocates Menus and MenuItems similar to LT_LayoutMenus().
  3286.  
  3287.     As of v18 this routine will validate menu mutual exclusion
  3288.     information.
  3289.  
  3290.    INPUTS
  3291.     Tags - Pointer to a list of tagitem values, as found
  3292.         in gtlayout.h
  3293.  
  3294.  
  3295.     Valid tags include:
  3296.  
  3297.     LAMN_Screen (struct Screen *) - Pointer to the Screen
  3298.         the menu is to appear upon. This tag is mandatory,
  3299.         unless the LAMN_LayoutHandle tag is used.
  3300.  
  3301.     LAMN_TextAttr (struct TextAttr *) - Pointer to the
  3302.         TextAttr to use for the menu layout. If this tag
  3303.         is omitted the Screen->Font will be used.
  3304.  
  3305.     LAMN_Error (LONG *) - Pointer to variable to receive
  3306.         an error in case of failure.
  3307.  
  3308.     LAMN_AmigaGlyph (struct Image *) - Pointer to Image to
  3309.         use as the Amiga glyph in menus. Will be ignored if
  3310.         NULL.
  3311.  
  3312.         NOTE: Ignored by intuition.library v37 and below.
  3313.  
  3314.     LAMN_CheckmarkGlyph (struct Image *) - Pointer to Image to
  3315.         use as the checkmark glyph in menus. Will be ignored
  3316.         if NULL.
  3317.  
  3318.     LAMN_LayoutHandle (LayoutHandle *) - Pointer to a valid
  3319.         LayoutHandle as created by LT_CreateHandle. This tag
  3320.         provides all the information the single tags
  3321.         LAMN_Screen..LAMN_CheckmarkGlyph would otherwise
  3322.         need to provide.
  3323.  
  3324.     LAMN_TitleText (STRPTR) - Name of new menu to create.
  3325.         You may precede the name with the keyboard shortcut
  3326.         to assign to this menu item as follows:
  3327.  
  3328.            A\0Save as...
  3329.  
  3330.         This will create a menu item using the shortcut "A"
  3331.         and the title "Save as...".
  3332.  
  3333.     LAMN_TitleID (LONG) - Locale ID corresponding to the
  3334.         name of the new menu to create.
  3335.         You may precede the name with the keyboard shortcut
  3336.         to assign to this menu item as follows:
  3337.  
  3338.            A\0Save as...
  3339.  
  3340.         This will create a menu item using the shortcut "A"
  3341.         and the title "Save as...".
  3342.  
  3343.     LAMN_ItemText (STRPTR) - Name of new menu item to create.
  3344.         You may precede the name with the keyboard shortcut
  3345.         to assign to this menu item as follows:
  3346.  
  3347.            A\0Save as...
  3348.  
  3349.         This will create a menu item using the shortcut "A"
  3350.         and the title "Save as...".
  3351.  
  3352.     LAMN_ItemID (LONG) - Locale ID corresponding to the
  3353.         name of the new menu item to create.
  3354.         You may precede the name with the keyboard shortcut
  3355.         to assign to this menu item as follows:
  3356.  
  3357.            A\0Save as...
  3358.  
  3359.         This will create a menu item using the shortcut "A"
  3360.         and the title "Save as...".
  3361.  
  3362.     LAMN_SubText (STRPTR) - Name of new submenu item to create.
  3363.         You may precede the name with the keyboard shortcut
  3364.         to assign to this menu item as follows:
  3365.  
  3366.            A\0Save as...
  3367.  
  3368.         This will create a menu item using the shortcut "A"
  3369.         and the title "Save as...".
  3370.  
  3371.     LAMN_SubID (LONG) - Locale ID corresponding to the
  3372.         name of the new submenu item to create.
  3373.         You may precede the name with the keyboard shortcut
  3374.         to assign to this menu item as follows:
  3375.  
  3376.            A\0Save as...
  3377.  
  3378.         This will create a menu item using the shortcut "A"
  3379.         and the title "Save as...".
  3380.  
  3381.     LAMN_KeyText (STRPTR) - Pointer to the string whose first
  3382.         character will be used as the keyboard shortcut for
  3383.         this menu/submenu item.
  3384.  
  3385.     LAMN_KeyID (LONG) - Locale ID corresponding to the string whose
  3386.         first character will be used as the keyboard shortcut for
  3387.         this menu/submenu item.
  3388.  
  3389.     LAMN_CommandText (STRPTR) - Pointer to the string which
  3390.         will be used as the keyboard shortcut for this
  3391.         menu/submenu item.
  3392.  
  3393.     LAMN_CommandID (LONG) - Locale ID corresponding to the string
  3394.         which will be used as the keyboard shortcut for
  3395.         this menu/submenu item.
  3396.  
  3397.     LAMN_MutualExclude (ULONG) - Mutual exclusion information for
  3398.         this menu/submenu item.
  3399.  
  3400.     LAMN_UserData (APTR) - User data information for this
  3401.         menu/menu item/submenu item.
  3402.  
  3403.     LAMN_Disabled (BOOL) - Controls whether this
  3404.         menu/menu item/submenu item should be disabled.
  3405.  
  3406.     LAMN_CheckIt (BOOL) - Controls whether this menu/submenu item
  3407.         should be prepared to hold a checkmark.
  3408.  
  3409.             NOTE: This does not set the checkmark, use LAMN_Checked
  3410.                 for this purpose.
  3411.  
  3412.     LAMN_Checked (BOOL) - Controls whether this menu/submenu item
  3413.         should be marked with a checkmark. This tag implies
  3414.         "LAMN_CheckIt,TRUE".
  3415.  
  3416.     LAMN_Toggle (BOOL) - Controls whether this menu/submenu item
  3417.         should be prepared to hold a checkmark the user is to
  3418.         toggle on demand. This tag implies "LAMN_CheckIt,TRUE".
  3419.  
  3420.             NOTE: this does not set the checkmark, use LAMN_Checked
  3421.                 for this purpose.
  3422.  
  3423.     LAMN_Code (UWORD) - Raw key code to associate with this
  3424.         menu/submenu item. To find out if a rawkey event
  3425.         corresponds to this menu item use LT_FindMenuCommand.
  3426.  
  3427.     LAMN_Qualifier (ULONG) - Key qualifier to associate
  3428.         with this menu/submenu item.
  3429.  
  3430.             NOTE: the comparison does not distinguish between
  3431.                 the left and right shift/caps/alt qualifier keys.
  3432.  
  3433.     LAMN_ID (ULONG) - Unique ID to associate with this
  3434.         menu/menu item/submenu item. You can use this
  3435.         later to look up data using LT_GetMenuItem, etc.
  3436.  
  3437.     LAMN_ExtraSpace (UWORD) - Number of pixels to put between
  3438.         neighbouring menu titles. (V18)
  3439.         Default: 0 pixels.
  3440.  
  3441.    RESULT
  3442.     Menu - Pointer to Menu structure, ready to pass to
  3443.            SetMenuStrip(), NULL on failure.
  3444.  
  3445.    EXAMPLE
  3446.     The following tagitem list:
  3447.  
  3448.         LAMN_TitleText,     "Project"
  3449.          LAMN_ItemText,     "New",
  3450.           LAMN_KeyText,     "N",
  3451.          LAMN_ItemText,     "Open...",
  3452.           LAMN_KeyText,     "O",
  3453.          LAMN_ItemText,     NM_BARLABEL,
  3454.          LAMN_ItemText,     "Save",
  3455.           LAMN_KeyText,     "S",
  3456.          LAMN_ItemText,     "A\0Save As...",
  3457.          LAMN_ItemText,     NM_BARLABEL,
  3458.          LAMN_ItemText,     "Print...",
  3459.           LAMN_KeyText,     "P",
  3460.          LAMN_ItemText,     NM_BARLABEL,
  3461.          LAMN_ItemText,     "Help...",
  3462.           LAMN_CommandText, "[Help]",
  3463.          LAMN_ItemText,     NM_BARLABEL,
  3464.          LAMN_ItemText,     "Quit...",
  3465.           LAMN_KeyText,     "Q",
  3466.         TAG_DONE
  3467.  
  3468.     Will create the following menu:
  3469.  
  3470.     +-------+
  3471.     |Project|
  3472.     +-------+------+
  3473.     |New         aN|
  3474.     |Open...     aO|
  3475.     |~~~~~~~~~~~~~~|
  3476.     |Save        aS|
  3477.     |Save As...  aA|
  3478.     |~~~~~~~~~~~~~~|
  3479.     |Print...    aP|
  3480.     |~~~~~~~~~~~~~~|
  3481.     |Help... [Help]|
  3482.     |~~~~~~~~~~~~~~|
  3483.     |Quit...     aQ|
  3484.     +--------------+
  3485.  
  3486.    NOTES
  3487.     You may freely add, remove, spindle & mutilate the contents of the
  3488.     menu strip created, just don't trash or disconnect the base menu
  3489.     entry this routine creates as all menu memory tracking data is
  3490.     connected to it.
  3491.  
  3492.    SEE ALSO
  3493.     gtlayout.library/LT_DisposeMenu
  3494.     gtlayout.library/LT_FindCommandItem
  3495.     gtlayout.library/LT_GetMenuItem
  3496.     gtlayout.library/LT_LayoutMenuA
  3497.     gtlayout.library/LT_MenuControlTagList
  3498.     gtlayout.library/LT_NewMenuTemplate
  3499.     intuition.library/SetMenuStrip
  3500.  
  3501. gtlayout.library/LT_NewMenuTemplate       gtlayout.library/LT_NewMenuTemplate
  3502.  
  3503.    NAME
  3504.     LT_NewMenuTemplate -- Allocate and layout menu items (V11)
  3505.  
  3506.    SYNOPSIS
  3507.     Menu = LT_NewMenuTemplate(Screen,TextAttr,AmigaGlyph,CheckmarkGlyph,
  3508.      D0                         A0      A1        A2           A3
  3509.  
  3510.                               Error,MenuTemplate);
  3511.                                 D0      D1
  3512.  
  3513.     struct Menu *LT_NewMenuTemplate(struct Screen *,struct TextAttr *,
  3514.                                     struct Image *,struct Image *,
  3515.                                     LONG *,struct NewMenu *);
  3516.  
  3517.    FUNCTION
  3518.     Allocates Menus and MenuItems similar to LT_LayoutMenus().
  3519.  
  3520.     As of v18 this routine will validate menu mutual exclusion
  3521.     information.
  3522.  
  3523.    INPUTS
  3524.     Screen - Pointer to the screen the menu will appear on. This
  3525.         parameter is required and must not be omitted.
  3526.  
  3527.     TextAttr - Pointer to the TextAttr that should be used to
  3528.         layout the menus. If this parameter is omitted,
  3529.         Screen->Font will be used instead.
  3530.  
  3531.     AmigaGlyph - Pointer to the Image to use as the Amiga glyph.
  3532.         This parameter may be omitted.
  3533.  
  3534.             NOTE: Ignored by intuition.library v37 and below.
  3535.  
  3536.     CheckmarkGlyph - Pointer to the Image to use as the checkmark
  3537.         glyph. This parameter may be omitted.
  3538.  
  3539.     Error - Pointer to receive error code in case the menu
  3540.         creation or layout process fails. This parameter
  3541.         may be omitted.
  3542.  
  3543.     MenuTemplate - Pointer to a series of NewMenu structures,
  3544.         just as you would pass to
  3545.         gtlayout.library/LT_LayoutMenuA.
  3546.  
  3547.    RESULT
  3548.     Menu - Pointer to Menu structure, ready to pass to
  3549.         SetMenuStrip(), NULL on failure.
  3550.  
  3551.    NOTES
  3552.     The menu created by this function cannot be used with the
  3553.     routines LT_MenuControlTagList, LT_FindMenuCommand and
  3554.     LT_GetMenuItem.
  3555.  
  3556.     You may freely add, remove, spindle & mutilate the contents of the
  3557.     menu strip created, just don't trash or disconnect the base menu
  3558.     entry this routine creates as all menu memory tracking data is
  3559.     connected with it.
  3560.  
  3561.    SEE ALSO
  3562.     gtlayout.library/LT_DisposeMenu
  3563.     gtlayout.library/LT_LayoutMenuA
  3564.     gtlayout.library/LT_NewMenuTagList
  3565.     intuition.library/SetMenuStrip
  3566.  
  3567. gtlayout.library/LT_PressButton               gtlayout.library/LT_PressButton
  3568.  
  3569.    NAME
  3570.     LT_PressButton -- Highlight a button so it looks as if the user
  3571.                       has selected it.
  3572.  
  3573.    SYNOPSIS
  3574.     Success = LT_PressButton(Handle,ID);
  3575.        D0                       A0  D0
  3576.  
  3577.     BOOL LT_PressButton(LayoutHandle *,LONG);
  3578.  
  3579.         NOTE: The return value did not exist until V39!
  3580.  
  3581.    FUNCTION
  3582.     You can provide visual feedback for BUTTON_KIND objects by calling
  3583.     this routine. They will briefly appear to be selected and then
  3584.     fall back to their original states.
  3585.  
  3586.     As of V39 and beyond this function will indicate whether the button
  3587.     could be highlighted or not.
  3588.  
  3589.    INPUTS
  3590.     Handle - Pointer to LayoutHandle structure
  3591.  
  3592.     ID - ID of button object to highlight
  3593.  
  3594.    RESULT
  3595.     Success (V39) - TRUE if button could be highlighted, FALSE otherwise.
  3596.  
  3597. gtlayout.library/LT_RebuildTagList         gtlayout.library/LT_RebuildTagList
  3598.  
  3599.    NAME
  3600.     LT_RebuildTagList -- Rebuild the user interface after modifying it.
  3601.  
  3602.    SYNOPSIS
  3603.     Success = LT_RebuildTagList(Handle,Clear,TagList);
  3604.        D0                         A0    D0     A1
  3605.  
  3606.     BOOL LT_RebuildTagList(LayoutHandle *,BOOL,struct TagItem *);
  3607.  
  3608.     Success = LT_RebuildTags(Handle,Clear,...);
  3609.  
  3610.     BOOL LT_RebuildTags(LayoutHandle *,BOOL,...);
  3611.  
  3612.    FUNCTION
  3613.     Certain aspects of the user interface can be changed at run time,
  3614.     such as button labels. This routine will let you rebuild the interface
  3615.     based upon the data supplied at creation time and your subsequent
  3616.     changes. Before you make any vital changes, it is recommended to
  3617.     lock the window using LT_LockWindow() in order to avoid clashes
  3618.     with the Intuition and GadTools subsystems.
  3619.  
  3620.    INPUTS
  3621.     Handle - Pointer to LayoutHandle structure.
  3622.  
  3623.     Clear - Pass in TRUE if you wish to have the window contents
  3624.         cleared before they are rebuild. This will introduce
  3625.         some visual hashing.
  3626.  
  3627.     TagList - Attributes controlling the layout process.
  3628.  
  3629.  
  3630.     Valid tags include:
  3631.  
  3632.     LAWN_Bounds (struct IBox *) - Boundaries in which the window
  3633.         should be centered.
  3634.  
  3635.     LAWN_ExtraWidth (LONG) - Extra space to add to the window
  3636.         width.
  3637.  
  3638.     LAWN_ExtraHeight (LONG) - Extra height to add to the window
  3639.         height.
  3640.  
  3641.    RESULT
  3642.     Success - TRUE indicates that the interface was rebuilt,
  3643.         FALSE indicates trouble; it is recommended to
  3644.         call LT_DeleteHandle() on your LayoutHandle as
  3645.         soon as possible as the previous operation may
  3646.         have left the user interface in an inoperable
  3647.         state.
  3648.  
  3649. gtlayout.library/LT_Redraw                         gtlayout.library/LT_Redraw
  3650.  
  3651.    NAME
  3652.     LT_Redraw -- Redraw a single object (V47).
  3653.  
  3654.    SYNOPSIS
  3655.     LT_Redraw(handle,id)
  3656.                A0    D0
  3657.  
  3658.     VOID LT_Redraw(LayoutHandle * handle,LONG id);
  3659.  
  3660.    FUNCTION
  3661.     This function is for redrawing a single object, as contained in
  3662.     a window. This is not always necessary as the library will handle
  3663.     display updates automatically. Please note that if this routine cannot
  3664.     find the object you specified, it will resort to redraw the contents
  3665.     of the entire window and no just a single element.
  3666.  
  3667.    INPUTS
  3668.     handle -- Pointer to a LayoutHandle structure.
  3669.     id -- Numeric identifier of the object to redraw.
  3670.  
  3671.    RESULT
  3672.     none
  3673.  
  3674.    SEE ALSO
  3675.     intuition.library/BeginRefresh
  3676.     intuition.library/EndRefresh
  3677.     gtlayout.library/LT_EndRefresh
  3678.  
  3679. gtlayout.library/LT_Refresh                       gtlayout.library/LT_Refresh
  3680.  
  3681.    NAME
  3682.     LT_Refresh -- Redraws the entire window contents.
  3683.  
  3684.    SYNOPSIS
  3685.     LT_Refresh(Handle)
  3686.                  A0
  3687.  
  3688.     VOID LT_Refresh(LayoutHandle *);
  3689.  
  3690.    FUNCTION
  3691.     Redraws the contents of the window, this includes both gadgets
  3692.     and imagery.
  3693.  
  3694.    INPUTS
  3695.     Handle - Pointer to a LayoutHandle structure.
  3696.  
  3697.    RESULT
  3698.     none
  3699.  
  3700.    SEE ALSO
  3701.        gadtools.library/GT_RefreshWindow
  3702.        intuition.library/RefreshGList
  3703.  
  3704. gtlayout.library/LT_ReplyIMsg                   gtlayout.library/LT_ReplyIMsg
  3705.  
  3706.    NAME
  3707.     LT_ReplyIMsg -- Dispose of an IntuiMessage received
  3708.  
  3709.    SYNOPSIS
  3710.     LT_ReplyIMsg(IntuiMessage);
  3711.                      A0
  3712.  
  3713.     VOID LT_ReplyIMsg(struct IntuiMessage *);
  3714.  
  3715.    FUNCTION
  3716.     This routine complements LT_GetIMsg().
  3717.  
  3718.    INPUTS
  3719.     IntuiMessage - Pointer to IntuiMessage structure,
  3720.         passing NULL is harmless.
  3721.  
  3722.    RESULT
  3723.     none
  3724.  
  3725.    NOTES
  3726.     Only pass IntuiMessages you received via LT_GetIMsg,
  3727.     or things will get tough.
  3728.  
  3729.    SEE ALSO
  3730.     gtlayout.library/LT_GetIMsg
  3731.  
  3732. gtlayout.library/LT_SetAttributesA         gtlayout.library/LT_SetAttributesA
  3733.  
  3734.    NAME
  3735.     LT_SetAttributesA -- Change object attributes
  3736.  
  3737.    SYNOPSIS
  3738.     LT_SetAttributesA(Handle,ID,Tags);
  3739.                         A0   D0  A1
  3740.  
  3741.     VOID LT_SetAttributes(LayoutHandle *,LONG,struct TagItem *);
  3742.  
  3743.     LT_SetAttributes(Handle,ID,...);
  3744.  
  3745.     VOID LT_SetAttributes(LayoutHandle *,LONG,...);
  3746.  
  3747.    FUNCTION
  3748.     This routine passes the tag item list it gets directly
  3749.     over to GT_SetGadgetAttrsA(), so any tag items valid for
  3750.     gadtools.library can be used here as well. Some filtering
  3751.     may be done in order to stop objects from getting redrawn
  3752.     if this is not absolutely necessary.
  3753.  
  3754.    INPUTS
  3755.     Handle - Pointer to LayoutHandle.
  3756.  
  3757.     ID - ID number of the object to change. This is the same value
  3758.         you passed via LA_ID to LT_New() when you created this object.
  3759.  
  3760.     Tags - Attributes controlling object states.
  3761.  
  3762.  
  3763.     All gadtools.library tags are allowed, but not all are supported.
  3764.     In addition to these tags a few additional tag values are
  3765.     supported:
  3766.  
  3767.     LAHN_AutoActivate (BOOL) - Set to TRUE if you want the interface
  3768.         to always keep a string gadget active if possible. Hitting
  3769.         the return key will then cause the next following string
  3770.         gadget to get activated, either cycling through all the
  3771.         string gadgets available or stopping at the next string
  3772.         gadget to have the LAST_LastGadget attribute set.
  3773.  
  3774.     LAHN_UserData (APTR) - Store user specific data in the
  3775.         LayoutHandle->UserData entry. (V9)
  3776.  
  3777.     LAHN_RawKeyFilter (BOOL) - Discard unprocessed IDCMP_RAWKEY
  3778.         events. (V13)
  3779.         Default: TRUE
  3780.  
  3781.     LAHN_LocaleHook (struct Hook *) - The hook to call when
  3782.         locale string IDs are to be mapped to strings. The
  3783.         hook function is called with the following parameters:
  3784.  
  3785.         String = HookFunc(struct Hook *Hook,struct LayoutHandle *Handle,
  3786.           D0                            A0                         A2
  3787.                           LONG ID)
  3788.                                A1
  3789.  
  3790.         The function is to look up the string associated with the ID
  3791.         passed in and return the string.
  3792.  
  3793.     LAHN_ExitFlush (BOOL) - When the LayoutHandle is finally disposed
  3794.         of with LT_DeleteHandle() all variables maintained by the
  3795.         input handling code will be flushed. For example, if you
  3796.         would use the LA_STRPTR tag for STRING_KIND objects the
  3797.         last string gadget contents would be copied into the buffer
  3798.         pointed to by LA_STRPTR. If you do not want to use this
  3799.         feature, disable it with "LAHN_ExitFlush,FALSE". (V9)
  3800.         Default: TRUE
  3801.  
  3802.     GAUGE_KIND:
  3803.  
  3804.         LAGA_Percent (LONG) - Percentage of the gauge to fill.
  3805.  
  3806.         LAGA_InfoText (STRPTR) - Text to be printed within the
  3807.             gauge display, such as a percentage number.
  3808.  
  3809.     BOX_KIND:
  3810.  
  3811.         LABX_Index (LONG) - The number of the line to change, this
  3812.             tag works in conjunction with the LABX_Text tag.
  3813.  
  3814.         LABX_Text (STRPTR) - The text to put into the line indicated
  3815.             by the LABX_Index tag.
  3816.             As of v26 the LABX_Index tag may be omitted, the library
  3817.             will then assume the line index will be 0.
  3818.  
  3819.         LABX_Lines (STRPTR *) - The text to set for the box contents,
  3820.             terminate the text array with NULL.
  3821.  
  3822.     HORIZONTAL_KIND:
  3823.     VERTICAL_KIND:
  3824.  
  3825.         LAGR_ActivePage (LONG) - Index number of page to display
  3826.             within the group.
  3827.  
  3828.                 NOTE: requires that this group was created
  3829.                     with the LAGR_ActivePage attribute set.
  3830.  
  3831.     INTEGER_KIND:
  3832.  
  3833.         LAIN_Min (LONG) - Minimum allowed value for this
  3834.             object.
  3835.  
  3836.         LAIN_Max (LONG) - Maximum allowed value for this
  3837.             object.
  3838.  
  3839.     LISTVIEW_KIND:
  3840.  
  3841.         LALV_Selected (LONG) - Combines GTLV_Selected and
  3842.             GTLV_Top (for Kickstart V37) or GTLV_MakeVisible
  3843.             (for Kickstart V39 and greater). This means, the
  3844.             list display will be changed in order to show
  3845.             the item to be selected. (V34)
  3846.  
  3847.     LEVEL_KIND:
  3848.  
  3849.         LAVL_NumTicks (WORD) - Number of tick marks to draw
  3850.            next to the slider body.
  3851.  
  3852.     PASSWORD_KIND:
  3853.  
  3854.         LAPW_String (STRPTR) - Secret text to use
  3855.  
  3856.     POPUP_KIND
  3857.  
  3858.         LAPU_Labels (STRPTR *) - To block access to the popup
  3859.             menu, for example before you free the current list
  3860.             of labels, you can pass ~0 as the list parameter. (V25)
  3861.  
  3862.     STRING_KIND:
  3863.  
  3864.         LAST_CursorPosition (LONG) - Repositions the cursor,
  3865.             pass -1 to move it to the end of the string. (V7)
  3866.  
  3867.     TAPEDECK_KIND:
  3868.  
  3869.         LATD_Pressed (BOOL) - TRUE to make this button shown
  3870.             as pressed, FALSE to show it in depressed state.
  3871.  
  3872.     BOOPSI_KIND:
  3873.  
  3874.         All tags are passed straight through to SetGadgetAttrs(..).
  3875.  
  3876.     TEXTEDIT_KIND:
  3877.  
  3878.         LATE_String (STRPTR) - The string to put into the editing
  3879.             area.
  3880.  
  3881.         LATE_CursorPosition (LONG) - Index number of the character
  3882.             to put the cursor on. Pass -1 to put it to the end
  3883.             of the string.
  3884.  
  3885.     All objects:
  3886.  
  3887.         LA_LabelText (STRPTR) - New gadget label text to use.
  3888.  
  3889.         LA_LabelID (LONG) - Locale text ID to use for this object.
  3890.  
  3891.    RESULT
  3892.     none
  3893.  
  3894.    SEE ALSO
  3895.     gadtools.library/GT_SetGadgetAttrsA()
  3896.     intuition.library/SetGadgetAttrsA
  3897.  
  3898. gtlayout.library/LT_ShowWindow                 gtlayout.library/LT_ShowWindow
  3899.  
  3900.    NAME
  3901.     LT_ShowWindow -- Make a window visible
  3902.  
  3903.    SYNOPSIS
  3904.     LT_ShowWindow(Handle,Activate);
  3905.                     A0      A1
  3906.  
  3907.     VOID LT_ShowWindow(LayoutHandle *,BOOL);
  3908.  
  3909.    FUNCTION
  3910.     The window attached to a LayoutHandle is made visible, this
  3911.     involves bringing it to the front, bringing the screen to
  3912.     the front the window resides on, unzooming the window and
  3913.     also moving the visible part of an autoscrolling screen.
  3914.  
  3915.    INPUTS
  3916.     Window - Pointer to Window structure.
  3917.  
  3918.     Activate - If TRUE the window will be activated as soon
  3919.         as it has been brought to the front.
  3920.  
  3921.    RESULT
  3922.     none
  3923.  
  3924.    NOTES
  3925.     The arguments are passed in A0 and A1, this is *not* a
  3926.     typo.
  3927.  
  3928.    BUGS
  3929.     In revisions earlier than v21 this routine consistently
  3930.     failed to reliably unzip a window in zoomed state. This
  3931.     could cause the calling application to wait for about
  3932.     five seconds before continuing execution.
  3933.  
  3934.    SEE ALSO
  3935.     intuition.library/MoveScreen
  3936.     intuition.library/ScreenPosition
  3937.     intuition.library/ZipWindow
  3938.  
  3939. gtlayout.library/LT_UnlockWindow             gtlayout.library/LT_UnlockWindow
  3940.  
  3941.    NAME
  3942.     LT_UnlockWindow -- The complement to LT_LockWindow().
  3943.  
  3944.    SYNOPSIS
  3945.     LT_UnlockWindow(Window);
  3946.                       A0
  3947.  
  3948.     VOID LT_UnlockWindow(struct Window *);
  3949.  
  3950.    FUNCTION
  3951.     This routine unlocks a window locked using LT_LockWindow, freeing
  3952.     allocated memory, restoring the window characteristics to their
  3953.     original values.
  3954.  
  3955.    INPUTS
  3956.     Window - Pointer to window structure; passing NULL is harmless.
  3957.  
  3958.    RESULT
  3959.     none
  3960.  
  3961.    SEE ALSO
  3962.     gtlayout.library/LT_LockWindow
  3963.  
  3964. gtlayout.library/LT_UpdateStrings           gtlayout.library/LT_UpdateStrings
  3965.  
  3966.    NAME
  3967.     LT_UpdateStrings -- Make sure all visible string buffer contents
  3968.                         get written into storage (v9).
  3969.  
  3970.    SYNOPSIS
  3971.     LT_UpdateStrings(LayoutHandle);
  3972.                             A0
  3973.  
  3974.     VOID LT_UpdateStrings(struct LayoutHandle *);
  3975.  
  3976.    FUNCTION
  3977.     The user can terminate input into a string gadget or an object
  3978.     derived from a string gadget by various means. They all have
  3979.     in common that the application receives no notification that
  3980.     the string gadget contents have changed. This is particularly
  3981.     nasty with objects which make use of LA_STRPTR or other
  3982.     tags. Using LT_UpdateStrings() you can force all visible string
  3983.     gadget objects to hand over their contents to the internal
  3984.     buffers. Do this before you eventually exit your input loop.
  3985.  
  3986.    INPUTS
  3987.     LayoutHandle - Pointer to LayoutHandle structure.
  3988.  
  3989.    RESULT
  3990.     none
  3991.  
  3992.