home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / e / gtlayout4e.lha / gtlayout.doc next >
Encoding:
Text File  |  1995-03-07  |  94.4 KB  |  2,731 lines

  1. TABLE OF CONTENTS
  2.  
  3. gtlayout.library/--version--
  4. gtlayout.library/--background--
  5. gtlayout.library/LT_Activate
  6. gtlayout.library/LT_BeginRefresh
  7. gtlayout.library/LT_BuildA
  8. gtlayout.library/LT_CreateHandleTagList
  9. gtlayout.library/LT_DeleteHandle
  10. gtlayout.library/LT_DeleteWindowLock
  11. gtlayout.library/LT_EndGroup
  12. gtlayout.library/LT_EndRefresh
  13. gtlayout.library/LT_Exit
  14. gtlayout.library/LT_Fixed2String
  15. gtlayout.library/LT_FixedMult
  16. gtlayout.library/LT_GetAttributesA
  17. gtlayout.library/LT_GetCode
  18. gtlayout.library/LT_GetIMsg
  19. gtlayout.library/LT_HandleInput
  20. gtlayout.library/LT_Init
  21. gtlayout.library/LT_LabelChars
  22. gtlayout.library/LT_LabelWidth
  23. gtlayout.library/LT_LayoutMenusA
  24. gtlayout.library/LT_LevelWidth
  25. gtlayout.library/LT_LockWindow
  26. gtlayout.library/LT_NewA
  27. gtlayout.library/LT_PressButton
  28. gtlayout.library/LT_RebuildTagList
  29. gtlayout.library/LT_ReplyIMsg
  30. gtlayout.library/LT_SetAttributesA
  31. gtlayout.library/LT_ShowWindow
  32. gtlayout.library/LT_String2Fixed
  33. gtlayout.library/LT_UnlockWindow
  34. gtlayout.library/LT_UpdateStrings
  35. gtlayout.library/--version--                       gtlayout.library/--version--
  36.  
  37. This document describes gtlayout.library v5.12 or higher. Do not assume that
  38. previous library releases support the same features.
  39. gtlayout.library/--background--                 gtlayout.library/--background--
  40.  
  41.     1. General information
  42.  
  43.     1.1 Purpose
  44.  
  45.     The GUI code included in this archive helps to create user interfaces
  46.     using gadtools.library with a minimum of effort. The code
  47.     automatically takes care of the font to be used, making the user
  48.     interface font independent. Localizing support is built right into
  49.     the code, just install a callback hook and pass numeric IDs for the
  50.     gadget labels: the code will invoke your hook in order to get the
  51.     text required. Keystroke activation of gadgets is also taken care
  52.     of, in fact the code will -- unless told not to do so -- assign keyboard
  53.     shortcuts to the gadgets created all on its own. Every effort has been
  54.     made to make the code reentrant, so it can be put into a shared library.
  55.     If a user interface does not fit onto a screen provisions are made to
  56.     choose a smaller font and to rescale the window contents until they fit.
  57.     Last but not least the user interface code offers transparent extensions
  58.     to the standard gadtools.library objects, such as LISTVIEW_KIND objects
  59.     which respond to double-clicks or STRING_KIND objects which can be used
  60.     to enter password text as they will not display the characters entered.
  61.  
  62.  
  63.     1.2 Distribution
  64.  
  65.     The code is *free*, you don't need to pay any money to use it, nor
  66.     do you need to quote my name in the documentation, the program or
  67.     anywhere else. You are allowed to make changes to the code, but if
  68.     you stumble across any bugs or even know how to fix them, please
  69.     let me know. It does not matter whether you intend to sell a program
  70.     to use the code, use the code in shareware, gift-ware, freeware or
  71.     etc.-ware programs: the code still remains royalty-free.
  72.  
  73.  
  74.     1.3 Caveats
  75.  
  76.     The code is pretty large, about 40K-60K bytes in size. Not all
  77.     gadtools.library type objects are supported, notably
  78.     GENERIC_KIND objects. The code is not as flexible as
  79.     gadtools.library, so certain things which are easily done using
  80.     gadtools.library may be pretty difficult or even impossible.
  81.     The code is written entirely in `C' and requires SAS/C to
  82.     compile. Some parts of the code are highly recursive; I haven't
  83.     measured how many stack they might require in certain cases,
  84.     but I recommend that you don't use the grouping feature too
  85.     much. The data structures required to create and maintain the
  86.     user interface are huge, a single window might require more
  87.     than 4K-6K of memory. Proportional font support only works
  88.     well starting with Kickstart v39 and up, v2.04 will probably
  89.     not look quite that pretty.
  90.  
  91.  
  92.     2. Programming
  93.  
  94.     2.1 Client libraries required
  95.  
  96.     You need to have SysBase and GadToolsBase initialized in order to make
  97.     use of the code, i.e. your code has to do
  98.     WaitPort()...GT_GetIMsg()...GT_ReplyIMsg all on its own. The code makes
  99.     use of the memory pools introduced in exec.library v39, but calls the
  100.     equivalent routines in amiga.lib. Note: as of this writing the pools
  101.     code in amiga.lib v40.14 is broken, so you need to link with Mike
  102.     Sinz' fixed pools.lib.
  103.  
  104.  
  105.     2.2 Invocation procedure
  106.  
  107.     The typical invocation procedure looks roughly like this:
  108.  
  109.        LT_Init();
  110.        :
  111.        :
  112.           LT_CreateHandleTags();
  113.              LT_New();
  114.              :
  115.              :
  116.              LT_New();
  117.                 LT_Build();
  118.                    LT_HandleInput();
  119.           LT_DeleteHandle();
  120.        :
  121.        :
  122.        LT_Exit();
  123.  
  124.     You need to call LT_Init() only once in your program, it will initialize
  125.     the libraries and global data structures required by the user interface
  126.     code. When you are finished with the user interface and your program is
  127.     about to exit you need to call LT_Exit() or memory will get lost.
  128.     Note that LT_Init() is not protected against multiple invocations. If
  129.     called repeatedly memory will get lost which can never be reclaimed.
  130.     However, LT_Exit() is protected against multiple invocations, you can
  131.     also call it before ever giving LT_Init() a call, but I doubt this
  132.     would make much sense. If you are using the shared gtlayout.library
  133.     no call to LT_Init()/LT_Exit() is necessary as these calls are already
  134.     wrapped into the library opening code.
  135.        Before you can actually start building a window layout a call to
  136.     LT_CreateHandleTags() needs to be made. You need to pass in a pointer
  137.     to the Screen your user interface window is to be opened on and,
  138.     optionally, a few tags to control the look and performance of the
  139.     interface. *Never* close the screen in question before calling
  140.     LT_DeleteHandle() or nasty things will happen. For public screens
  141.     the code will try to lock the screen in question. With the handle
  142.     LT_CreateHandleTags() returned you can call LT_New() to build the
  143.     user interface. When finished a call to LT_Build() will finally
  144.     open a window and place the gadgets inside. A pointer to the
  145.     Window created will be returned, ready to be used for the
  146.     WaitPort()...GT_GetIMsg()...LT_HandleInput()...GT_ReplyIMsg()
  147.     loop. When finished, a call to LT_DeleteHandle() will close the
  148.     window and release all the memory associated with it. The design
  149.     of the interface code is similar to the corresponding calls in
  150.     gadtools.library, i.e. you don't need to worry about LT_New()
  151.     failing to allocate memory for the objects required. When it comes
  152.     to LT_Build() the code will know about any trouble which would
  153.     show up during previous invocations of LT_New(). In essence,
  154.     if LT_Build() returns NULL something is wrong.
  155.  
  156.  
  157.     2.3 Hierarchic grouping
  158.  
  159.     The basic building block of the user interface is a group, either
  160.     a horizontal or a vertical group. Adding gadgets or other objects
  161.     to a horizontal group will place them side by side from left to
  162.     right. A vertical group causes objects to be place from top to
  163.     bottom in one straight line. Groups help to arrange objects
  164.     neatly stacked, centered and properly aligned with other
  165.     members of the group.
  166.  
  167.     MUCHO IMPORTANTE: there is a bug lurking in the code which I never
  168.     had the luck to find and fix. One would expect to create
  169.     user interface structures like this:
  170.  
  171.        <group start>
  172.           <button>
  173.           <list>
  174.           <group start>
  175.              <slider>
  176.              <text>
  177.           <group end>
  178.           <button>
  179.        <group end>
  180.  
  181.     However, it is in fact not possible to mix gadgets and groups.
  182.     Thus, the user interface structure would have to look like this:
  183.  
  184.        <group start>
  185.           <group start>
  186.              <button>
  187.              <list>
  188.           <group end>
  189.           <group start>
  190.              <slider>
  191.              <text>
  192.           <group end>
  193.           <group start>
  194.              <button>
  195.           <group end>
  196.        <group end>
  197.  
  198.     Or in other words: groups only mix with other groups.
  199.  
  200.     You build groups using three different object types. In this
  201.     context `object type' refers to a specific numeric value the
  202.     LT_New() routine knows which will cause it to add another leaf
  203.     to the user interface structure tree. Here is an example:
  204.  
  205.        struct LayoutHandle *Handle;
  206.  
  207.        if(Handle = LT_CreateHandleTags(NULL,
  208.           LH_AutoActivate,FALSE,
  209.        TAG_DONE))
  210.        {
  211.           struct Window *Window;
  212.  
  213.           LT_New(Handle,
  214.              LA_Type,      VERTICAL_KIND,  /* A vertical group. */
  215.              LA_LabelText, "Main group",   /* Group title text. */
  216.           TAG_DONE);
  217.           {
  218.              LT_New(Handle,
  219.                 LA_Type,      BUTTON_KIND, /* A plain button. */
  220.                 LA_LabelText, "A button",
  221.                 LA_ID,        11,
  222.              TAG_DONE);
  223.  
  224.              LT_New(Handle,
  225.                 LA_Type,      XBAR_KIND,   /* A separator bar. */
  226.              TAG_DONE);
  227.  
  228.              LT_New(Handle,
  229.                 LA_Type,      BUTTON_KIND, /* A plain button. */
  230.                 LA_LabelText, "Another button",
  231.                 LA_ID,        22,
  232.              TAG_DONE);
  233.  
  234.              LT_New(Handle,
  235.                 LA_Type,      END_KIND,    /* This ends the current group. */
  236.              TAG_DONE);
  237.           }
  238.  
  239.           if(Window = LT_Build(Handle,
  240.             LAWN_Title,     "Window title",
  241.             LAWN_IDCMP,     IDCMP_CLOSEWINDOW,
  242.             WA_CloseGadget, TRUE,
  243.           TAG_DONE))
  244.           {
  245.               struct IntuiMessage *Message;
  246.               ULONG                MsgQualifier,
  247.                                    MsgClass;
  248.               UWORD                MsgCode;
  249.               struct Gadget       *MsgGadget;
  250.               BOOL                 Done = FALSE;
  251.  
  252.               do
  253.               {
  254.                   WaitPort(Window -> UserPort);
  255.  
  256.                   while(Message = GT_GetIMsg(Window -> UserPort))
  257.                   {
  258.                      MsgClass     = Message -> Class;
  259.                      MsgCode      = Message -> Code;
  260.                      MsgQualifier = Message -> Qualifier;
  261.                      MsgGadget    = Message -> IAddress;
  262.  
  263.                      GT_ReplyIMsg(Message);
  264.  
  265.                      LT_HandleInput(Handle,MsgQualifier,&MsgClass,&MsgCode,&MsgGadget);
  266.  
  267.                      switch(MsgClass)
  268.                      {
  269.                         case IDCMP_CLOSEWINDOW:
  270.  
  271.                             Done = TRUE;
  272.                             break;
  273.  
  274.                         case IDCMP_GADGETUP:
  275.  
  276.                             switch(MsgGadget -> GadgetID)
  277.                             {
  278.                                 case 11: printf("First gadget\n");
  279.                                          break;
  280.  
  281.                                 case 22: printf("Second gadget\n");
  282.                                          break;
  283.                             }
  284.  
  285.                             break;
  286.                      }
  287.                   }
  288.               }
  289.               while(!Done);
  290.           }
  291.  
  292.           LT_DeleteHandle(Handle);
  293.        }
  294.  
  295.     The example creates one single group, places a few objects inside,
  296.     calls the layout routine, handles the input and finally cleans
  297.     things up again. This example also shows that you *need* at
  298.     least one group in your tree (to form the root) in order to get
  299.     things to work.
  300.        The input loop requires you to call LT_HandleInput() in order
  301.     to get the user interface code to filter out certain events and
  302.     to update internal information. The data passed in must have
  303.     been processed via the gadtools.library routines. You *must not*
  304.     call LT_HandleInput() before GT_ReplyIMsg() is called since the
  305.     routine may call intuition.library and gadtools.library routines
  306.     which in turn might lead to a system lock-up if the message
  307.     has not been processed yet. The first thing to do after LT_HandleInput()
  308.     has done whatever was necessary to the data you passed in is
  309.     examine the MsgClass variable. The user interface code will
  310.     `fake' certain message events using the variables passed in,
  311.     *do not* use any other data gathered from the original
  312.     IntuiMessage. The MsgClass may include event types you did
  313.     not ask for, i.e. the IDCMP flags of the window opened
  314.     will be set according to the objects you added to the window.
  315.     Also, the IDCMP_IDCMPUPDATE message class will show up for
  316.     certain objects. More on this later in this document.
  317.  
  318.  
  319.     2.4 Setting and getting object attributes
  320.  
  321.     The mechanism to update and query object attributes does not
  322.     exactly match the familiar gadtools.library interface. In
  323.     fact, the routine to change gadget attributes will forward
  324.     the tagitem list passed in to gadtools.library/GT_SetGadgetAttrs().
  325.     On the other hand the routine to query object attributes does
  326.     not work like gadtools.library/GT_GetGadgetAttrs(). The
  327.     user interface code assumes that all objects it can handle and
  328.     create posess certain attributes unique to the type of the
  329.     object in question. For example, the unique attribute of a
  330.     STRING_KIND object would be a pointer to the string it
  331.     `contains'. The unique attribute of a SLIDER_KIND object is
  332.     the current slider position. The LT_GetAttributes() routine
  333.     will return this attribute, but also accept a tagitem list
  334.     to fill in for certain special tag values.
  335.  
  336.  
  337.     2.5 Extra data
  338.  
  339.     Once a LayoutHandle has been created the interface code will
  340.     provide you with a number of information concerning the screen
  341.     the handle has been attached to. This information includes
  342.     the DrawInfo structure of the screen, the VisualInfo data
  343.     and the Screen address. This information is read-only.
  344.  
  345.  
  346.     2.6 Menus
  347.  
  348.     With a LayoutHandle available a routine calld LT_LayoutMenuTags()
  349.     will create a standard Intuition menu structure via gadtools.library
  350.     which can be passed to LT_Build(). Note that this
  351.     routine does not modify any data passed in, it does neither
  352.     attach the menu created to the LayoutHandle passed in,
  353.     nor does it change the NewMenu table.
  354.  
  355.  
  356.     2.7 Localization
  357.  
  358.     All object and menu creation routines support localization via
  359.     a Hook callback interface, i.e. you can pass a pointer to an
  360.     initialized Hook structure to LT_CreateHandleTags() which will
  361.     later be used to supply label and list text for objects
  362.     created. The Hook callback routine is called in the following
  363.     fashion:
  364.  
  365.        String = HookFunc(struct Hook *Hook,struct LayoutHandle *Handle,LONG ID)
  366.          D0                            A0                         A2        A1
  367.  
  368.     Or in other words: a locale string ID is passed in, the routine is supposed
  369.     to look up the string to match this ID and to return it.
  370.  
  371.  
  372.     2.8 Object types to generate IDCMP_IDCMPUPDATE events
  373.  
  374.     Certain objects convey extra information which is merged into the `fake'
  375.     input stream passed to the client calling LT_HandleInput(). These objects
  376.     are:
  377.  
  378.        STRING_KIND
  379.        TEXT_KIND
  380.  
  381.           The user pressed the `select' button which belongs
  382.           to this gadget. The MsgGadget pointer indicates the
  383.           STRING_KIND/TEXT_KIND object the `select' button
  384.           belongs to.
  385.  
  386.        LISTVIEW_KIND
  387.  
  388.           The user double-clicked on an entry. The entry number
  389.           is returned in the MsgCode variable. The MsgGadget
  390.           pointer indicates the LISTVIEW_KIND object the user
  391.           has clicked on.
  392.  
  393.  
  394.     2.9 Keystroke activation
  395.  
  396.     Unless forbidden via the the LA_NoKey tag item the user interface
  397.     code will pick the keyboard shortcuts for all gadgets on its own.
  398.     The currently active global console keymap will be checked at the
  399.     time when LT_Init() is called in order to make sure subsequent
  400.     calls to LT_Build() will use only keys the user can press on
  401.     the keyboard. Double-dead keys are also excluded from the
  402.     table created. This avoids problems with gadget labels such as
  403.     "éééé" which would require the user to hit two keys in a row to
  404.     activate the gadget.
  405.        If the window created happens to feature a close gadget
  406.     pressing the `Esc' key will cause the client to receive
  407.     an IDCMP_CLOSEWINDOW event.
  408.        A single LISTVIEW_KIND object may receive special treatment
  409.     if the LALV_CursorKey tag is used: the user will be able to
  410.     operate the listview using the cursor keys. Note: this will
  411.     will also keep the user interface code from choosing a
  412.     special keystroke from the gadget label.
  413.        The user will be able to operate a single BUTTON_KIND
  414.     object using the return key if the LABT_ReturnKey tag is
  415.     used. A recessed frame will be drawn around the button hit
  416.     box to indicate its special status.
  417.        Pressing the Tab key can be bound to operate a cycle or
  418.     mx kind object.
  419.  
  420.     3. Credits
  421.  
  422.     The original design is based upon the user interface layout code used by
  423.     `term' 3.1. I put the first version of the layout routines together back
  424.     in Summer 1993 when I wanted to write the follow-up to `term' v3.4.
  425.  
  426.     Martin Taillefer rewrote large parts of the code, added new routines and
  427.     generally improved the performance of the layout process.
  428.  
  429.     Kai Iske and Christoph Feck helped to iron out the remaining bugs and
  430.     piled up bug reports and enhancement requests.
  431. gtlayout.library/LT_Activate                      gtlayout.library/LT_Activate
  432.  
  433.    NAME
  434.  
  435.         LT_Activate -- Activate a string type gadget.
  436.  
  437.    SYNOPSIS
  438.  
  439.         LT_Activate(Handle,ID);
  440.                       A0   D0
  441.  
  442.         VOID LT_Activate(LayoutHandle *,LONG);
  443.  
  444.    FUNCTION
  445.  
  446.         The equivalent to intuition.library/ActivateGadget().
  447.  
  448.    INPUTS
  449.  
  450.         Handle - Pointer to LayoutHandle structure.
  451.  
  452.         ID - ID of Gadget to activate.
  453.  
  454.    RESULT
  455.  
  456.         none
  457.    SEE ALSO
  458.  
  459.         intuition.library/ActivateGadget
  460. gtlayout.library/LT_BeginRefresh              gtlayout.library/LT_BeginRefresh
  461.  
  462.    NAME
  463.  
  464.         LT_BeginRefresh -- Optimized window refreshing
  465.  
  466.    SYNOPSIS
  467.  
  468.         LT_BeginRefresh(Handle)
  469.                           A0
  470.  
  471.         VOID LT_BeginRefresh(LayoutHandle *);
  472.  
  473.    FUNCTION
  474.  
  475.         If you wish to handle window refreshing all on your own, you
  476.         might want to use the LT_BeginRefresh...LT_EndRefresh pair
  477.         in your program. By default the user interface layout engine
  478.         will automatically intercept IDCMP_REFRESHWINDOW events and
  479.         react to them accordingly.
  480.  
  481.    INPUTS
  482.  
  483.         Handle - Pointer to a LayoutHandle structure.
  484.  
  485.    RESULT
  486.  
  487.         none.
  488.  
  489.    SEE ALSO
  490.  
  491.         intuition.library/BeginRefresh
  492.         intuition.library/EndRefresh
  493.         gtlayout.library/LT_EndRefresh
  494. gtlayout.library/LT_BuildA                          gtlayout.library/LT_BuildA
  495.  
  496.    NAME
  497.  
  498.         LT_BuildA -- turn the user interface specs into a window
  499.                      and gadgets.
  500.  
  501.    SYNOPSIS
  502.  
  503.         Window = LT_BuildA(Handle,Tags);
  504.           D0                 A0    A1
  505.  
  506.         struct Window *LT_BuildA(LayoutHandle *,struct TagItem *);
  507.  
  508.         Window = LT_Build(Handle,...);
  509.  
  510.         struct Window *LT_Build(LayoutHandle *,...);
  511.  
  512.    FUNCTION
  513.  
  514.         This is the big one. After building up a user interface specification
  515.         using LT_NewA() a call to LT_BuildA() will finally lay out the single
  516.         user interface elements, open a window and put the gadgets, etc.
  517.         inside.
  518.         The code tries to fit all the gadgets into the window, but if it
  519.         runs out of space it will fall back to a different font and
  520.         rescale the user interface objects to match it. It will first
  521.         fall back onto the system default font. If unsuccessful it will
  522.         as a last resort try to use topaz.font/8.
  523.  
  524.    INPUTS
  525.  
  526.         Handle - Pointer to a LayoutHandle structure.
  527.  
  528.         Tags - Pointer to TagItem list controlling window
  529.                and layout attributes.
  530.  
  531.    TAGS
  532.  
  533.         All the tag values given are passed straight away to OpenWindowTags(),
  534.         see intuition.doc for more information.
  535.  
  536.         In addition to this a number of private tag values are supported:
  537.  
  538.         LAWN_Menu (struct Menu *) - The menu to attach to the window, the
  539.             IDCMP flags will be updated to include IDCMP_MENUPICK if this
  540.             tag is used.
  541.  
  542.         LAWN_UserPort (struct MsgPort *) - The MsgPort to use as the
  543.             window user port. The MsgPort will be attached using the
  544.             common ModifyIDCMP() method, closing the window will
  545.             first remove and reply all pending messages at this port.
  546.  
  547.         LAWN_Left (LONG) - The left edge position the window is to use.
  548.             This effectively overrides any horizontal alignment flags.
  549.             NOTE: the code may choose to ignore this value if it finds
  550.                   that the window will not fit onto the screen unless
  551.                   the left edge position is changed.
  552.  
  553.         LAWN_Top (LONG) - The top edge position the window is to use.
  554.             This effectively overrides any vertical alignment flags.
  555.             NOTE: the code may choose to ignore this value if it finds
  556.                   that the window will not fit onto the screen unless
  557.                   the top edge position is changed.
  558.  
  559.         LAWN_Zoom (BOOL) - Adds a zoom gadget to the window. Clicking
  560.             on this gadget will cause the window to shrink/zoom back
  561.             to its original position. This differs from the WA_Zoom
  562.             tag behaviour. When the window zooms back to its original
  563.             position the gadgets are automatically refreshed.
  564.             Default: FALSE
  565.  
  566.         LAWN_MaxPen (LONG) - The maximum rendering pen index your code
  567.             will use. Since you are -- with some restrictions -- allowed
  568.             to render into the window created you may want to avoid
  569.             silly side effects if drawing images or other colourful
  570.             textures which do not share the common user interface colours.
  571.             By default the layout code will change the maximum rendering
  572.             pen number for the window to include only the user interface
  573.             pen colours. This can, but need not disturb your own private
  574.             window rendering.
  575.             Look up graphics.library/SetMaxPen for more information.
  576.             Default: determined by looking up Screen->DrawInfo.dri_Pens
  577.  
  578.         LAWN_BelowMouse (BOOL) - This instructs the layout routine to
  579.             centre the window created -- if possible -- below the
  580.             mouse pointer. This effectively ignores any left edge,
  581.             top edge or alignment settings.
  582.             Default: FALSE
  583.  
  584.         LAWN_MoveToWindow (BOOL) - When the window is finally open the
  585.             user interface code will try to make sure the entire window
  586.             is visible on the screen, this may involve moving the
  587.             currently visible portion of an autoscrolling screen.
  588.             Default: TRUE
  589.  
  590.         LAWN_AutoRefresh (BOOL) - Handle IDCMP_REFRESHWINDOW events
  591.             automatically.
  592.             Default: TRUE
  593.  
  594.         LAWN_HelpHook (struct Hook *) - Hook code to invoke when the user
  595.             presses the "Help" key. See gtlayout.h for more information.
  596.             Default: NULL
  597.  
  598.         LAWN_Parent (struct Window *) - Parent window to centre the child
  599.             window in.
  600.             Default: NULL
  601.  
  602.         LAWN_BlockParent (BOOL) - Lock the parent window via LT_LockWindow()
  603.             until the child window is closed. NOTE: requires LAWN_Parent
  604.             attribute.
  605.             Default: FALSE
  606.  
  607.         LAWN_SmartZoom (BOOL) - Attach a zoom gadget to the window created.
  608.             When in zoomed state, the window will be as small as possible,
  609.             showing only the window title and window gadgets:
  610.             NOTE: this tag implies LAWN_Zoom,TRUE
  611.             Default: FALSE
  612.  
  613.         LAWN_Title (STRPTR) - The window title to use. Use this tag in
  614.             place of WA_Title or you will break the layout code.
  615.             Default: no title
  616.  
  617.         LAWN_Bounds (struct IBox *) - Bounds to centre the window in.
  618.             Default: NULL
  619.  
  620.         LAWN_ExtraWidth (LONG) - Extra width to add into the calculation
  621.             when opening the window.
  622.             Default: 0
  623.  
  624.         LAWN_ExtraHeight (LONG) - Extra height to add into the calculation
  625.             when opening the window.
  626.             Default: 0
  627.  
  628.         LAWN_IDCMP (ULONG) - Use this tag in place of WA_IDCMP or you
  629.             will break the object handling code.
  630.  
  631.         LAWN_AlignWindow (UWORD) - Alignment information for the window, must
  632.             be a mask made from the following bit values:
  633.  
  634.                 ALIGNF_RIGHT - Align to screen right edge
  635.                 ALIGNF_LEFT - Align to screen left edge
  636.                 ALIGNF_TOP - Align to screen top edge
  637.                 ALIGNF_BOTTOM - Align to screen bottom edge
  638.  
  639.             Unless forbidden (such as by passing ALIGNF_RIGHT|ALIGNF_TOP)
  640.             the window will be centered horizontally and/or vertically.
  641.  
  642.    RESULT
  643.  
  644.         Window - Pointer to a Window structure.
  645.  
  646.    SEE ALSO
  647.  
  648.        intuition.library/OpenWindow
  649.        intuition.library/OpenWindowTagList
  650. gtlayout.library/LT_CreateHandleTagList gtlayout.library/LT_CreateHandleTaglist
  651.  
  652.    NAME
  653.  
  654.         LT_CreateHandleTagList -- Allocate auxilary data required by LT_New()
  655.                                   and LT_BuildA().
  656.  
  657.    SYNOPSIS
  658.  
  659.         Handle = LT_CreateHandleTagList(Screen,Tags);
  660.           D0                              A0    A1
  661.  
  662.         LayoutHandle *LT_CreateHandleTagList(struct Screen *,struct TagItem *);
  663.  
  664.         Handle = LT_CreateHandleTags(Screen,...);
  665.  
  666.         struct LayoutHandle *LT_CreateHandleTags(struct Screen *,...);
  667.  
  668.    FUNCTION
  669.  
  670.         Memory is allocated, tables are set up and data is collected
  671.         on a screen a user interface is to be opened on. This
  672.         involves calculating the screen font parameters.
  673.  
  674.    INPUTS
  675.  
  676.         Screen - Pointer to the screen the user interface is to
  677.                  use. Passing NULL will cause the default public
  678.                  screen to be used.
  679.  
  680.                  NOTE: if NULL is passed the default public screen
  681.                        will stay locked until LT_DeleteHandle()
  682.                        is called.
  683.  
  684.         Tags - Tag values to control certain aspects of the
  685.                user interface created.
  686.  
  687.    TAGS
  688.  
  689.         LH_AutoActivate (BOOL) - Set to TRUE if you want the interface
  690.             to always keep a string gadget active if possible. Hitting
  691.             the return key will then cause the next following string
  692.             gadget to get activated, either cycling through all the
  693.             string gadgets available or stopping at the next string
  694.             gadget to have the LAST_LastGadget attribute set.
  695.             Default: TRUE
  696.  
  697.         LH_UserData (APTR) - Store user specific data in the
  698.             LayoutHandle->UserData entry.
  699.  
  700.             NOTE: This tag requires gtlayout.library v9 and the
  701.                   corresponding entry in the LayoutHandle exists
  702.                   only under gtlayout.library v9 and up. *NEVER*
  703.                   write to this entry, use LT_SetAttributes()
  704.                   instead.
  705.  
  706.         LH_LocaleHook (struct Hook *) - The hook to call when
  707.             locale string IDs are to be mapped to strings. The
  708.             hook function is called with the following parameters:
  709.  
  710.             String = HookFunc(struct Hook *Hook,struct LayoutHandle *Handle,
  711.               D0                            A0                         A2
  712.                               LONG ID)
  713.                                    A1
  714.  
  715.             The function is to look up the string associated with the ID
  716.             passed in and return the string.
  717.             Default: no locale hook
  718.  
  719.         LH_Font (struct TTextAttr *) - The text font to use when creating
  720.             the gadgets and objects.
  721.             Default: Screen->Font
  722.  
  723.         LH_CloningPermitted (BOOL) - If a window will not fit onto the
  724.             screen the user interface is intended for, the layout engine
  725.             will scale the interface data down while stepping down in
  726.             font size. If all this fails, the engine will open a custom
  727.             screen for the window; this process is called "cloning".
  728.             The LH_CloningPermitted tag controls whether the engine will
  729.             actually try to open the custom screen or just return NULL
  730.             when LT_Build fails.
  731.             Default: TRUE
  732.  
  733.         LH_EditHook (struct Hook *) - You can specify a default string
  734.             gadget editing hook to be used for all following string
  735.             gadgets. Your hook should obey the same rules that apply
  736.             to hooks passed via GTST_EditHook/GTIN_EditHook.
  737.             Default: NULL
  738.  
  739.         LH_ExactClone (BOOL) - This tag works in conjunction with the
  740.             LH_CloningPermitted tag. By default the layout engine will
  741.             try to replicate only the basic characteristics of the
  742.             screen the window was intended to open on. This may result
  743.             in a screen which uses less colours than the original
  744.             screen. You can force the engine to make an almost exact
  745.             clone of the original screen by passing the LH_ExactClone
  746.             tag with a value of TRUE.
  747.             Default: FALSE
  748.  
  749.         LH_MenuGlyphs (BOOL) - This tag will make the layout engine
  750.             fill in the AmigaGlyph and CheckGlyph entries of the
  751.             LayoutHandle if running under Kickstart 3.0 or higher.
  752.             The corresponding images will be scaled to fit the actual
  753.             screen aspect ratio values and can later be used for
  754.             menu layout.
  755.             Default: FALSE
  756.  
  757.         LH_Parent (struct Window *) - You can pass a pointer to the
  758.             parent window of the window you intend to open using
  759.             the user interface layout engine. The new window will
  760.             open inside the boundaries of the parent window. If the
  761.             size does not fit, it will be opened centered over the
  762.             parent window.
  763.             Default: NULL
  764.  
  765.         LH_BlockParent (BOOL) - This tag works in conjunction with the
  766.             LH_Parent tag. If in effect, will block the parent window
  767.             via LT_LockWindow until the new window is closed, after
  768.             which the parent window is unlocked again.
  769.             Default: FALSE
  770.  
  771.         LH_SimpleClone (BOOL) - This tag works in conjunction with the
  772.             LH_CloningPermitted tag. It will make the layout engine
  773.             forget most information about the original screen the
  774.             user interface was intended for. In short, it will open a
  775.             simple default screen for the interface.
  776.             Default: FALSE
  777.  
  778.         LH_ExitFlush (BOOL) - When the LayoutHandle is finally disposed
  779.             of with LT_DeleteHandle() all variables maintained by the
  780.             input handling code will be flushed. For example, if you
  781.             would use the LA_STRPTR tag for STRING_KIND objects the
  782.             last string gadget contents would be copied into the buffer
  783.             pointed to by LA_STRPTR. If you do not want to use this
  784.             feature, disable it with "LH_ExitFlush,FALSE".
  785.             Default: TRUE
  786.  
  787.             (requires gtlayout.library v9 or higher)
  788.  
  789.    RESULT
  790.  
  791.         Handle - Pointer to a LayoutHandle structure.
  792. gtlayout.library/LT_DeleteHandle              gtlayout.library/LT_DeleteHandle
  793.  
  794.    NAME
  795.  
  796.         LT_DeleteHandle -- Release storage space allocated by
  797.                            LT_CreateHandleTagList, closing windows,
  798.                            removing gadgets, etc.
  799.  
  800.    SYNOPSIS
  801.  
  802.         LT_DeleteHandle(Handle);
  803.                           A0
  804.  
  805.         VOID LT_DeleteHandle(LayoutHandle *);
  806.  
  807.    FUNCTION
  808.  
  809.         Windows and gadgets created by LT_CreateHandleTagList()
  810.         are removed, any associated memory is deallocated.
  811.  
  812.    INPUTS
  813.  
  814.         Handle - Pointer to a LayoutHandle structure created
  815.                  by LT_CreateHandleTaglist(). Passing NULL is
  816.                  harmless.
  817.  
  818.    RESULT
  819.  
  820.         none
  821.  
  822.    SEE ALSO
  823.  
  824.         gtlayout.library/CreateHandleTagList
  825. gtlayout.library/LT_DeleteWindowLock      gtlayout.library/LT_DeleteWindowLock
  826.  
  827.    NAME
  828.  
  829.         LT_DeleteWindowLock -- Remove all locks from a window
  830.  
  831.    SYNOPSIS
  832.  
  833.         LT_DeleteWindowLock(Window);
  834.                               A0
  835.  
  836.         VOID LT_DeleteWindowLock(struct Window *);
  837.  
  838.    FUNCTION
  839.  
  840.         Before closing a locked window you should call this routine
  841.         which will remove all outstanding locks from it.
  842.  
  843.    INPUTS
  844.  
  845.         Window - Pointer to window structure.
  846.  
  847.    RESULT
  848.  
  849.         none
  850. gtlayout.library/LT_EndGroup                      gtlayout.library/LT_EndGroup
  851.  
  852.    NAME
  853.  
  854.         LT_EndGroup -- end a group declaration.
  855.  
  856.    SYNOPSIS
  857.  
  858.         LT_EndGroup(Handle);
  859.                      A0
  860.  
  861.         VOID LT_EndGroup(LayoutHandle *);
  862.  
  863.    FUNCTION
  864.  
  865.        This is just a short form of
  866.  
  867.            LT_New(Handle,
  868.                LA_Type, END_KIND,
  869.            TAG_DONE);
  870.  
  871.        It helps to save (some) space.
  872.  
  873.    INPUTS
  874.  
  875.        Handle - Pointer to LayoutHandle.
  876.  
  877.    RESULT
  878.  
  879.        none
  880. gtlayout.library/LT_EndRefresh                  gtlayout.library/LT_EndRefresh
  881.  
  882.    NAME
  883.  
  884.         LT_EndRefresh -- Optimized window refreshing
  885.  
  886.    SYNOPSIS
  887.  
  888.         LT_EndRefresh(Handle)
  889.                         A0
  890.  
  891.         VOID LT_EndRefresh(LayoutHandle *);
  892.  
  893.    FUNCTION
  894.  
  895.         If you wish to handle window refreshing all on your own, you
  896.         might want to use the LT_BeginRefresh...LT_EndRefresh pair
  897.         in your program. By default the user interface layout engine
  898.         will automatically intercept IDCMP_REFRESHWINDOW events and
  899.         react to them accordingly.
  900.  
  901.    INPUTS
  902.  
  903.         Handle - Pointer to a LayoutHandle structure.
  904.  
  905.    RESULT
  906.  
  907.         none.
  908.  
  909.    SEE ALSO
  910.  
  911.         intuition.library/BeginRefresh
  912.         intuition.library/EndRefresh
  913.         gtlayout.library/LT_BeginRefresh
  914. gtlayout.library/LT_Exit                              gtlayout.library/LT_Exit
  915.  
  916.    NAME
  917.  
  918.         LT_Exit -- Clean up user interface allocations
  919.  
  920.    SYNOPSIS
  921.  
  922.         LT_Exit();
  923.  
  924.         VOID LT_Exit(VOID);
  925.  
  926.    FUNCTION
  927.  
  928.         When you are finished with user interface creation and
  929.         do not not need the code any more you should call this
  930.         routine. It will free all the memory allocated by
  931.         LT_Init(), close libraries, etc.
  932.  
  933.    INPUTS
  934.  
  935.         none
  936.  
  937.    RESULT
  938.  
  939.         none
  940.  
  941.    NOTES
  942.  
  943.         This routine is available in the link library only.
  944. gtlayout.library/LT_Fixed2String              gtlayout.library/LT_Fixed2String
  945.  
  946.    NAME
  947.  
  948.         LT_Fixed2String -- Convert a fixed-point number into an alphanumeric
  949.                            string.
  950.  
  951.    SYNOPSIS
  952.  
  953.         LT_Fixed2String(Fixed,String);
  954.                           D0    D1
  955.  
  956.         VOID LT_Fixed2String(FIXED,STRPTR);
  957.  
  958.    FUNCTION
  959.  
  960.         This routine implements a service similar to ftoa(). It converts
  961.         a fixed point number into an ASCII representation.
  962.  
  963.    INPUTS
  964.  
  965.         Fixed - Fixed point numeric value
  966.  
  967.         String - Buffer to receive the converted value. This buffer
  968.                  must be at least 12 bytes large.
  969.  
  970.    NOTES
  971.  
  972.         The decimal point will be taken from the current locale.
  973.         If locale.library is not installed in your system, the
  974.         `.' character will be used instead.
  975.  
  976.         The arguments are passed in D0 and D1, this is *not* a
  977.         typo.
  978.  
  979.    SEE ALSO
  980.  
  981.         gtlayout.library/LT_String2Fixed
  982. gtlayout.library/LT_FixedMult                    gtlayout.library/LT_FixedMult
  983.  
  984.    NAME
  985.  
  986.         LT_FixedMult -- Multiply a fixed-point number with an integer value.
  987.  
  988.    SYNOPSIS
  989.  
  990.         Fixed = LT_FixedMult(Fixed,Factor)
  991.           D0                   D0    D1
  992.  
  993.         FIXED LT_FixedMult(FIXED,ULONG);
  994.  
  995.    FUNCTION
  996.  
  997.         The layout engine provides only a fixed point multiplication
  998.         routine. You need to implement other numeric operations on
  999.         your own.
  1000.  
  1001.    INPUTS
  1002.  
  1003.         Fixed - Fixed-point number to be multiplied.
  1004.  
  1005.         Factor - Integer value to multiply fixed-point number
  1006.                  with.
  1007.  
  1008.    RESULT
  1009.  
  1010.         Fixed - Product
  1011. gtlayout.library/LT_GetAttributesA          gtlayout.library/LT_GetAttributesA
  1012.  
  1013.    NAME
  1014.  
  1015.         LT_GetAttributesA -- Inquire information on a gadget.
  1016.  
  1017.    SYNOPSIS
  1018.  
  1019.         Value = LT_GetAttributesA(Handle,ID,Tags);
  1020.           D0                        A0   D0  A1
  1021.  
  1022.         LONG LT_GetAttributesA(LayoutHandle *,LONG ID,struct TagItem *);
  1023.  
  1024.         Value = LT_GetAttributes(Handle,ID,...);
  1025.  
  1026.         LONG LT_GetAttributes(LayoutHandle *,LONG ID,...);
  1027.  
  1028.    FUNCTION
  1029.  
  1030.         All objects created by the user interface layout code posess
  1031.         certain unique properties. The LT_GetAttributes() function will
  1032.         will inquire this information and return it. The implementation
  1033.         differs from gadtools.library/GT_GetGadgetAttrs in that you
  1034.         can inquire only a small subset of the object properties possible
  1035.         via the taglist passed in.
  1036.  
  1037.    INPUTS
  1038.  
  1039.         Handle - Pointer to LayoutHandle structure.
  1040.  
  1041.         ID - ID number of the object to inquire information about. This
  1042.              is the same value you passed via LA_ID to LT_New() when
  1043.              you created this object.
  1044.  
  1045.         Tags - TagItem list to receive information about the object
  1046.                in question.
  1047.  
  1048.    TAGS
  1049.  
  1050.         LA_Left (LONG *) - Left edge of object.
  1051.  
  1052.         LA_Top (LONG *) - Top edge of object.
  1053.  
  1054.         LA_Width (LONG *) - Width of object.
  1055.  
  1056.         LA_Height (LONG *) - Height of object.
  1057.  
  1058.         LA_Chars (LONG *) - Width of object measured in character
  1059.            widths.
  1060.            (requires gtlayout.library v9 or higher)
  1061.  
  1062.         LA_Lines (LONG *) - Height of object measured in character
  1063.            heights.
  1064.            (requires gtlayout.library v9 or higher)
  1065.  
  1066.         LA_LabelLeft (LONG *) - Left edge of label text.
  1067.            (requires gtlayout.library v9 or higher)
  1068.  
  1069.         LA_LabelTop (LONG *) - Top edge of label text.
  1070.            (requires gtlayout.library v9 or higher)
  1071.  
  1072.    RESULT
  1073.  
  1074.         The result depends on the object type:
  1075.  
  1076.             VERTICAL_KIND:
  1077.             HORIZONTAL_KIND:
  1078.  
  1079.                 active page
  1080.  
  1081.             FRACTION_KIND:
  1082.  
  1083.                 current LAFC_Number value
  1084.  
  1085.             SCROLLER_KIND:
  1086.  
  1087.                 current GTSC_Top value
  1088.  
  1089.             TAPEDECK_KIND:
  1090.  
  1091.                 current LATD_Pressed value
  1092.  
  1093.             LEVEL_KIND:
  1094.  
  1095.                 current LAVL_Level state
  1096.  
  1097.             CHECKBOX_KIND:
  1098.  
  1099.                 current GTCB_Checked state
  1100.  
  1101.             LISTVIEW_KIND:
  1102.  
  1103.                 current GTLV_Selected state
  1104.  
  1105.             MX_KIND:
  1106.  
  1107.                 current GTMX_Active state
  1108.  
  1109.             CYCLE_KIND:
  1110.  
  1111.                 current GTCY_Active state
  1112.  
  1113.             PALETTE_KIND:
  1114.  
  1115.                 current GTPA_Color state
  1116.  
  1117.             SLIDER_KIND:
  1118.  
  1119.                 current GTSL_Level state
  1120.  
  1121.             GAUGE_KIND:
  1122.  
  1123.                 current LAGA_Percent state
  1124.  
  1125.             STRING_KIND:
  1126.  
  1127.                 pointer to current string
  1128.  
  1129.             PASSWORD_KIND:
  1130.  
  1131.                 pointer to current string
  1132.  
  1133.             INTEGER_KIND:
  1134.  
  1135.                 number currently entered
  1136. gtlayout.library/LT_GetCode                        gtlayout.library/LT_GetCode
  1137.  
  1138.    NAME
  1139.  
  1140.         LT_GetCode -- Easy raw key event to ANSI conversion.
  1141.  
  1142.    SYNOPSIS
  1143.  
  1144.         Key = LT_GetCode(Qualifier,Class,Code,Gadget);
  1145.          D0                  D0     D1    D2    A0
  1146.  
  1147.         WORD LT_GetCode(ULONG,ULONG,UWORD,struct Gadget *);
  1148.  
  1149.    FUNCTION
  1150.  
  1151.         The user interface layout engine can convert IDCMP_RAWKEY
  1152.         events into ANSI codes. Pass in the data you copied from
  1153.         the IntuiMessage here.
  1154.  
  1155.    INPUTS
  1156.  
  1157.         Qualifier - Copied from IntuiMessage->Qualifier
  1158.  
  1159.         Class - Copied from IntuiMessage->Class
  1160.  
  1161.         Code - Copied from IntuiMessage->Code
  1162.  
  1163.         Gadget - Copied from IntuiMessage->IAddress
  1164.  
  1165.    RESULT
  1166.  
  1167.         Key - ANSI code generated from the input data
  1168.               or -1 if no such code was to be generated.
  1169. gtlayout.library/LT_GetIMsg                        gtlayout.library/LT_GetIMsg
  1170.  
  1171.    NAME
  1172.  
  1173.         LT_GetIMsg -- Retrieve the next pending IntuiMessage
  1174.                       from the window associated with a
  1175.                       LayoutHandle.
  1176.  
  1177.    SYNOPSIS
  1178.  
  1179.         IntuiMessage = LT_GetIMsg(Handle);
  1180.              D0                     A0
  1181.  
  1182.         struct IntuiMessage *LT_GetIMsg(LayoutHandle *);
  1183.  
  1184.    FUNCTION
  1185.  
  1186.         This routine will handle most of the input loop for
  1187.         you. Just pass the pointer to the layout handle in,
  1188.         check if the result code is non-null, copy the data
  1189.         you need and reply the message via LT_ReplyIMsg().
  1190.  
  1191.         You will still need to wait for new input, as LT_GetIMsg
  1192.         will poll the MsgPort of the window.
  1193.  
  1194.    INPUTS
  1195.  
  1196.         Handle - Pointer to LayoutHandle structure
  1197.  
  1198.    RESULT
  1199.  
  1200.         IntuiMessage - Pointer to IntuiMessage structure
  1201.  
  1202.    NOTES
  1203.  
  1204.         You *must not* make any assumptions about the contents
  1205.         of the IntuiMessage structure except for the following
  1206.         entries:
  1207.  
  1208.            Class
  1209.            Code
  1210.            Qualifier
  1211.            IAddress
  1212.  
  1213.         When finished, you must dispose the IntuiMessage via
  1214.         LT_ReplyIMsg or memory will be lost which can never
  1215.         be reclaimed.
  1216.  
  1217.         DO NOT CALL LT_HandleInput() ON THE DATA YOU RECEIVE
  1218.         FROM LT_GetIMsg() AS LT_GetIMsg() ALREADY DOES ALL THE
  1219.         MAGIC LT_HandleInput() OTHERWISE WOULD NEED TO DO!
  1220.         IF YOU STILL DO CALL LT_HandleInput() ON THE DATA YOU
  1221.         WILL RECEIVE `GHOST' EVENTS.
  1222.  
  1223.    SEE ALSO
  1224.  
  1225.         gtlayout.library/LT_ReplyIMsg
  1226. gtlayout.library/LT_HandleInput                gtlayout.library/LT_HandleInput
  1227.  
  1228.    NAME
  1229.  
  1230.         LT_HandleInput -- Filter IntuiMessage data.
  1231.  
  1232.    SYNOPSIS
  1233.  
  1234.         LT_HandleInput(Handle,Qualifier,Class,Code,Gadget);
  1235.                          A0      A1      A2    A2    A3
  1236.  
  1237.         VOID LT_HandleInput(LayoutHandle *,ULONG,ULONG *,
  1238.                             UWORD *,struct Gadget **);
  1239.  
  1240.    FUNCTION
  1241.  
  1242.         In order to keep track of user interface actions, such as
  1243.         keys getting pressed, sliders getting moved, etc. your
  1244.         code is to call LT_HandleInput() with data copied from the
  1245.         IntuiMessage it has just received and replied.
  1246.  
  1247.         NOTE: do not call this routine before you have actually
  1248.               replied the IntuiMessage received or weird things
  1249.               may happen.
  1250.  
  1251.    INPUTS
  1252.  
  1253.         Handle - Pointer to a LayoutHandle structure.
  1254.  
  1255.         Qualifier - The Qualifier value copied from the
  1256.                     IntuiMessage structure.
  1257.  
  1258.         Class - Pointer to the ULONG variable which holds the
  1259.                 value copied from the Class entry of the
  1260.                 IntuiMessage structure.
  1261.  
  1262.         Code - Pointer to the UWORD variable which holds the
  1263.                value copied from the Code entry of the
  1264.                IntuiMessage structure.
  1265.  
  1266.         Gadget - Pointer to the Gadget value copied from the
  1267.                  IAddress entry of the IntuiMessage structure.
  1268.  
  1269.    EXAMPLE
  1270.  
  1271.         struct IntuiMessage *IntuiMessage;
  1272.         ULONG Qualifier,Class;
  1273.         UWORD Code;
  1274.         struct Gadget *Gadget;
  1275.  
  1276.         for(;;)
  1277.         {
  1278.             WaitPort(Window -> UserPort);
  1279.  
  1280.             while(IntuiMessage = GT_GetIMsg(Window -> UserPort))
  1281.             {
  1282.                 Class = IntuiMessage -> Class;
  1283.                 Code = IntuiMessage -> Code;
  1284.                 Qualifier = IntuiMessage -> Qualifier;
  1285.                 Gadget = IntuiMessage -> Gadget;
  1286.  
  1287.                 GT_ReplyIMsg(IntuiMessage);
  1288.  
  1289.                 LT_HandleInput(Handle,Qualifier,&Class,&Code,&Gadget);
  1290.             }
  1291.         }
  1292.  
  1293.    RESULT
  1294.  
  1295.         none
  1296. gtlayout.library/LT_Init                              gtlayout.library/LT_Init
  1297.  
  1298.    NAME
  1299.  
  1300.         LT_Init -- Initialize user interface code.
  1301.  
  1302.    SYNOPSIS
  1303.  
  1304.         LT_Init();
  1305.  
  1306.         VOID LT_Init(VOID);
  1307.  
  1308.    FUNCTION
  1309.  
  1310.         You need to initialize the user interface code only once,
  1311.         so it can set up its internals, open libraries, etc.
  1312.         The code has to be initialized before any user interface
  1313.         creation can take place.
  1314.  
  1315.    INPUTS
  1316.  
  1317.         none
  1318.  
  1319.    RESULT
  1320.  
  1321.         none
  1322.  
  1323.    NOTES
  1324.  
  1325.         This routine is available in the link library only.
  1326. gtlayout.library/LT_LabelChars                  gtlayout.library/LT_LabelChars
  1327.  
  1328.    NAME
  1329.  
  1330.         LT_LabelChars -- Calculate the width of a a string
  1331.                          according to the user interface font
  1332.                          associated with a LayoutHandle.
  1333.  
  1334.    SYNOPSIS
  1335.  
  1336.         Length = LT_LabelChars(Handle,Label);
  1337.           D0                     A0    A1
  1338.  
  1339.         LONG LT_LabelChars(struct LayoutHandle *,STRPTR);
  1340.  
  1341.    FUNCTION
  1342.  
  1343.         Calculates the width of a string according to the user
  1344.         interface font used. The width is then converted to a number
  1345.         of characters suitable for using with the LA_Chars tag
  1346.         item when calling LT_New().
  1347.  
  1348.    INPUTS
  1349.  
  1350.         Handle - Pointer to LayoutHandle structure.
  1351.  
  1352.         Label - Pointer to string.
  1353.  
  1354.    RESULT
  1355.  
  1356.         Length - Number of characters that are considered
  1357.             equivalent to the string length in pixels.
  1358. gtlayout.library/LT_LabelWidth                  gtlayout.library/LT_LabelWidth
  1359.  
  1360.    NAME
  1361.  
  1362.         LT_LabelWidth -- Calculate the width of a string according
  1363.                          to the user interface font used.
  1364.  
  1365.    SYNOPSIS
  1366.  
  1367.         Width = LT_LabelWidth(Handle,Label);
  1368.           D0                    A0    A1
  1369.  
  1370.         LONG LT_LabelWidth(LayoutHandle *,STRPTR);
  1371.  
  1372.    FUNCTION
  1373.  
  1374.         This routine calculates the width of strings in
  1375.         terms of pixels according to the user interface
  1376.         font associated with the LayoutHandle.
  1377.  
  1378.    INPUTS
  1379.  
  1380.         Handle - Pointer to LayoutHandle structure.
  1381.  
  1382.    RESULT
  1383.  
  1384.         Width - Width of the text string in pixels.
  1385. gtlayout.library/LT_LayoutMenusA              gtlayout.library/LT_LayoutMenusA
  1386.  
  1387.    NAME
  1388.  
  1389.         LT_LayoutMenusA -- Create a menu according to a template.
  1390.  
  1391.    SYNOPSIS
  1392.  
  1393.         Menu = LT_LayoutMenusA(Handle,Template,Tags);
  1394.          D0                      A0     A1      A2
  1395.  
  1396.         struct Menu *LT_LayoutMenusA(LayoutHandle *,struct NewMenu *,struct TagItem *);
  1397.  
  1398.         Menu = LT_LayoutMenus(Handle,Template,...);
  1399.  
  1400.         struct Menu *LT_LayoutMenus(LayoutHandle *,struct NewMenu *,...);
  1401.  
  1402.    FUNCTION
  1403.  
  1404.         Unlike the corresponding routines in gadtools.library
  1405.         LT_LayoutMenusA() will both create and layout a menu.
  1406.         Also included is locale support.
  1407.  
  1408.    INPUTS
  1409.  
  1410.         Handle - Pointer to LayoutHandle structure.
  1411.  
  1412.         Template - Address of a ready-to-use NewMenu table to
  1413.             create the menu from.
  1414.  
  1415.         Tags - Tagitem list to control menu attributes
  1416.  
  1417.    TAGS
  1418.  
  1419.         LAMN_FirstLabel (LONG) - Locale ID of the first string to
  1420.             use as a menu title/item/subitem label. This tag
  1421.             works in conjunction with LA_LastLabel.
  1422.  
  1423.         LAMN_LastLabel (LONG) - Locale ID of the last string to
  1424.             use as a menu title/item/subitem label. This tag
  1425.             works in conjunction with LA_FirstLabel. The code
  1426.             will loop through FirstLabel..LastLabel and assign
  1427.             the corresponding locale text for each ID to the
  1428.             NewMenu.nm_Label entries. Labels which are already
  1429.             initialized with NM_BARLABEL are skipped.
  1430.  
  1431.         LAMN_LabelTable (LONG *) - Pointer to an array of IDs
  1432.             to use for building the menu labels. This requires
  1433.             that a locale hook is provided with the layout handle.
  1434.             The array is terminated by -1.
  1435.  
  1436.    NOTES
  1437.  
  1438.         If you created the LayoutHandle with the LH_MenuGlyphs,TRUE
  1439.         attribute, the menu will use the scaled menu glyphs.
  1440.  
  1441.    RESULT
  1442.  
  1443.         Menu - Pointer to a Menu structure. You can free this
  1444.                using gadtools.library/FreeMenus().
  1445. gtlayout.library/LT_LevelWidth                   gtlayout.library/LT_LevelWidth
  1446.  
  1447.    NAME
  1448.  
  1449.         LT_LevelWidth -- Determine the maximum width of a SLIDER_KIND
  1450.                          level string.
  1451.  
  1452.    SYNOPSIS
  1453.  
  1454.         Index = LT_LevelWidth(Handle,FormatString,DispFunc,Min,Max,MaxWidth,
  1455.           D0                    A0        A1         A2     D0  D1    A3
  1456.  
  1457.                                   MaxLen,FullCheck);
  1458.                                     A5      D2
  1459.  
  1460.         LONG LT_LevelWidth(LayoutHandle *,STRPTR,
  1461.                            LONG (*)(struct Gadget *,WORD),LONG,LONG,LONG *,
  1462.                            LONG *,BOOL);
  1463.  
  1464.    FUNCTION
  1465.  
  1466.         In order to make room for the level text displayed by a
  1467.         SLIDER_KIND object one needs to know how much space the
  1468.         longest level string will occupy. Otherwise, the level
  1469.         text may overwrite the gadget label text or the slider
  1470.         container. This routine will rattle through all possible
  1471.         slider settings (as given via the Min and the Max
  1472.         level values) and determine the longest label string
  1473.         according to the font used.
  1474.  
  1475.    INPUTS
  1476.  
  1477.         Handle - Pointer to a LayoutHandle structure, as returned by
  1478.                  a call to LT_CreateHandleTags().
  1479.  
  1480.         FormatString - The sprintf() style formatting string to be used
  1481.                        to format the slider level settings into text.
  1482.                        This is the same string you would pass in via
  1483.                        the GTSL_LevelFormat tag when creating the
  1484.                        slider object.
  1485.                        Default: "%lD" for systems which have locale.library
  1486.                                 installed, "%ld" otherwise.
  1487.  
  1488.         DispFunc - A pointer to the function to filter the slider level
  1489.                    values. The result of this function will then be
  1490.                    used to format a string into the slider level text.
  1491.                    This is the same parameter you would pass in via
  1492.                    the GTSL_DispFunc tag when creating the slider
  1493.                    object.
  1494.  
  1495.                    NOTE: the routine will be called with a NULL Gadget
  1496.                          parameter, make sure your code will handle
  1497.                          this nicely.
  1498.  
  1499.                    Default: no display function
  1500.  
  1501.         Min - The smallest value the slider can be set to. This is
  1502.               same value you would pass in via GTSL_Min when creating
  1503.               the slider object.
  1504.  
  1505.         Max - The largest value the slider can be set to. This is
  1506.               same value you would pass in via GTSL_Max when creating
  1507.               the slider object.
  1508.  
  1509.         MaxWidth - Pointer to a place to store the width of the
  1510.                    longest level string in pixels. If you pass
  1511.                    in NULL instead of the address of a variable
  1512.                    no harm will be done.
  1513.  
  1514.         MaxLen - Pointer to a place to store the length of the
  1515.                  longest level string in characters. If you pass
  1516.                  in NULL instead of the address of a variable
  1517.                  no harm will be done.
  1518.  
  1519.  
  1520.         FullCheck - TRUE will cause the code to rattle through all
  1521.                     possible slider settings, starting from the
  1522.                     minimum value, ending at the maximum value.
  1523.                     While this may be a good idea for a display
  1524.                     function to map slider levels to text strings
  1525.                     of varying length it might be a problem when
  1526.                     it comes to display a range of numbers from
  1527.                     1 to 40,000: the code will loop through
  1528.                     40,000 iterations trying to find the longest
  1529.                     string.
  1530.  
  1531.                     FALSE will cause the code to calculate the
  1532.                     longest level string based only on the
  1533.                     minimum and the maximum value to check.
  1534.                     While this is certainly a good a idea when
  1535.                     it comes to display a range of numbers from
  1536.                     1 to 40,000 as only two values will be
  1537.                     checked the code may fail to produce
  1538.                     accurate results for sliders using display
  1539.                     functions mapping slider levels to strings.
  1540.  
  1541.     RESULT
  1542.  
  1543.         Index - The slider level which gives the longest
  1544.                 level string.
  1545. gtlayout.library/LT_LockWindow                  gtlayout.library/LT_LockWindow
  1546.  
  1547.    NAME
  1548.  
  1549.         LT_LockWindow -- Block user access to a window.
  1550.  
  1551.    SYNOPSIS
  1552.  
  1553.         LT_LockWindow(Window);
  1554.                         A0
  1555.  
  1556.         VOID LT_LockWindow(struct Window *);
  1557.  
  1558.    FUNCTION
  1559.  
  1560.         The window will get a wait mouse pointer attached and a blank
  1561.         Requester, preventing any user gadgets from getting used. The
  1562.         window minimum and maximum sizes are set to the current window
  1563.         size so the user will be unable to resize the window or click
  1564.         on the zoom gadget.
  1565.         This routine nests, multiple calls to LT_LockWindow() using the
  1566.         same window will increment a usage counter, so exactly the
  1567.         same number of calls to LT_UnlockWindow() will be required to
  1568.         unlock the window.
  1569.  
  1570.    INPUTS
  1571.  
  1572.         Window - Pointer to window structure.
  1573.  
  1574.    RESULT
  1575.  
  1576.         none
  1577.  
  1578.    NOTES
  1579.  
  1580.          Do not close the window you have locked unless all the
  1581.          outstanding locks are freed or memory will be lost which
  1582.          can never be reclaimed.
  1583. gtlayout.library/LT_NewA                              gtlayout.library/LT_NewA
  1584.  
  1585.    NAME
  1586.  
  1587.         LT_NewA -- Add a new object to the user interface tree.
  1588.  
  1589.    SYNOPSIS
  1590.  
  1591.         LT_NewA(Handle,Tags);
  1592.                  A0    A1
  1593.  
  1594.         VOID LT_NewA(LayoutHandle *,struct TagItem *);
  1595.  
  1596.         LT_New(Handle,...);
  1597.  
  1598.         VOID LT_New(LayoutHandle *,...);
  1599.  
  1600.    FUNCTION
  1601.  
  1602.         LT_NewA() is the routine you use to build the user interface,
  1603.         you give layout directions, design groups, etc. and finally
  1604.         call LT_BuildA() to turn these specifications into a window.
  1605.  
  1606.    INPUTS
  1607.  
  1608.         Handle - Pointer to LayoutHandle structure.
  1609.  
  1610.    TAGS
  1611.  
  1612.         This routine will accept almost all create-time tag items
  1613.         gadtools.library/CreateGadget will handle. In addition to
  1614.         this there are a bunch of extra gadget objects and extra
  1615.         tag items supported:
  1616.  
  1617.         All object types:
  1618.  
  1619.             LA_Type (LONG) - Type of the object to create, must be
  1620.                              one of the following:
  1621.  
  1622.                                  TEXT_KIND
  1623.                                  VERTICAL_KIND
  1624.                                  HORIZONTAL_KIND
  1625.                                  END_KIND
  1626.                                  FRAME_KIND
  1627.                                  BOX_KIND
  1628.                                  SLIDER_KIND
  1629.                                  LISTVIEW_KIND
  1630.                                  INTEGER_KIND
  1631.                                  STRING_KIND
  1632.                                  PASSWORD_KIND
  1633.                                  PALETTE_KIND
  1634.                                  BUTTON_KIND
  1635.                                  CHECKBOX_KIND
  1636.                                  NUMBER_KIND
  1637.                                  GAUGE_KIND
  1638.                                  CYCLE_KIND
  1639.                                  MX_KIND
  1640.                                  XBAR_KIND
  1641.                                  YBAR_KIND
  1642.                                  FRACTION_KIND
  1643.                                  TAPEDECK_KIND
  1644.                                  LEVEL_KIND
  1645.  
  1646.             LA_LabelText (STRPTR) - The object label text to use.
  1647.  
  1648.             LA_LabelID (LONG) - The locale text ID of the string to
  1649.                                 use as the object label text.
  1650.  
  1651.                                 NOTE: LT_NewA() will fail if you forget
  1652.                                       to select a hook with LH_LocaleHook
  1653.                                       at LT_CreateHandleTagList.
  1654.  
  1655.             LA_ID (LONG) - The gadget ID to use for this object.
  1656.  
  1657.                            NOTE: User ID values *MUST* be greater than 0,
  1658.                                  negative values are reserved for internal
  1659.                                  use.
  1660.  
  1661.             LA_Chars (LONG) - The width of this object measured in
  1662.                 characters. If each character of the user interface
  1663.                 font is 8 pixels wide an object with LA_Chars set to
  1664.                 10 will usually be 80 pixels wide.
  1665.  
  1666.             LA_LabelChars (LONG) - This forces the internal gadget
  1667.                 label width the layout engine calculates during the
  1668.                 layout pass to a specific value. Note: this does
  1669.                 not work well with all objects.
  1670.  
  1671.                 (requires gtlayout.library v9 or higher)
  1672.  
  1673.             LA_LabelPlace (LONG) - Where to place the gadget label.
  1674.                 Not all objects will support all label positions:
  1675.  
  1676.                     PLACE_LEFT - Place label text left of object
  1677.                     PLACE_RIGHT - Place label text right of object
  1678.                     PLACE_ABOVE - Place label text above object
  1679.                     PLACE_IN - Place label text in object
  1680.                     PLACE_BELOW - Place label text below object
  1681.  
  1682.             LA_ExtraSpace (BOOL) - Add extra vertical/horizontal
  1683.                 space before this object.
  1684.                 Default: FALSE
  1685.  
  1686.             LA_ExtraFat (BOOL) - Make this object a bit larger
  1687.                 than its usual size.
  1688.                 Default: FALSE
  1689.  
  1690.             LA_NoKey (BOOL) - Don't let the user interface choose
  1691.                 a keyboard shortcut for this object.
  1692.                 Default: FALSE
  1693.  
  1694.             LA_HighLabel (BOOL) - Use highlight pen when rendering
  1695.                 the gadget label text.
  1696.                 Default: FALSE
  1697.  
  1698.             LA_BYTE (BYTE *) - Pointer to the variable that holds
  1699.                 the "current value" of the object. The layout engine
  1700.                 will retrieve this value initially during the creation
  1701.                 of the object and maintain it during its lifespan.
  1702.                 This means you do not need to worry about checking
  1703.                 the state of the object, the user interface layout
  1704.                 engine will do it for you.
  1705.  
  1706.             LA_UBYTE (UBYTE *) - Pointer to the variable that holds
  1707.                 the "current value" of the object. The layout engine
  1708.                 will retrieve this value initially during the creation
  1709.                 of the object and maintain it during its lifespan.
  1710.                 This means you do not need to worry about checking
  1711.                 the state of the object, the user interface layout
  1712.                 engine will do it for you.
  1713.  
  1714.             LA_WORD (WORD *) - Pointer to the variable that holds
  1715.                 the "current value" of the object. The layout engine
  1716.                 will retrieve this value initially during the creation
  1717.                 of the object and maintain it during its lifespan.
  1718.                 This means you do not need to worry about checking
  1719.                 the state of the object, the user interface layout
  1720.                 engine will do it for you.
  1721.  
  1722.             LA_UWORD (UWORD *) - Pointer to the variable that holds
  1723.                 the "current value" of the object. The layout engine
  1724.                 will retrieve this value initially during the creation
  1725.                 of the object and maintain it during its lifespan.
  1726.                 This means you do not need to worry about checking
  1727.                 the state of the object, the user interface layout
  1728.                 engine will do it for you.
  1729.  
  1730.             LA_BOOL (BOOL *) - Pointer to the variable that holds
  1731.                 the "current value" of the object. The layout engine
  1732.                 will retrieve this value initially during the creation
  1733.                 of the object and maintain it during its lifespan.
  1734.                 This means you do not need to worry about checking
  1735.                 the state of the object, the user interface layout
  1736.                 engine will do it for you.
  1737.  
  1738.             LA_LONG (LONG *) - Pointer to the variable that holds
  1739.                 the "current value" of the object. The layout engine
  1740.                 will retrieve this value initially during the creation
  1741.                 of the object and maintain it during its lifespan.
  1742.                 This means you do not need to worry about checking
  1743.                 the state of the object, the user interface layout
  1744.                 engine will do it for you.
  1745.  
  1746.             LA_ULONG (ULONG *) - Pointer to the variable that holds
  1747.                 the "current value" of the object. The layout engine
  1748.                 will retrieve this value initially during the creation
  1749.                 of the object and maintain it during its lifespan.
  1750.                 This means you do not need to worry about checking
  1751.                 the state of the object, the user interface layout
  1752.                 engine will do it for you.
  1753.  
  1754.             LA_STRPTR (STRPTR) - Pointer to the variable that holds
  1755.                 the "current value" of the object. The layout engine
  1756.                 will retrieve this value initially during the creation
  1757.                 of the object and maintain it during its lifespan.
  1758.                 This means you do not need to worry about checking
  1759.                 the state of the object, the user interface layout
  1760.                 engine will do it for you.
  1761.  
  1762.             LA_FRACTION (FRACTION *) - Pointer to the variable that holds
  1763.                 the "current value" of the object. The layout engine
  1764.                 will retrieve this value initially during the creation
  1765.                 of the object and maintain it during its lifespan.
  1766.                 This means you do not need to worry about checking
  1767.                 the state of the object, the user interface layout
  1768.                 engine will do it for you.
  1769.  
  1770.             TEXT_KIND:
  1771.  
  1772.                 LATX_Picker (BOOL) - Attach a `select' button to the
  1773.                     right hand side of the text display.
  1774.                     Default: FALSE
  1775.  
  1776.  
  1777.             VERTICAL_KIND (group to align objects vertically):
  1778.             HORIZONTAL_KIND (group to align objects horizontally):
  1779.  
  1780.                 LAGR_Spread (BOOL) - Place all objects in this
  1781.                     group with roughly the same amount of space
  1782.                     between them.
  1783.                     Default: FALSE
  1784.  
  1785.                 LAGR_SameSize (BOOL) - Make all objects in this
  1786.                     group the same size (for vertical groups:
  1787.                     the same height, for horizontal groups:
  1788.                     the same width).
  1789.                     Default: FALSE
  1790.  
  1791.                 LAGR_LastAttributes (BOOL) - Try to copy the
  1792.                     size of the previous group for this new
  1793.                     group. May not work if this group turns
  1794.                     out to be larger than the previous group.
  1795.                     Default: FALSE
  1796.  
  1797.                 LAGR_ActivePage (LONG) - Organize all child
  1798.                     groups as pages which can be flipped through
  1799.                     using LT_SetAttributes(). You need to
  1800.                     specify the number of the first page to
  1801.                     display, starting from 0.
  1802.  
  1803.                     NOTE: Specifying this tag actually enables
  1804.                           the paging feature. If you omit this
  1805.                           tag calls to flip to a specific
  1806.                           page will fail.
  1807.  
  1808.                     Default: No paging
  1809.  
  1810.                 LAGR_Frame (BOOL) - Draw a recessed frame around
  1811.                     this group, even if there is no group label.
  1812.                     (requires gtlayout.library v7 or higher)
  1813.  
  1814.  
  1815.             FRAME_KIND (fixed size general purpose display,
  1816.                 you may render into it):
  1817.  
  1818.                 LAFR_InnerWidth (LONG) - Inner width of the
  1819.                     display box.
  1820.  
  1821.                 LAFR_InnerHeight (LONG) - Inner height of the
  1822.                     display box.
  1823.  
  1824.                 LAFR_DrawBox (BOOL) - Draw a recessed bevel box
  1825.                     around the display box.
  1826.                     Default: FALSE
  1827.  
  1828.                 LAFR_RefreshHook (struct Hook *) - Hook to call
  1829.                     when refreshing/redrawing this object. See
  1830.                     gtlayout.h for more information.
  1831.                     (requires gtlayout.library v9 or higher)
  1832.  
  1833.  
  1834.             XBAR_KIND (horizontal separator bar):
  1835.  
  1836.                 LAXB_FullSize (BOOL) - Make this separator bar span
  1837.                     the entire window width.
  1838.  
  1839.  
  1840.             BOX_KIND (multiline text display):
  1841.  
  1842.                 LABX_Labels (STRPTR *) - The label texts to display
  1843.                     on the right hand side of the box. Terminate
  1844.                     this array with NULL.
  1845.  
  1846.                 LABX_Lines (STRPTR *) - The text to display in the
  1847.                     box. Terminate this array with NULL.
  1848.  
  1849.                 LABX_Rows (LONG) - The width of this object in
  1850.                     characters. The layout routine will try to make
  1851.                     sure that the given number of characters will
  1852.                     fit into a single line of text in this box.
  1853.                     This may be a problem with proportional spaced
  1854.                     fonts.
  1855.  
  1856.                 LABX_AlignText (LONG) - Controls how text is aligned
  1857.                     in box lines:
  1858.  
  1859.                         ALIGNTEXT_LEFT - Align text to the left edge
  1860.                         ALIGNTEXT_CENTERED - Centre the text
  1861.                         ALIGNTEXT_RIGHT - Align text to the right edge
  1862.                         ALIGNTEXT_PAD - Pad text lines
  1863.  
  1864.                     Default: ALIGNTEXT_LEFT
  1865.  
  1866.                 LABX_DrawBox (BOOL) - Draw a recessed bevel box
  1867.                     around the text box.
  1868.                     Default: FALSE
  1869.  
  1870.                 LABX_FirstLabel (LONG) - Locale string ID of the first
  1871.                     text to use as a box label. Works in conjunction
  1872.                     with LABX_LastLabel.
  1873.  
  1874.                 LABX_LastLabel (LONG) - Locale string ID of the last
  1875.                     text to use as a box label. Works in conjunction
  1876.                     with LABX_FirstLabel. When building the interface the
  1877.                     code will loop from FirstLabel..LastLabel, look
  1878.                     up the corresponding locale strings and use the
  1879.                     data to make up the label text to appear at the
  1880.                     right hand side of the box.
  1881.  
  1882.                 LABX_LabelTable (LONG *) - Pointer to an array of IDs
  1883.                     to use for building the box labels. This requires
  1884.                     that a locale hook is provided with the layout handle.
  1885.                     The array is terminated by -1.
  1886.  
  1887.                 LABX_ReserveSpace (BOOL) - Allocate extra memory to hold
  1888.                     the contents of the lines displayed. This avoids nasty
  1889.                     side-effects when refreshing this object.
  1890.                     Default: FALSE
  1891.  
  1892.             FRACTION_KIND:
  1893.  
  1894.                 LAFC_MaxChars (LONG) - Maximum number of characters to
  1895.                     fit into the entry field.
  1896.                     Default: 16
  1897.  
  1898.                 LAFC_Number (FIXED) - Fixed point number to use for
  1899.                     this object.
  1900.                     Default: 0.0
  1901.  
  1902.                 LAFC_LastGadget (BOOL) - When cycling through the
  1903.                     text entry fields, stop cycling after leaving
  1904.                     this object.
  1905.                     Default: FALSE
  1906.  
  1907.                 LAFC_Min (FIXED) - Minimum value allowed for this
  1908.                     object.
  1909.  
  1910.                 LAFC_Max (FIXED) - Maximum value allowed for this
  1911.                     object.
  1912.  
  1913.                 LAFC_HistoryLines (LONG) - Maximum number of entries
  1914.                     to keep as a backlog.
  1915.                     Default: 0
  1916.  
  1917.                 LAFC_HistoryHook (struct Hook *) - Hook code to call
  1918.                     when entering a number into the backlog. See
  1919.                     gtlayout.h for more information.
  1920.                     Default: NULL
  1921.  
  1922.             SLIDER_KIND:
  1923.  
  1924.                 LASL_FullCheck: TRUE will cause the code to rattle
  1925.                     through all possible slider settings, starting
  1926.                     from the minimum value, ending at the maximum value.
  1927.                     While this may be a good idea for a display
  1928.                     function to map slider levels to text strings
  1929.                     of varying length it might be a problem when
  1930.                     it comes to display a range of numbers from
  1931.                     1 to 40,000: the code will loop through
  1932.                     40,000 iterations trying to find the longest
  1933.                     string.
  1934.  
  1935.                     FALSE will cause the code to calculate the
  1936.                     longest level string based only on the
  1937.                     minimum and the maximum value to check.
  1938.                     While this is certainly a good a idea when
  1939.                     it comes to display a range of numbers from
  1940.                     1 to 40,000 as only two values will be
  1941.                     checked the code may fail to produce
  1942.                     accurate results for sliders using display
  1943.                     functions mapping slider levels to strings.
  1944.  
  1945.                     Default: TRUE
  1946.  
  1947.             LEVEL_KIND:
  1948.  
  1949.                 All tags are supported which SLIDER_KIND supports.
  1950.                 The gadget level display however, can only be aligned
  1951.                 to the left border.
  1952.  
  1953.             LISTVIEW_KIND:
  1954.  
  1955.                 LALV_ExtraLabels (STRPTR *) - Place extra line
  1956.                     labels at the right of the box. Terminate
  1957.                     this array with NULL.
  1958.  
  1959.                 LALV_Labels (STRPTR *) - The labels to display
  1960.                     inside the box, you can pass this array of
  1961.                     strings in rather than passing an initialized
  1962.                     List of text via GTLV_Labels. Terminate
  1963.                     this array with NULL.
  1964.  
  1965.                 LALV_CursorKey (BOOL) - Let the user operate this
  1966.                     listview using the cursor keys.
  1967.  
  1968.                     NOTE: there can be only one single listview
  1969.                           per window to sport this feature.
  1970.  
  1971.                     Default: FALSE
  1972.  
  1973.                 LALV_Lines (LONG) - The number of text lines this
  1974.                     listview is to display.
  1975.  
  1976.                 LALV_Link (LONG) - The Gadget ID of a string gadget
  1977.                     to attach to this listview. NOTE: you need to
  1978.                     add the Gadget in question before you add the
  1979.                     listview to refer to it or the layout routine
  1980.                     will get confused.
  1981.                     Passing the value NIL_LINK will create a listview
  1982.                     which displays the currently selected item, otherwise
  1983.                     you will get a read-only list.
  1984.  
  1985.                 LALV_FirstLabel (LONG) - Locale string ID of the first
  1986.                     text to use as a list label. Works in conjunction
  1987.                     with LALV_LastLabel.
  1988.  
  1989.                 LALV_LastLabel (LONG) - Locale string ID of the last
  1990.                     text to use as a list label. Works in conjunction
  1991.                     with LALV_FirstLabel. When building the interface the
  1992.                     code will loop from FirstLabel..LastLabel, look
  1993.                     up the corresponding locale strings and use the
  1994.                     data to make up the label text to appear in the
  1995.                     list.
  1996.  
  1997.                 LALV_LabelTable (LONG *) - Pointer to an array of IDs
  1998.                     to use for building the listview contents. This requires
  1999.                     that a locale hook is provided with the layout handle.
  2000.                     The array is terminated by -1.
  2001.  
  2002.                 LALV_MaxGrowX (LONG) - Maximum width of this object
  2003.                     measured in characters. When the first layout pass
  2004.                     is finished and there is still enough space left
  2005.                     to make the listview wider, the width is increased
  2006.                     until it hits the limit specified using this tag.
  2007.  
  2008.                     NOTE: there can be only one single listview
  2009.                           per window to sport this feature.
  2010.  
  2011.                     Default: 0
  2012.  
  2013.                 LALV_MaxGrowY (LONG) - Maximum height of this object
  2014.                     measured in lines. When the first layout pass is
  2015.                     finished and there is till enough space left to
  2016.                     make the listview higher, the height is increased
  2017.                     until it hits the limit specified using this tag.
  2018.  
  2019.                     NOTE: there can be only one single listview
  2020.                           per window to sport this feature.
  2021.  
  2022.                     Default: 0
  2023.  
  2024.                 LALV_ResizeX (BOOL) - Makes this listview resizable
  2025.                     in the horizontal direction, attaches a sizing
  2026.                     gadget to the window to open and handles window
  2027.                     resize operations automatically.
  2028.                     (requires gtlayout.library v9 or higher)
  2029.  
  2030.                     NOTE: there can be only one single listview
  2031.                           per window to sport this feature.
  2032.  
  2033.                           Also listen to IDCMP_CLOSEWINDOW events
  2034.                           which may be generated if the layout
  2035.                           engine runs out of memory when rebuilding
  2036.                           the user interface.
  2037.  
  2038.                     Default: FALSE
  2039.  
  2040.                 LALV_ResizeY (BOOL) - Makes this listview resizable
  2041.                     in the vertical direction, attaches a sizing
  2042.                     gadget to the window to open and handles window
  2043.                     resize operations automatically.
  2044.                     (requires gtlayout.library v9 or higher)
  2045.  
  2046.                     NOTE: there can be only one single listview
  2047.                           per window to sport this feature.
  2048.  
  2049.                           Also listen to IDCMP_CLOSEWINDOW events
  2050.                           which may be generated if the layout
  2051.                           engine runs out of memory when rebuilding
  2052.                           the user interface.
  2053.  
  2054.                     Default: FALSE
  2055.  
  2056.                 LALV_MinChars (WORD) - Minimum width for this
  2057.                     object, measured in characters. Used in
  2058.                     conjunction with LALV_ResizeX.
  2059.                     (requires gtlayout.library v9 or higher)
  2060.  
  2061.                 LALV_MinLines (WORD) - Minimum height for this
  2062.                     object, measured in lines. Used in
  2063.                     conjunction with LALV_ResizeY.
  2064.                     (requires gtlayout.library v9 or higher)
  2065.  
  2066.                 LALV_LockSize (BOOL) - After doing the initial layout
  2067.                     for this object, do not adapt its size again during
  2068.                     subsequent layouts. This is particularly useful if
  2069.                     you have a LISTVIEW_KIND object in a paged group
  2070.                     and keep adding new entries to the list. You need
  2071.                     to specify an object width using LA_Chars, otherwise
  2072.                     the layout engine may make it not wide enough to
  2073.                     display any entries.
  2074.                     (requires gtlayout.library v8 or higher)
  2075.  
  2076.                 LALV_FlushLabelLeft (BOOL) - For a gadget label placed
  2077.                     above the listview align the text to the left edge
  2078.                     of the view.
  2079.                     (requires gtlayout.library v9 or higher)
  2080.  
  2081.  
  2082.             INTEGER_KIND:
  2083.  
  2084.                 LAIN_LastGadget (BOOL) - Pressing return with this
  2085.                     gadget active will stop activating the next
  2086.                     following string gadget type if TRUE is passed.
  2087.                     Default: FALSE
  2088.  
  2089.                 LAIN_Min (LONG) - Minimum accepted numeric value.
  2090.                     Default: -2147483647
  2091.  
  2092.                 LAIN_Max (LONG) - Maximum accepted numeric value.
  2093.                     Default:  2147483647
  2094.  
  2095.                 LAIN_UseIncrementers (BOOL) - Use TRUE to add incrementer
  2096.                     arrow buttons to the right of the numeric entry field.
  2097.                     These buttons will let you cycle through a set of
  2098.                     numbers to be displayed in the numeric entry field.
  2099.                     Default: FALSE
  2100.  
  2101.                 LAIN_HistoryLines (LONG) - Number of numbers entered to
  2102.                     keep as a backlog.
  2103.                     Default: 0
  2104.  
  2105.                 LAIN_HistoryHook (struct Hook *) - Hook code to call when
  2106.                     entering a number into the backlog. See gtlayout.h for
  2107.                     more information.
  2108.                     Default: NULL
  2109.  
  2110.                 LAIN_IncrementerHook (struct Hook *) - Hook code to call
  2111.                     when cycling through numeric values. See gtlayout.h for
  2112.                     more information.
  2113.                     Default: NULL
  2114.  
  2115.  
  2116.             STRING_KIND:
  2117.  
  2118.                 LAST_LastGadget (BOOL) - Pressing return with this
  2119.                     gadget active will stop activating the next
  2120.                     following string gadget type if TRUE is passed.
  2121.                     Default: FALSE
  2122.  
  2123.                 LAST_Link (LONG) - Gadget ID of the listview to attach
  2124.                     this string gadget to. NOTE: you need to
  2125.                     add the string gadget before you add the
  2126.                     listview to refer to it or the layout routine
  2127.                     will get confused.
  2128.  
  2129.                 LAST_Picker (BOOL) - Attach a `select' button to the
  2130.                     right hand side of the string gadget.
  2131.                     Default: FALSE
  2132.  
  2133.                 LAST_HistoryLines (LONG) - Number of lines to keep as
  2134.                     a backlog.
  2135.                     Default: 0
  2136.  
  2137.                 LAST_HistoryHook (struct Hook *) - Hook code to call
  2138.                     when entering a line into the backlog. See gtlayout.h
  2139.                     for more information.
  2140.                     Default: NULL
  2141.  
  2142.  
  2143.             PASSWORD_KIND (string gadget type which does not
  2144.                 display its contents):
  2145.  
  2146.                 LAPW_LastGadget (BOOL) - Pressing return with this
  2147.                     gadget active will stop activating the next
  2148.                     following string gadget type if TRUE is passed.
  2149.                     Default: FALSE
  2150.  
  2151.                 LAPA_HistoryLines (LONG) - Number of lines to keep as
  2152.                     a backlog.
  2153.                     Default: 0
  2154.  
  2155.                 LAPA_HistoryHook (struct Hook *) - Hook code to call
  2156.                     when entering a line into the backlog. See gtlayout.h
  2157.                     for more information.
  2158.                     Default: NULL
  2159.  
  2160.                 This object type accepts all the GTST_#? tag items.
  2161.  
  2162.  
  2163.             PALETTE_KIND:
  2164.  
  2165.                 LAPA_SmallPalette (BOOL) - Make the palette display
  2166.                     a bit smaller than usual.
  2167.                     Default: FALSE
  2168.  
  2169.                 LAPA_Lines (LONG) - Number of lines the palette
  2170.                     display should cover.
  2171.                     Default: No preference
  2172.  
  2173.  
  2174.             BUTTON_KIND:
  2175.  
  2176.                 LABT_ReturnKey (BOOL) - Let the user operate this
  2177.                     button by pressing the return key. There will
  2178.                     be a recessed bevel box drawn around the button
  2179.                     to indicate this special feature.
  2180.  
  2181.                     NOTE: there can be only one single button per
  2182.                     window to sport this feature.
  2183.  
  2184.                     Default: FALSE
  2185.  
  2186.                 LABT_EscKey (BOOL) - Let the user operate this
  2187.                     button by pressing the Escape key.
  2188.  
  2189.                     NOTE: there can be only one single button per
  2190.                     window to use this feature.
  2191.  
  2192.                     Default: FALSE
  2193.  
  2194.                 LABT_ExtraFat (BOOL) - Make this button a bit
  2195.                     larger than usual.
  2196.                     Default: FALSE
  2197.  
  2198.  
  2199.             GAUGE_KIND (general purpose progress report display):
  2200.  
  2201.                 LAGA_Percent (LONG) - Indicator position, can range
  2202.                     from 0..100.
  2203.                     Default: 0
  2204.  
  2205.                 LAGA_InfoLength (LONG) - Maximum number of characters
  2206.                     to reserve for text printed in the gauge display.
  2207.                     Default: 0
  2208.  
  2209.                 LAGA_InfoText (STRPTR) - Text to print in the gauge
  2210.                     display.
  2211.  
  2212.  
  2213.             CYCLE_KIND:
  2214.  
  2215.                 LACY_FirstLabel (LONG) - Locale string ID of the first
  2216.                     text to use as a label. Works in conjunction
  2217.                     with LACY_LastLabel.
  2218.  
  2219.                 LACY_LastLabel (LONG) - Locale string ID of the last
  2220.                     text to use as a label. Works in conjunction
  2221.                     with LACY_FirstLabel. When building the interface the
  2222.                     code will loop from FirstLabel..LastLabel, look
  2223.                     up the corresponding locale strings and use the
  2224.                     data to make up the label text.
  2225.  
  2226.                 LACY_LabelTable (LONG *) - Pointer to an array of IDs
  2227.                     to use for building the cycle labels. This requires
  2228.                     that a locale hook is provided with the layout handle.
  2229.                     The array is terminated by -1.
  2230.  
  2231.                 LACY_TabKey (BOOL) - Connect this object to the tabulator
  2232.                     key. Press [Tab] to cycle to the next entry, [Shift][Tab]
  2233.                     to cycle to the previous entry.
  2234.  
  2235.                     NOTE: there can be only one single button per
  2236.                     window to use this feature.
  2237.  
  2238.                     Default: FALSE
  2239.                     (requires gtlayout.library v9 or higher)
  2240.  
  2241.                 LACY_AutoPageID (LONG) - ID of paged GROUP_KIND object
  2242.                     which will be set to the gadget's current setting.
  2243.                     (requires gtlayout.library v7 or higher)
  2244.  
  2245.                     NOTE: Listen to IDCMP_CLOSEWINDOW events
  2246.                           which may be generated if the layout
  2247.                           engine runs out of memory when rebuilding
  2248.                           the user interface.
  2249.  
  2250.             MX_KIND:
  2251.  
  2252.                 LAMX_FirstLabel (LONG) - Locale string ID of the first
  2253.                     text to use as a label. Works in conjunction
  2254.                     with LAMX_LastLabel.
  2255.  
  2256.                 LAMX_LastLabel (LONG) - Locale string ID of the last
  2257.                     text to use as a label. Works in conjunction
  2258.                     with LAMX_FirstLabel. When building the interface the
  2259.                     code will loop from FirstLabel..LastLabel, look
  2260.                     up the corresponding locale strings and use the
  2261.                     data to make up the label text.
  2262.  
  2263.                 LAMX_LabelTable (LONG *) - Pointer to an array of IDs
  2264.                     to use for building the radio labels. This requires
  2265.                     that a locale hook is provided with the layout handle.
  2266.                     The array is terminated by -1.
  2267.  
  2268.                 LAMX_TabKey (BOOL) - Connect this object to the tabulator
  2269.                     key. Press [Tab] to cycle to the next entry, [Shift][Tab]
  2270.                     to cycle to the previous entry.
  2271.  
  2272.                     NOTE: there can be only one single button per
  2273.                     window to use this feature.
  2274.  
  2275.                     Default: FALSE
  2276.                     (requires gtlayout.library v9 or higher)
  2277.  
  2278.                 LAMX_AutoPageID (LONG) - ID of paged GROUP_KIND object
  2279.                     which will be set to the gadget's current setting.
  2280.                     (requires gtlayout.library v7 or higher)
  2281.  
  2282.                     NOTE: Listen to IDCMP_CLOSEWINDOW events
  2283.                           which may be generated if the layout
  2284.                           engine runs out of memory when rebuilding
  2285.                           the user interface.
  2286.  
  2287.             SCROLLER_KIND:
  2288.  
  2289.                 LASC_Thin (BOOL) - Make the scroller a bit thinner
  2290.                     than usual.
  2291.                     Default: FALSE
  2292.  
  2293.             TAPEDECK_KIND:
  2294.  
  2295.                 LATD_ButtonType (LONG) - Select the image to display
  2296.                     in the button, must be one of the following:
  2297.  
  2298.                         DTBT_BACKWARD
  2299.                             "<<" Symbol
  2300.  
  2301.                         DTBT_FORWARD
  2302.                             ">>" Symbol
  2303.  
  2304.                         DTBT_PREVIOUS
  2305.                             "|<" Symbol
  2306.  
  2307.                         DTBT_NEXT
  2308.                             ">|" Symbol
  2309.  
  2310.                         DTBT_STOP
  2311.                             Stop symbol (filled square)
  2312.  
  2313.                         DTBT_PAUSE
  2314.                             Pause symbol (broken square)
  2315.  
  2316.                         DTBT_RECORD
  2317.                             Record symbol (filled circle)
  2318.  
  2319.                         DTBT_REWIND
  2320.                             "<" symbol
  2321.  
  2322.                         DTBT_EJECT
  2323.                             Eject symbol (broken upward pointing arrow)
  2324.  
  2325.                         DTBT_PLAY
  2326.                             ">" symbol
  2327.  
  2328.                 LATD_Toggle (BOOL) - Make this object a toggle-select
  2329.                     button.
  2330.                     Default: FALSE
  2331.  
  2332.                 LATD_Pressed (BOOL) - Make this button appear to be
  2333.                     pressed.
  2334.  
  2335.                     NOTE: requires "LATD_Toggle,TRUE" attribute.
  2336.  
  2337.                     Default: FALSE
  2338.  
  2339.                 LATD_Smaller (BOOL) - Make this button a bit smaller
  2340.                     than usual.
  2341.                     Default: FALSE
  2342.  
  2343.    RESULT
  2344.  
  2345.         none
  2346. gtlayout.library/LT_PressButton                gtlayout.library/LT_PressButton
  2347.  
  2348.    NAME
  2349.  
  2350.         LT_PressButton -- Highlight a button so it looks as if the user
  2351.                           has selected it.
  2352.  
  2353.    SYNOPSIS
  2354.  
  2355.         LT_PressButton(Handle,ID);
  2356.                           A0  D0
  2357.  
  2358.         VOID LT_PressButton(LayoutHandle *,LONG);
  2359.  
  2360.    FUNCTION
  2361.  
  2362.         You can provide visual feedback for BUTTON_KIND objects by calling
  2363.         this routine. They will briefly appear to be selected and then
  2364.         fall back to their original states.
  2365.  
  2366.    INPUTS
  2367.  
  2368.         Handle - Pointer to LayoutHandle structure
  2369.  
  2370.         ID - ID of button object to highlight
  2371.  
  2372.    RESULT
  2373.  
  2374.         none
  2375. gtlayout.library/LT_RebuildTagList          gtlayout.library/LT_RebuildTagList
  2376.  
  2377.    NAME
  2378.  
  2379.         LT_RebuildTagList -- Rebuild the user interface after modifying it.
  2380.  
  2381.    SYNOPSIS
  2382.  
  2383.         Success = LT_RebuildTagList(Handle,Clear,TagList);
  2384.            D0                         A0    D0     A1
  2385.  
  2386.         BOOL LT_RebuildTagList(LayoutHandle *,BOOL,struct TagItem *);
  2387.  
  2388.         Success = LT_RebuildTags(Handle,Clear,...);
  2389.  
  2390.         BOOL LT_RebuildTags(LayoutHandle *,BOOL,...);
  2391.  
  2392.    FUNCTION
  2393.  
  2394.         Certain aspects of the user interface can be changed at run time,
  2395.         such as button labels. This routine will let you rebuild the interface
  2396.         based upon the data supplied at creation time and your subsequent
  2397.         changes. Before you make any vital changes, it is recommended to
  2398.         lock the window using LT_LockWindow() in order to avoid clashes
  2399.         with the Intuition and GadTools subsystems.
  2400.  
  2401.    INPUTS
  2402.  
  2403.         Handle - Pointer to LayoutHandle structure.
  2404.  
  2405.         Clear - Pass in TRUE if you wish to have the window contents
  2406.                 cleared before they are rebuild. This will introduce
  2407.                 some visual hashing.
  2408.  
  2409.         TagList - Attributes controlling the layout process.
  2410.  
  2411.    RESULT
  2412.  
  2413.         Success - TRUE indicates that the interface was rebuilt,
  2414.                   FALSE indicates trouble; it is recommended to
  2415.                   call LT_DeleteHandle() on your LayoutHandle as
  2416.                   soon as possible as the previous operation may
  2417.                   have left the user interface in an inoperable
  2418.                   state.
  2419.  
  2420.    TAGS
  2421.  
  2422.         LAWN_Bounds (struct IBox *) - Boundaries in which the window
  2423.             should be centered.
  2424.  
  2425.         LAWN_ExtraWidth (LONG) - Extra space to add to the window
  2426.             width.
  2427.  
  2428.         LAWN_ExtraHeight (LONG) - Extra height to add to the window
  2429.             height.
  2430. gtlayout.library/LT_ReplyIMsg                    gtlayout.library/LT_ReplyIMsg
  2431.  
  2432.    NAME
  2433.  
  2434.         LT_ReplyIMsg -- Dispose of an IntuiMessage received
  2435.  
  2436.    SYNOPSIS
  2437.  
  2438.         LT_ReplyIMsg(IntuiMessage);
  2439.                          A0
  2440.  
  2441.         VOID LT_ReplyIMsg(struct IntuiMessage *);
  2442.  
  2443.    FUNCTION
  2444.  
  2445.         This routine complements LT_GetIMsg().
  2446.  
  2447.    INPUTS
  2448.  
  2449.         IntuiMessage - Pointer to IntuiMessage structure,
  2450.                        passing NULL is harmless.
  2451.  
  2452.    NOTES
  2453.  
  2454.         Only pass IntuiMessages you received via LT_GetIMsg,
  2455.         or things will get tough.
  2456.  
  2457.    RESULT
  2458.  
  2459.         none
  2460.  
  2461.    SEE ALSO
  2462.  
  2463.         gtlayout.library/LT_GetIMsg
  2464. gtlayout.library/LT_SetAttributesA          gtlayout.library/LT_SetAttributesA
  2465.  
  2466.    NAME
  2467.  
  2468.         LT_SetAttributesA -- Change object attributes
  2469.  
  2470.    SYNOPSIS
  2471.  
  2472.         LT_SetAttributesA(Handle,ID,Tags);
  2473.                             A0   D0  A1
  2474.  
  2475.         VOID LT_SetAttributes(LayoutHandle *,LONG,struct TagItem *);
  2476.  
  2477.         LT_SetAttributes(Handle,ID,...);
  2478.  
  2479.         VOID LT_SetAttributes(LayoutHandle *,LONG,...);
  2480.  
  2481.    FUNCTION
  2482.  
  2483.         This routine passes the tag item list it gets directly
  2484.         over to GT_SetGadgetAttrsA(), so any tag items valid for
  2485.         gadtools.library can be used here as well. Some filtering
  2486.         may be done in order to stop objects from getting redrawn
  2487.         if this is not absolutely necessary.
  2488.  
  2489.    INPUTS
  2490.  
  2491.         Handle - Pointer to LayoutHandle.
  2492.  
  2493.         ID - ID number of the object to change. This is the same value
  2494.              you passed via LA_ID to LT_New() when you created this object.
  2495.  
  2496.         Tags - Attributes controlling object states.
  2497.  
  2498.    TAGS
  2499.  
  2500.         All gadtools.library tags are allowed, but not all are supported.
  2501.         In addition to these tags a few additional tag values are
  2502.         supported:
  2503.  
  2504.         LH_AutoActivate (BOOL) - Set to TRUE if you want the interface
  2505.             to always keep a string gadget active if possible. Hitting
  2506.             the return key will then cause the next following string
  2507.             gadget to get activated, either cycling through all the
  2508.             string gadgets available or stopping at the next string
  2509.             gadget to have the LAST_LastGadget attribute set.
  2510.  
  2511.         LH_UserData (APTR) - Store user specific data in the
  2512.             LayoutHandle->UserData entry.
  2513.             (requires gtlayout.library v9 or higher)
  2514.  
  2515.         LH_LocaleHook (struct Hook *) - The hook to call when
  2516.             locale string IDs are to be mapped to strings. The
  2517.             hook function is called with the following parameters:
  2518.  
  2519.             String = HookFunc(struct Hook *Hook,struct LayoutHandle *Handle,
  2520.               D0                            A0                         A2
  2521.                               LONG ID)
  2522.                                    A1
  2523.  
  2524.             The function is to look up the string associated with the ID
  2525.             passed in and return the string.
  2526.  
  2527.         LH_ExitFlush (BOOL) - When the LayoutHandle is finally disposed
  2528.             of with LT_DeleteHandle() all variables maintained by the
  2529.             input handling code will be flushed. For example, if you
  2530.             would use the LA_STRPTR tag for STRING_KIND objects the
  2531.             last string gadget contents would be copied into the buffer
  2532.             pointed to by LA_STRPTR. If you do not want to use this
  2533.             feature, disable it with "LH_ExitFlush,FALSE".
  2534.             Default: TRUE
  2535.             (requires gtlayout.library v9 or higher)
  2536.  
  2537.         GAUGE_KIND:
  2538.  
  2539.             LAGA_Percent (LONG) - Percentage of the gauge to fill.
  2540.  
  2541.             LAGA_InfoText (STRPTR) - Text to be printed within the
  2542.                 gauge display, such as a percentage number.
  2543.  
  2544.         BOX_KIND:
  2545.  
  2546.             LABX_Index (LONG) - The number of the line to change, this
  2547.                 tag works in conjunction with the LABX_Text tag.
  2548.  
  2549.             LABX_Text (STRPTR) - The text to put into the line indicated
  2550.                 by the LABX_Index tag.
  2551.  
  2552.             LABX_Lines (STRPTR *) - The text to set for the box contents,
  2553.                 terminate the text array with NULL.
  2554.  
  2555.         HORIZONTAL_KIND:
  2556.         VERTICAL_KIND:
  2557.  
  2558.             LAGR_ActivePage (LONG) - Index number of page to display
  2559.                 witthin the group. NOTE: requires that this group was
  2560.                 created with the LAGR_ActivePage attribute set.
  2561.  
  2562.         FRACTION_KIND:
  2563.  
  2564.             LAFC_Number (FIXED) - Fixed point number to use
  2565.  
  2566.             LAFC_Min (FIXED) - Minimum allowed value for this
  2567.                 object.
  2568.  
  2569.             LAFC_Max (FIXED) - Maximum allowed value for this
  2570.                 object.
  2571.  
  2572.         INTEGER_KIND:
  2573.  
  2574.             LAIN_Min (LONG) - Minimum allowed value for this
  2575.                 object.
  2576.  
  2577.             LAIN_Max (LONG) - Maximum allowed value for this
  2578.                 object.
  2579.  
  2580.         PASSWORD_KIND:
  2581.  
  2582.             LAPW_String (STRPTR) - Secret text to use
  2583.  
  2584.         STRING_KIND:
  2585.  
  2586.             LAST_CursorPosition (LONG) - Repositions the cursor,
  2587.                 pass -1 to move it to the end of the string.
  2588.                 (requires gtlayout.library v7 or higher)
  2589.  
  2590.         TAPEDECK_KIND:
  2591.  
  2592.             LATD_Pressed (BOOL) - TRUE to make this button shown
  2593.                 as pressed, FALSE to show it in depressed state.
  2594.  
  2595.         All objects:
  2596.  
  2597.             LA_LabelText (STRPTR) - New gadget label text to use.
  2598.  
  2599.             LA_LabelID (LONG) - Locale text ID to use for this object.
  2600.  
  2601.    RESULT
  2602.  
  2603.        none
  2604. gtlayout.library/LT_ShowWindow                  gtlayout.library/LT_ShowWindow
  2605.  
  2606.    NAME
  2607.  
  2608.         LT_ShowWindow -- Make a window visible
  2609.  
  2610.    SYNOPSIS
  2611.  
  2612.         LT_ShowWindow(Handle,Activate);
  2613.                         A0      A1
  2614.  
  2615.         VOID LT_ShowWindow(LayoutHandle *,BOOL);
  2616.  
  2617.    FUNCTION
  2618.  
  2619.         The window attached to a LayoutHandle is made visible, this
  2620.         involves bringing it to the front, bringing the screen to
  2621.         the front the window resides on, unzooming the window and
  2622.         also moving the visible part of an autoscrolling screen.
  2623.  
  2624.    INPUTS
  2625.  
  2626.         Window - Pointer to Window structure.
  2627.  
  2628.         Activate - If TRUE the window will be activated as soon
  2629.             as it has been brought to the front.
  2630.  
  2631.         The arguments are passed in A0 and A1, this is *not* a
  2632.         typo.
  2633.  
  2634.    RESULT
  2635.  
  2636.         none
  2637. gtlayout.library/LT_String2Fixed              gtlayout.library/LT_String2Fixed
  2638.  
  2639.    NAME
  2640.  
  2641.         LT_String2Fixed -- Convert an ASCII string into a fixed-point numeric
  2642.                            value.
  2643.  
  2644.    SYNOPSIS
  2645.  
  2646.         Fixed = LT_String2Fixed(String)
  2647.           D0                      A0
  2648.  
  2649.         FIXED LT_String2Fixed(STRPTR);
  2650.  
  2651.    FUNCTION
  2652.  
  2653.         This routine complements LT_Fixed2String, it implements a
  2654.         service similar to atof() in converting an ASCII string
  2655.         into a fixed-point number.
  2656.  
  2657.    INPUTS
  2658.  
  2659.         String - Pointer to null-terminated string.
  2660.  
  2661.    RESULT
  2662.  
  2663.         Fixed - Fixed-point number; will be 0.0 if non-numeric
  2664.                 characters are found in the input string.
  2665.  
  2666.    NOTES
  2667.  
  2668.         The decimal point to look for will be taken from the
  2669.         current locale settings. If locale.library is not
  2670.         installed, the `.' character will be used instead.
  2671. gtlayout.library/LT_UnlockWindow              gtlayout.library/LT_UnlockWindow
  2672.  
  2673.    NAME
  2674.  
  2675.         LT_UnlockWindow -- The complement to LT_LockWindow().
  2676.  
  2677.    SYNOPSIS
  2678.  
  2679.         LT_UnlockWindow(Window);
  2680.                           A0
  2681.  
  2682.         VOID LT_UnlockWindow(struct Window *);
  2683.  
  2684.    FUNCTION
  2685.  
  2686.         This routine unlocks a window locked using LT_LockWindow, freeing
  2687.         allocated memory, restoring the window characteristics to their
  2688.         original values.
  2689.  
  2690.    INPUTS
  2691.  
  2692.         Window - Pointer to window structure.
  2693.  
  2694.    RESULT
  2695.  
  2696.         none
  2697. gtlayout.library/LT_UpdateStrings       gtlayout.library/LT_UpdateStrings
  2698.  
  2699.    NAME
  2700.  
  2701.         LT_UpdateStrings -- Make sure all visible string buffer contents
  2702.                             get written into storage.
  2703.  
  2704.                             (requires gtlayout.library v9 or higher)
  2705.  
  2706.    SYNOPSIS
  2707.  
  2708.         LT_UpdateStrings(LayoutHandle);
  2709.                                 A0
  2710.  
  2711.         VOID LT_UpdateStrings(struct LayoutHandle *);
  2712.  
  2713.    FUNCTION
  2714.  
  2715.         The user can terminate input into a string gadget or an object
  2716.         derived from a string gadget by various means. They all have
  2717.         in common that the application receives no notification that
  2718.         the string gadget contents have changed. This is particularly
  2719.         nasty with objects which make use of LA_STRPTR or other
  2720.         tags. Using LT_UpdateStrings() you can force all visible string
  2721.         gadget objects to hand over their contents to the internal
  2722.         buffers. Do this before you eventually exit your input loop.
  2723.  
  2724.    INPUTS
  2725.  
  2726.         LayoutHandle - Pointer to LayoutHandle structure.
  2727.  
  2728.    RESULT
  2729.  
  2730.         none
  2731.