home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / programm / libs / reqtool.lha / ReqTools / doc / reqtools.doc next >
Encoding:
Text File  |  1992-07-24  |  84.2 KB  |  1,875 lines

  1. TABLE OF CONTENTS
  2.  
  3. reqtools.library/rtAllocRequestA
  4. reqtools.library/rtChangeReqAttrA
  5. reqtools.library/rtCloseWindowSafely
  6. reqtools.library/rtEZRequestA
  7. reqtools.library/rtFileRequestA
  8. reqtools.library/rtFontRequestA
  9. reqtools.library/rtFreeFileList
  10. reqtools.library/rtFreeReqBuffer
  11. reqtools.library/rtFreeRequest
  12. reqtools.library/rtGetLongA
  13. reqtools.library/rtGetStringA
  14. reqtools.library/rtGetVScreenSize
  15. reqtools.library/rtLockWindow
  16. reqtools.library/rtPaletteRequestA
  17. reqtools.library/rtReqHandlerA
  18. reqtools.library/rtScreenModeRequestA
  19. reqtools.library/rtScreenToFrontSafely
  20. reqtools.library/rtSetReqPosition
  21. reqtools.library/rtSetWaitPointer
  22. reqtools.library/rtSpread
  23. reqtools.library/rtUnlockWindow
  24.  
  25. reqtools.library/rtAllocRequestA             reqtools.library/rtAllocRequestA
  26.  
  27.   NAME  rtAllocRequestA()
  28.  
  29.     req = rtAllocRequestA (type, taglist);
  30.  
  31.     APTR rtAllocRequestA (ULONG, struct TagItem *);
  32.     D0                    D0     A0
  33.  
  34.     req = rtAllocRequest (type, tag1,...);
  35.  
  36.     APTR rtAllocRequest (ULONG, Tag,...);
  37.  
  38.   DESCRIPTION
  39.     Allocates a requester structure for you in a future compatible manner.
  40.     This is the only way to properly allocate a rtFileRequester,
  41.     rtFontRequester, rtReqInfo or rtScreenModeRequester structure.  The
  42.     structure will be initialized for you.
  43.  
  44.     Use rtFreeRequest() to free the requester structure when you no longer
  45.     need it.
  46.  
  47.   INPUTS
  48.     type    - type of structure to allocate, currently RT_REQINFO,
  49.               RT_FILEREQ, RT_FONTREQ or RT_SCREENMODEREQ.
  50.     taglist - pointer to array of tags (currently always NULL).
  51.  
  52.   TAGS
  53.     no tags defined yet
  54.  
  55.   RESULT
  56.     req - pointer to the requester allocated or NULL if no memory.
  57.  
  58.   BUGS
  59.     none known
  60.  
  61.   SEE ALSO
  62.     rtFreeRequest()
  63.  
  64. reqtools.library/rtChangeReqAttrA           reqtools.library/rtChangeReqAttrA
  65.  
  66.   NAME  rtChangeReqAttrA()
  67.  
  68.     [long =] rtChangeReqAttrA (req, taglist);
  69.  
  70.     [LONG] rtChangeReqAttrA (APTR, struct TagItem *);
  71.                       A1    A0
  72.  
  73.     [long =] rtChangeReqAttr (req, tag1,...);
  74.  
  75.     [LONG] rtChangeReqAttr (APTR, Tag,...);
  76.  
  77.   DESCRIPTION
  78.     Change requester attributes with supplied taglist.  This is the only
  79.     correct way to change the attributes listed below.
  80.  
  81.     The return code from rtChangeReqAttrA() should be ignored unless stated
  82.     otherwise.
  83.  
  84.     Don't pass the tags listed below to the requester itself (unless
  85.     documented otherwise).  They will not be recognized.
  86.  
  87.   INPUTS
  88.     req     - pointer to requester.
  89.     taglist - pointer to array of tags.
  90.  
  91.   TAGS
  92.     for the file requester:
  93.         RTFI_Dir         - (char *)
  94.                            Name of new directory to position file requester
  95.                            in. The requester's buffer will be deallocated.
  96.         RTFI_MatchPat    - (char *)
  97.                            New pattern string to match files on.
  98.         RTFI_AddEntry    - (BPTR)
  99.                            THIS *MUST* BE THE LAST TAGá(just before TAG_END)!
  100.                            Tagdata must hold a lock on a file or directory
  101.                            you want to add to the file requester's buffer.
  102.                            The lock should have been obtained using Lock(),
  103.                            and you must unlock this lock yourself.
  104.                            It is your responsibility to make sure the file
  105.                            or directory is indeed in the directory the file
  106.                            requester is in.
  107.                            If the entry is already in the file requester's
  108.                            buffer it will simply be updated.
  109.                            It is harmless to use this tag if the requester's
  110.                            buffer is not initialized. rtChangeReqAttr() will
  111.                            return a boolean to indicate success or failure
  112.                            (out of memory).
  113.         RTFI_RemoveEntry - (char *)
  114.                            Name of file or directory you want to remove from
  115.                            the file requester's buffer.
  116.                            It is your responsibility to make sure the file
  117.                            or directory is indeed in the directory the file
  118.                            requester is in.
  119.                            It is harmless use this tag if the requester's
  120.                            buffer is not initialized.
  121.     for the font requester:
  122.         RTFO_FontName    - (char *) 
  123.                            Set the name of the currently selected font.
  124.         RTFO_FontHeight  - (UWORD)
  125.                            Set the fontsize of the currently selected font.
  126.         RTFO_FontStyle   - (UBYTE)
  127.                            Set the style of the current font.
  128.         RTFO_FontFlags   - (UBYTE)
  129.                            Set the flags of the current font.
  130.     for the screenmode requester [V38]:
  131.         RTSC_ModeFromScreen - (struct Screen *)
  132.                               Screen to get mode attributes from.
  133.                               NOTE: You must make sure the mode this screen
  134.                                     is in will be accepted by the screen
  135.                                     mode requester.  Otherwise it will auto-
  136.                                     matically cancel.  For example, you use
  137.                                     RTDI_ModeFromScreen on a HAM screen and
  138.                                     you haven't set the SCREQF_NONSTDMODES
  139.                                     flag.
  140.         RTSC_DisplayID      - (ULONG)
  141.                               Set 32-bit mode id of selected mode.  The width
  142.                               and height will be set to the default (visible)
  143.                               width and height, and the depth will be set to
  144.                               maximum.  Also read note above.
  145.         RTSC_DisplayWidth   - (UWORD)
  146.                               Set width of display.  Must come after
  147.                               RTSC_DisplayID or RTSC_ModeFromScreen tags.
  148.         RTSC_DisplayHeight  - (UWORD)
  149.                               Set height of display.  Must come after
  150.                               RTSC_DisplayID or RTSC_ModeFromScreen tags.
  151.         RTSC_DisplayDepth   - (UWORD)
  152.                               Set depth of display.  Must come after
  153.                               RTSC_DisplayID or RTSC_ModeFromScreen tags.
  154.         RTSC_OverscanType   - (ULONG)
  155.                               Set type of overscan.  Set to 0 for regular
  156.                               size, otherwise use OSCAN_... constants.
  157.                               See 'intuition/screens.[h|i]'.
  158.         RTSC_AutoScroll     - (BOOL)
  159.                               Boolean state of autoscroll checkbox.
  160.  
  161.   RESULT
  162.     none (except when RTFI_AddEntry tag is used, see above)
  163.  
  164.   BUGS
  165.     none known
  166.  
  167.   SEE ALSO
  168.     dos.library/Lock()
  169.  
  170. reqtools.library/rtCloseWindowSafely     reqtools.library/rtCloseWindowSafely
  171.  
  172.   NAME  rtCloseWindowSafely() [V38]
  173.  
  174.     rtCloseWindowSafely (window);
  175.  
  176.     void rtCloseWindowSafely (struct Window *);
  177.                               A0
  178.  
  179.   DESCRIPTION
  180.     Closes a window which shares its IDCMP port with another window.  All the
  181.     pending messages (concerning this window) on the port will be removed and
  182.     the window will be closed.
  183.  
  184.     Do not use this function to close windows which have an IDCMP port set up
  185.     by Intuition.  If you do the port will be left in memory!
  186.  
  187.     If you intend to open a lot of windows all sharing the same IDCMP port it
  188.     is easiest if you create a port yourself and open all windows with
  189.     newwin.IDCMPFlags set to 0 (this tells Intuition to NOT set up an IDCMP
  190.     port).  After opening the window set the win->UserPort to your message
  191.     port and call ModifyIDCMP to set your IDCMP flags.
  192.  
  193.     When you then receive messages from intuition check the imsg->IDCMPWindow
  194.     field to find out what window they came from and act upon them.
  195.  
  196.     When closing your windows call rtCloseWindowSafely() for all of them and
  197.     delete your message port.  Easy peasy :-)
  198.  
  199.     NOTE: Only call rtCloseWindowSafely() for windows with a shared IDCMP
  200.           port.  Do *NOT* call it for windows with an IDCMP port created
  201.           by Intuition!
  202.  
  203.   INPUTS
  204.     window - pointer to the window to be closed.
  205.  
  206.   RESULT
  207.     none
  208.  
  209.   NOTE
  210.     This function is for the advanced ReqTools user.
  211.  
  212.   BUGS
  213.     none known
  214.  
  215.   SEE ALSO
  216.     intuition.library/CloseWindow()
  217.  
  218. reqtools.library/rtEZRequestA                   reqtools.library/rtEZRequestA
  219.  
  220.   NAME  rtEZRequestA()
  221.  
  222.     ret = rtEZRequestA (bodyfmt, gadfmt, reqinfo, argarray, taglist);
  223.  
  224.     ULONG rtEZRequestA
  225.                 (char *, char *, struct rtReqInfo *, APTR, struct TagItem *);
  226.     D0           A1      A2      A3                  A4    A0
  227.  
  228.     ret = rtEZRequest (bodyfmt, gadfmt, reqinfo, taglist, arg1, arg2,...);
  229.  
  230.     ULONG rtEZRequest
  231.                   (char *, char *, struct rtReqInfo *, struct TagItem *,...);
  232.  
  233.     ret = rtEZRequestTags(bodyfmt, gadfmt, reqinfo, argarray, tag1,...);
  234.  
  235.     ULONG rtEZRequestTags(char *, char *, struct rtReqInfo *, APTR, Tag,...);
  236.  
  237.   DESCRIPTION
  238.     This function puts up a requester for you and waits for a response from
  239.     the user. If the response is positive, this procedure returns TRUE.
  240.     If the response is negative, this procedure returns FALSE.
  241.     The function may also return an IDCMP flag or a value corresponding with
  242.     one of other possible responses (see below).
  243.  
  244.     'gadfmt' may contain several possible responses.  Separate these
  245.     responses by a '|'.  For example: "Yes|No", or 'Yes|Maybe|No".  The
  246.     responses should be typed in the same order as they will appear on
  247.     screen, from left to right.  There is no limit to the number of responses
  248.     other than the width of the screen the requester will appear on.
  249.  
  250.     'bodyfmt' can contain newlines ('\n', ASCII 10). This will cause a new
  251.     line to be started (surprise, surprise :-).
  252.     You may also include 'printf' style formatting codes. The format
  253.     arguments should be pointed to by 'argarray'.
  254.     You can use formatting codes in 'gadfmt' as well.  The arguments for
  255.     this format string should follow the ones for 'bodyfmt'.
  256.  
  257.     NOTE: The formatting is done by exec.library/RawDoFmt(), so be aware that
  258.           to display a 32-bit integer argument you must use "%ld", not "%d",
  259.           since RawDoFmt() is "word-oriented."
  260.  
  261.     The second and third function use a variable number of arguments. These
  262.     functions can be found in 'reqtools[nb].lib'.
  263.     The second function has the RawDoFmt arguments as variable args, the
  264.     third the tags. If you need both this is what you can do:
  265.  
  266.     ...
  267.        {
  268.        ULONG tags[] = { RTEZ_ReqTitle, (ULONG)"mytitle", TAG_END };
  269.  
  270.        rtEZRequest ("String, num: %s, %ld", NULL, "Ok",
  271.                                            (struct TagItem *)tags, "six", 6);
  272.        }
  273.     ...
  274.  
  275.     You can satisfy the requester with the following keyboard shortcuts:
  276.       'Y' or Left Amiga 'V' for a positive response,
  277.       ESC, 'N', 'R' or Left Amiga 'B' for a negative response.
  278.  
  279.     If EZREQF_NORETURNKEY is _not_ set (see RTEZ_Flags below) the RETURN key
  280.     is also accepted as a shortcut for the positive response (can be changed
  281.     using RTEZ_DefaultResponse, see below).  The response that will be
  282.     selected when you press RETURN will be printed in bold.
  283.  
  284.     The EZREQF_LAMIGAQUAL flag should be used when you put up a requester
  285.     for a destructive action (e.g. to delete something).  When it is set
  286.     the keyboard shortcuts are limited to Left Amiga 'V' and 'B' so it is
  287.     harder to accidently select something you will regret.
  288.     Note that the RETURN and ESC key remain active!  To disable the RETURN
  289.     key use the EZREQF_NORETURNKEY flag.  The ESC key cannot be disabled.
  290.  
  291.     You may pass a NULL for 'gadfmt', but make sure you know what you are
  292.     doing.  Passing a NULL opens an EZRequester with NO responses, just a
  293.     body text.  This implies the user has no means of "answering" this
  294.     requester.  You must therefore use the RT_IDCMPFlags tag to allow some
  295.     other events to end the requester (e.g. IDCMP_MOUSEBUTTONS,
  296.     IDCMP_INACTIVEWINDOW,...) or you must make use of the ReqHandler feature.
  297.     Using a requester handler you can end the requester by program control.
  298.     This way you can e.g. put up a requester before you start loading a file
  299.     and remove it after the file has been loaded.  Do not pass an empty
  300.     string as 'gadfmt'!
  301.  
  302.     'reqinfo' can be used to customize the requester.  For greater control
  303.     use the tags listed below.  The advantage of the rtReqInfo structure is
  304.     that it is global, where tags have to be specified each function call.
  305.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  306.  
  307.   INPUTS
  308.     bodyfmt  - requester body text, can be format string a la RawDoFmt().
  309.     gadfmt   - text for gadgets (left to right, separated by '|') or NULL.
  310.     argarray - pointer to array of arguments for format string(s).
  311.     reqinfo  - pointer to a rtReqInfo structure allocated with
  312.                rtAllocRequest() or NULL.
  313.     taglist  - pointer to a TagItem array.
  314.  
  315.   TAGS
  316.     RT_Window       - (struct Window *)
  317.                       Window that will be used to find the screen to put the
  318.                       requester on.
  319.                       You *MUST* supply this if you are a task calling this
  320.                       function and not a process! This is because tasks
  321.                       don't have a pr_WindowPtr.
  322.     RT_IDCMPFlags   - (ULONG)
  323.                       Extra idcmp flags to return on.  If one these IDCMP
  324.                       flags causes the requester to abort the return code
  325.                       will equal the flag in question.
  326.     RT_ReqPos       - (ULONG)
  327.                       One of the following:
  328.                         REQPOS_POINTER    - requester appears where the mouse
  329.                                             pointer is (default).
  330.                         REQPOS_CENTERSCR  - requester is centered on the
  331.                                             screen.
  332.                         REQPOS_CENTERWIN  - requester is centered in the
  333.                                             window (only works if the
  334.                                             pr_WindowPtr of your process is
  335.                                             valid or if you use RT_Window).
  336.                                             If RT_Window is NULL the
  337.                                             requester will be centered on
  338.                                             the screen.
  339.                         REQPOS_TOPLEFTSCR - requester appears at the top left
  340.                                             of the screen.
  341.                         REQPOS_TOPLEFTWIN - requester appears at the top left
  342.                                             of the window (only works if the
  343.                                             pr_WindowPtr of your process is
  344.                                             valid or if you use RT_Window).
  345.                       The requester will always remain in the visible part of
  346.                       the screen, so if you use the Workbench 2.0 ScreenMode
  347.                       preferences editor to enlarge your Workbench screen and
  348.                       you scroll around, the requester will always appear in
  349.                       the part you can see.
  350.                       REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR also apply to
  351.                       the visible part of the screen. So if you use one of
  352.                       these the requester will be appear in the center or the
  353.                       top left off what you can see of the screen as opposed
  354.                       to the entire screen.
  355.                       REQPOS_CENTERWIN and REQPOS_TOPLEFTWIN fall back to
  356.                       REQPOS_CENTERSCR or REQPOS_TOPLEFTSCR respectively
  357.                       when there is no parent window.  So you can safely use
  358.                       these without worrying about the existence of a window.
  359.     RT_LeftOffset   - (ULONG)
  360.                       Offset of left edge of requester relative to position
  361.                       specified with RT_ReqPos (does not offset the requester
  362.                       when RT_ReqPos is REQPOS_POINTER).
  363.     RT_TopOffset    - (ULONG)
  364.                       Offset of top edge of requester relative to position
  365.                       specified with RT_ReqPos (does not offset the requester
  366.                       when RT_ReqPos is REQPOS_POINTER).
  367.     RT_PubScrName   - (char *)
  368.                       Name of public screen requester should appear on. When
  369.                       this tag is used the RT_Window tag will be ignored.
  370.                       If the public screen is not found the requester will
  371.                       open on the default public screen.
  372.                       Only works on Kickstart 2.0!  reqtools.library does
  373.                       not check this, it is up to you *NOT* to use this tag
  374.                       on Kickstart 1.3 or below!
  375.                       Note that the 1.3 version of reqtools.library also
  376.                       understands and supports this tag (on 2.0).
  377.     RT_Screen       - (struct Screen *)
  378.                       Address of screen to put requester on.  You should
  379.                       never use this, use RT_Window or RT_PubScrName.
  380.     RT_ReqHandler   - (struct rtHandlerInfo **)
  381.                       Using this tag you can start an "asynchronous"
  382.                       requester. ti_TagData of the tag must hold the address
  383.                       of a pointer variable to a rtHandlerInfo structure.
  384.                       The requester will initialize this pointer and will
  385.                       return immediately after its normal initialization.
  386.                       The return code will not be what you would normally
  387.                       expect.  If the return code is _not_ equal to
  388.                       CALL_HANDLER an error occurred and you should take
  389.                       appropriate steps. If the return code was CALL_HANDLER
  390.                       everything went ok and the requester will still be up!
  391.                       See the explanation for rtReqHandlerA() below for the
  392.                       following steps you have to take.
  393.     RT_WaitPointer  - (BOOL)
  394.                       If this is TRUE the window calling the requester will
  395.                       get a standard wait pointer set while the requester is
  396.                       up.  This will happen if you used the RT_Window tag or
  397.                       if your process's pr_WindowPtr is valid.  Note that
  398.                       after the requester has finished your window will be
  399.                       ClearPointer()-ed.  If you used a custom pointer in
  400.                       your window you will have to re-set it, or not use the
  401.                       RT_WaitPointer tag and put up a wait pointer yourself.
  402.                       If your program requires ReqTools V38 it is advised you
  403.                       use RT_LockWindow instead.  Defaults to FALSE.
  404.     RT_LockWindow   - (BOOL) [V38]
  405.                       If this is TRUE the window calling the requester will
  406.                       get locked.  It will no longer accept any user input
  407.                       and it will get standard wait pointer set.  This will
  408.                       happen only if you used the RT_Window tag or if your
  409.                       process's pr_WindowPtr is valid.  RT_LockWindow will
  410.                       restore a custom pointer if you have used one (unlike
  411.                       RT_WaitPointer).  So you do not have to worry about
  412.                       having to restore it yourself.  It is advised you use
  413.                       this tag as much as possible. Defaults to FALSE.
  414.     RT_ScreenToFront - (BOOL) [V38]
  415.                       Boolean indicating whether to pop the screen the
  416.                       requester will appear on to the front. Default is TRUE.
  417.     RT_ShareIDCMP   - (BOOL) [V38]
  418.                       Boolean indicating whether to share the IDCMP port of
  419.                       the parent window. Use this tag together with the
  420.                       RT_Window tag to indicate the window to share IDCMP
  421.                       with. Sharing the IDCMP port produces less overhead,
  422.                       so it is advised you use this tag. Defaults to FALSE.
  423.     RT_Locale       - (struct Locale *) [V38]
  424.                       Locale to determine what language to use for the
  425.                       requester text.  If this tag is not used or its data
  426.                       is NULL, the system's current default locale will be
  427.                       used. Default NULL.
  428.     RT_IntuiMsgFunc - (struct Hook *) [V38]
  429.                       The requester will call this hook for each IDCMP
  430.                       message it gets that doesn't belong to its window.
  431.                       Only applies if you used the RT_ShareIDCMP tag to share
  432.                       the IDCMP port with the parent window.  Parameters are
  433.                       as follows:
  434.                         A0 - (struct Hook *) your hook
  435.                         A2 - (struct rtReqInfo *) your requester info
  436.                         A1 - (struct IntuiMessage *) the message
  437.                       After you have finished examining the message and your
  438.                       hook returns, ReqTools will reply the message.  So do
  439.                       not reply the message yourself!
  440.     RT_Underscore   - (char) [V38]
  441.                       Indicates the symbol that precedes the character in the
  442.                       gadget label to be underscored.  This is to define a
  443.                       keyboard shortcut for this gadget.  Example: to define
  444.                       the key 'Q' as a keyboard shortcut for "Quit" and 'N'
  445.                       for "Oh, No!" you would use the tag RT_Underscore, '_'
  446.                       and pass as gadfmt "_Quit|Oh, _No!".  Do not use the
  447.                       symbol '%' as it is used for string formatting.  The
  448.                       usual character to use is '_' like in the example.
  449.                       IMPORTANT: the shortcuts defined using RT_Underscore
  450.                       take precedence of the default shortcuts!  It is for
  451.                       example not wise to use a 'N' for a positive response!
  452.                       Pick your shortcuts carefully!
  453.     RT_TextAttr     - (struct TextAttr *) [V38]
  454.                       Use this font for the requester.  Default is to use the
  455.                       screen font.  Note that the font must already be
  456.                       opened by you.  ReqTools will call OpenFont() on this
  457.                       TextAttr, _not_ OpenDiskFont()!  If the font cannot be
  458.                       opened using OpenFont() the default screen font will
  459.                       be used.
  460.     RTEZ_ReqTitle   - (char *)
  461.                       Title of requester window, default is "Request" unless
  462.                       the requester has less than 2 responses, then the
  463.                       default title is "Information".
  464.     RTEZ_Flags      - (ULONG)
  465.                       Flags for rtEZRequestA():
  466.                         EZREQF_NORETURNKEY - turn off the RETURN key as
  467.                                              shortcut for positive response.
  468.                         EZREQF_LAMIGAQUAL  - keyboard shortcuts are limited
  469.                                              to Left Amiga 'V' and 'B', ESC
  470.                                              and RETURN.
  471.                         EZREQF_CENTERTEXT  - centers each line of body text
  472.                                              in the requester window. Useful
  473.                                              for about requesters.
  474.     RTEZ_DefaultResponse - (ULONG)
  475.                       Response value that will be returned when the user
  476.                       presses the return key.  Will be ignored if the
  477.                       EZREQF_NORETURNKEY flag is set.  The text for this
  478.                       response will be printed in bold. Default is 1.
  479.  
  480.   RESULT
  481.     ret - 1 (TRUE) for leftmost (positive) response, then each consecutive
  482.           response will return 1 more, the rightmost (false) response will
  483.           return 0 (FALSE), so 1,2,3,...,num-1,0 -- or idcmp flag.
  484.  
  485.   NOTE
  486.     Automatically adjusts the requester to the screen font.
  487.  
  488.     rtEZRequestA() checks the pr_WindowPtr of your process to find the
  489.     screen to put the requester on.
  490.  
  491.   BUGS
  492.     none known
  493.  
  494.   SEE ALSO
  495.     exec.library/RawDoFmt(), rtReqHandlerA()
  496.  
  497. reqtools.library/rtFileRequestA               reqtools.library/rtFileRequestA
  498.  
  499.   NAME  rtFileRequestA()
  500.  
  501.     ret = rtFileRequestA (filereq, filename, title, taglist);
  502.  
  503.     APTR rtFileRequestA
  504.                 (struct rtFileRequester *, char *, char *, struct TagItem *);
  505.     D0           A1                        A2      A3      A0
  506.  
  507.     ret = rtFileRequest (filereq, filename, title, tag1,...);
  508.  
  509.     APTR rtFileRequest (struct rtFileRequester *, char *, char *, Tag,...);
  510.  
  511.   DESCRIPTION
  512.     Get a directory and filename(s), or just a directory from the user.
  513.  
  514.     'filename' should point to an array of at least 108 chars.  The filename
  515.     already in 'filename' will be displayed in the requester when it comes
  516.     up.  When the requester returns 'filename' will probably have changed.
  517.  
  518.     Using certain tags may result in the calling of a caller-supplied hook.
  519.  
  520.     The hook will be called with A0 holding the address of your hook
  521.     structure (you may use the h_Data field to your own liking), A2 a pointer
  522.     to the requester structure calling the hook ('req') and A1 a pointer to
  523.     an object.  The object is variable and depends on what your hook is for.
  524.  
  525.     This is an example of a hook suitable to be used with the RTFI_FilterFunc
  526.     tag:
  527.  
  528.     SAS/C users can define their function thus:
  529.  
  530.     BOOL __asm __saveds filterfunc (register __a0 struct Hook *filterhook,
  531.        register __a2 struct rtFileRequester *req,
  532.        register __a1 struct FileInfoBlock *fib)
  533.     {
  534.        BOOL accepted = TRUE;
  535.  
  536.        /* examine fib to decide if you want this file in the requester */
  537.        ...
  538.        return (accepted);
  539.     }
  540.  
  541.     Your hook structure should then be initialized like this:
  542.  
  543.        filterhook->h_Entry = filterfunc;
  544.        /* in this case no need to initialize hook->h_SubEntry */
  545.        filterhook->h_Data = your_userdata_if_needed;
  546.  
  547.     You can also use a stub written in machine code to call
  548.     your function. (see 'utility/hooks.h')
  549.  
  550.   INPUTS
  551.     filereq  - pointer to a struct rtFileRequester allocated with
  552.                rtAllocRequestA().
  553.     filename - pointer to an array of chars (must be 108 bytes big).
  554.     title    - pointer to requester window title (null terminated).
  555.     taglist  - pointer to a TagItem array.
  556.  
  557.   TAGS
  558.     RT_Window          - see rtEZRequestA()
  559.     RT_ReqPos          - see rtEZRequestA()
  560.     RT_LeftOffset      - see rtEZRequestA()
  561.     RT_TopOffset       - see rtEZRequestA()
  562.     RT_PubScrName      - see rtEZRequestA()
  563.     RT_Screen          - see rtEZRequestA()
  564.     RT_ReqHandler      - see rtEZRequestA()
  565.     RT_WaitPointer     - see rtEZRequestA()
  566.     RT_LockWindow      - [V38] see rtEZRequestA()
  567.     RT_ScreenToFront   - [V38] see rtEZRequestA()
  568.     RT_ShareIDCMP      - [V38] see rtEZRequestA()
  569.     RT_Locale          - [V38] see rtEZRequestA()
  570.     RT_IntuiMsgFunc    - (struct Hook *) [V38]
  571.                          The requester will call this hook for each IDCMP
  572.                          message it gets that doesn't belong to its window.
  573.                          Only applies if you used the RT_ShareIDCMP tag to
  574.                          share the IDCMP port with the parent window.
  575.                          Parameters are as follows:
  576.                            A0 - (struct Hook *) your hook
  577.                            A2 - (struct rtFileRequester *) your requester
  578.                            A1 - (struct IntuiMessage *) the message
  579.                          After you have finished examining the message and
  580.                          your hook returns, ReqTools will reply the message.
  581.                          So do not reply the message yourself!
  582.     RT_Underscore      - (char) [V38]
  583.                          Indicates the symbol that precedes the character in
  584.                          a gadget's label to be underscored.  This will also
  585.                          define the keyboard shortcut for this gadget.
  586.                          Currently only needed for RTFI_OkText.  Usually set
  587.                          to '_'.
  588.     RT_DefaultFont     - (struct TextFont *)
  589.                          This tag allows you to specify the font to be used
  590.                          in the requester when the screen font is
  591.                          proportional. Default is GfxBase->DefaultFont.
  592.     RT_TextAttr        - (struct TextAttr *) [V38]
  593.                          Use this font for the requester.  Must be a fixed
  594.                          width font, _not_ a proportional one.  Default is to
  595.                          use the screen font or the default font (if the
  596.                          screen font is proportional).  Note that the font
  597.                          must already be opened by you.  ReqTools will call
  598.                          OpenFont() on this TextAttr, _not_ OpenDiskFont()!
  599.                          If the font cannot be opened using OpenFont() or if
  600.                          the font is proportional the default screen font
  601.                          will be used (or the font set with RT_DefaultFont).
  602.     RTFI_Flags         - (ULONG)
  603.                          Several flags:
  604.                            FREQF_NOBUFFER    - do _not_ use a buffer to
  605.                                                remember directory contents
  606.                                                for the next time the file
  607.                                                requester is used.
  608.                            FREQF_MULTISELECT - allow multiple files to be
  609.                                                selected. rtFileRequest() will
  610.                                                return a pointer to an
  611.                                                rtFileList structure which
  612.                                                will contain all selected
  613.                                                files.  Use rtFreeFileList()
  614.                                                to free the memory used by
  615.                                                this file list.
  616.                            FREQF_SELECTDIRS  - set this flag if you wish to
  617.                                                enable the selecting of dirs
  618.                                                as well as files.  You *must*
  619.                                                also set FREQF_MULTISELECT.
  620.                                                Directories will be returned
  621.                                                together with files in
  622.                                                rtFileList, but with StrLen
  623.                                                equal to -1.  If you need the
  624.                                                length of the directory's name
  625.                                                use strlen().
  626.                            FREQF_SAVE        - Set this if you are using the
  627.                                                requester to save or delete
  628.                                                something.  Double-clicking
  629.                                                will be disabled so it is
  630.                                                harder to make a mistake and
  631.                                                select the wrong file.  If the
  632.                                                user enters a non-existent
  633.                                                directory in the drawer string
  634.                                                gadget, a requester will
  635.                                                appear asking if the directory
  636.                                                should be created.
  637.                            FREQF_NOFILES     - Set this if you want to use
  638.                                                the requester to allow the
  639.                                                user to select a directory
  640.                                                rather than a file.  Ideal for
  641.                                                getting a destination dir. May
  642.                                                be used with FREQF_MULTISELECT
  643.                                                and FREQF_SELECTDIRS.
  644.                            FREQF_PATGAD      - When this is set a pattern
  645.                                                gadget will be added to the
  646.                                                requester.
  647.     RTFI_Height        - (ULONG)
  648.                          Suggested height of file requester window.
  649.     RTFI_OkText        - (char *)
  650.                          Replacement text for "Ok" gadget, max 6 chars long.
  651.     RTFI_VolumeRequest - (ULONG) [V38]
  652.                          The presence of this tag turns the file requester
  653.                          into a volume/assign disk requester.  This requester
  654.                          can be used to get a device name ("DF0:", "DH1:",..)
  655.                          or an assign ("C:", "FONTS:",...) from the user.
  656.                          The result of this requester can be found in the
  657.                          filereq->Dir field.  The volume can also be changed
  658.                          with rtChangeReqAttrA() and the RTFI_Dir tag.  Note
  659.                          that the user may edit the disk/assign names, or
  660.                          enter a new one.  Note also that the real device
  661.                          name is returned, not the name of the volume in the
  662.                          device.  For example "DH1:", not "Hard1:".
  663.                          The tag data (ULONG) is used to set following flags:
  664.                            VREQF_NOASSIGNS - Do not include the assigns in
  665.                                              the list, only the real devices.
  666.                            VREQF_NODISKS   - Do not include devices, just
  667.                                              show the assigns.
  668.                            VREQF_ALLDISKS  - Show _all_ devices.  Default
  669.                                              behavior is to show only those
  670.                                              devices which have valid disks
  671.                                              inserted into them.  So if you
  672.                                              have no disk in drive DF0: it
  673.                                              will not show up.  Set this flag
  674.                                              if you do want these devices
  675.                                              included.
  676.                          NOTE: Do *NOT* use { RTFI_VolumeRequest, TRUE }!
  677.                                You are then setting the VREQF_NOASSIGNS flag!
  678.                                Use { RTFI_VolumeRequest, 0 } for a normal
  679.                                volume requester.
  680.                          NOTE: If you use the RTFI_FilterFunc described
  681.                                below the third parameter will be a pointer
  682.                                to a rtVolumeEntry structure rather than a
  683.                                pointer to a FileInfoBlock structure!
  684.                                Tech note: the DOS device list has been
  685.                                unlocked, so it is safe to e.g. Lock() this
  686.                                device and call Info() on this lock.
  687.                          NOTE: A file requester structure allocated with
  688.                                rtAllocRequest() should not be used for both
  689.                                a file and a volume requester. Allocate two
  690.                                requester structures if you need both a file
  691.                                and a volume requester in your program!
  692.     RTFI_FilterFunc    - (struct Hook *) [V38]
  693.                          Call this hook for each file in the directory being
  694.                          read (or for each entry in the volume requester).
  695.                          Parameters are as follows:
  696.                            A0 - (struct Hook *) your hook
  697.                            A2 - (struct rtFileRequester *) your filereq
  698.                            A1 - (struct FileInfoBlock *) fib of file OR
  699.                                 (struct rtVolumeEntry *) device or assign
  700.                                 in case of a volume requester.
  701.                          If your hook returns TRUE the file will be accepted.
  702.                          If it returns FALSE the file will be skipped and
  703.                          will not appear in the requester.
  704.                          IMPORTANT NOTE: If you change your hook's behavior
  705.                                          you _MUST_ purge the requester's
  706.                                          buffer (using rtFreeReqBuffer())!
  707.                          IMPORTANT NOTE: When this callback hook is called
  708.                                          from a volume requester the
  709.                                          pr_WindowPtr of your process will
  710.                                          be set to -1 so *no* DOS requesters
  711.                                          will appear when an error occurs!
  712.     RTFI_AllowEmpty    - (BOOL) [V38]
  713.                          If RTFI_AllowEmpty is TRUE an empty file string will
  714.                          also be accepted and returned.  Defaults to FALSE,
  715.                          meaning that if the user enters no filename the
  716.                          requester will be canceled.  You should use this tag
  717.                          as little as possible!
  718.  
  719.   RESULT
  720.     ret - TRUE if the user selected a file (check 'filereq->Dir' for the
  721.           directory and 'filename' for the filename) or FALSE if the
  722.           requester was canceled -- or a pointer to a struct rtFileList
  723.           (if FREQF_MULTISELECT was used).
  724.  
  725.   NOTE
  726.     You CANNOT call the file requester from a task because it uses DOS calls!
  727.  
  728.     Automatically adjusts the requester to the screen font.
  729.     If the screen font is proportional the default font will be used.
  730.  
  731.     If the requester got too big for the screen because of a very large font,
  732.     the topaz.font will be used.
  733.  
  734.     rtFileRequest() checks the pr_WindowPtr of your process to find the
  735.     screen to put the requester on.
  736.  
  737.   BUGS
  738.     none known
  739.  
  740.   SEE ALSO
  741.  
  742. reqtools.library/rtFontRequestA               reqtools.library/rtFontRequestA
  743.  
  744.   NAME  rtFontRequestA()
  745.  
  746.     bool = rtFontRequestA (fontreq, title, taglist);
  747.  
  748.     BOOL rtFontRequestA (struct rtFontRequester *, char *, struct TagItem *);
  749.     D0                   A1                        A3      A0
  750.  
  751.     bool = rtFontRequest (fontreq, title, tag1,...);
  752.  
  753.     BOOL rtFontRequest (struct rtFontRequester *, char *, Tag,...);
  754.  
  755.   DESCRIPTION
  756.     Let the user select a font and a style (optional).
  757.  
  758.   INPUTS
  759.     fontreq  - pointer to a struct rtFontRequester allocated with
  760.                rtAllocRequestA().
  761.     title    - pointer to requester window title (null terminated).
  762.     taglist  - pointer to a TagItem array.
  763.  
  764.   TAGS
  765.     RT_Window         - see rtEZRequestA()
  766.     RT_ReqPos         - see rtEZRequestA()
  767.     RT_LeftOffset     - see rtEZRequestA()
  768.     RT_TopOffset      - see rtEZRequestA()
  769.     RT_PubScrName     - see rtEZRequestA()
  770.     RT_Screen         - see rtEZRequestA()
  771.     RT_ReqHandler     - see rtEZRequestA()
  772.     RT_WaitPointer    - see rtEZRequestA()
  773.     RT_LockWindow     - [V38] see rtEZRequestA()
  774.     RT_ScreenToFront  - [V38] see rtEZRequestA()
  775.     RT_ShareIDCMP     - [V38] see rtEZRequestA()
  776.     RT_Locale         - [V38] see rtEZRequestA()
  777.     RT_IntuiMsgFunc   - (struct Hook *) [V38]
  778.                         The requester will call this hook for each IDCMP
  779.                         message it gets that doesn't belong to its window.
  780.                         Only applies if you used the RT_ShareIDCMP tag to
  781.                         share the IDCMP port with the parent window.
  782.                         Parameters are as follows:
  783.                           A0 - (struct Hook *) your hook
  784.                           A2 - (struct rtFontRequester *) your requester
  785.                           A1 - (struct IntuiMessage *) the message
  786.                         After you have finished examining the message and
  787.                         your hook returns, ReqTools will reply the message.
  788.                         So do not reply the message yourself!
  789.     RT_Underscore     - (char) [V38]
  790.                         Indicates the symbol that precedes the character in
  791.                         a gadget's label to be underscored.  This will also
  792.                         define the keyboard shortcut for this gadget.
  793.                         Currently only needed for RTFO_OkText.  Usually set
  794.                         to '_'.
  795.     RT_DefaultFont    - (struct TextFont *)
  796.                         This tag allows you to specify the font to be used in
  797.                         the requester when the screen font is proportional.
  798.                         Default is GfxBase->DefaultFont.
  799.     RT_TextAttr       - [V38] see rtFileRequestA()
  800.                         Remember: font cannot be proportional!
  801.     RTFO_Flags        - (ULONG)
  802.                         Several flags:
  803.                           FREQF_NOBUFFER      - do not buffer the font list
  804.                                                 for subsequent calls to
  805.                                                 rtFontRequestA().
  806.                           FREQF_FIXEDWIDTH    - only show fixed-width fonts.
  807.                           FREQF_COLORFONTS    - show color fonts also.
  808.                           FREQF_CHANGEPALETTE - change the screen's palette
  809.                                                 to match that of a selected
  810.                                                 color font.
  811.                           FREQF_LEAVEPALETTE  - leave the palette as it is
  812.                                                 when exiting rtFontRequestA()
  813.                                                 Useful in combination with
  814.                                                 FREQF_CHANGEPALETTE.
  815.                           FREQF_SCALE         - allow fonts to be scaled
  816.                                                 when they don't exist in the
  817.                                                 requested size.
  818.                                                 (works on Kickstart 2.0 only,                                                
  819.                                                  has no effect on 1.2/1.3).
  820.                           FREQF_STYLE         - include gadgets so the user
  821.                                                 may select the font's style.
  822.     RTFO_Height       - (ULONG)
  823.                         Suggested height of font requester window.
  824.     RTFO_OkText       - (char *)
  825.                         Replacement text for "Ok" gadget.  Maximum 6 chars.
  826.                         (7 is still ok, but not esthetically pleasing)
  827.     RTFO_SampleHeight - (ULONG)
  828.                         Height of font sample display in pixels (default 24).
  829.     RTFO_MinHeight    - (ULONG)
  830.                         Minimum font size displayed.
  831.     RTFO_MaxHeight    - (ULONG)
  832.                         Maximum font size displayed.
  833.     RTFO_FilterFunc   - (struct Hook *) [V38]
  834.                         Call this hook for each available font.
  835.                         Parameters are as follows:
  836.                           A0 - (struct Hook *) your hook
  837.                           A2 - (struct rtFontRequester *) your filereq
  838.                           A1 - (struct TextAttr *) textattr of font
  839.                         If your hook returns TRUE the font will be accepted.
  840.                         If it returns FALSE the font will be skipped and
  841.                         will not appear in the requester.
  842.                         IMPORTANT NOTE:  If you change your hook's behavior
  843.                         you _MUST_ purge the requester's buffer (using
  844.                         rtFreeReqBuffer())!
  845.  
  846.   RESULT
  847.     bool - TRUE if the user selected a font (freq->Attr holds the font),
  848.            FALSE if the requester was canceled.
  849.  
  850.   NOTE
  851.     You CANNOT call the font requester from a task because it may use DOS
  852.     calls!
  853.  
  854.     Automatically adjusts the requester to the screen font.
  855.     If the screen font is proportional the default font will be used.
  856.  
  857.     If the requester got too big for the screen because of a very large font,
  858.     the topaz.font will be used.
  859.  
  860.     rtFontRequest() checks the pr_WindowPtr of your process to find the
  861.     screen to put the requester on.
  862.  
  863.   BUGS
  864.     none known
  865.  
  866.   SEE ALSO
  867.  
  868. reqtools.library/rtFreeFileList               reqtools.library/rtFreeFileList
  869.  
  870.   NAME  rtFreeFileList()
  871.  
  872.     rtFreeFileList (filelist);
  873.  
  874.     void rtFreeFileList (struct rtFileList *);
  875.                          A0
  876.  
  877.   DESCRIPTION
  878.     Frees a filelist returned by rtFileRequest() when the FREQF_MULTISELECT
  879.     flag was set.  Call this after you have scanned the filelist and you no
  880.     longer need it.
  881.  
  882.   INPUTS
  883.     filelist - pointer to rtFileList structure, returned by rtFileRequest()
  884.                (may be NULL).
  885.  
  886.   RESULT
  887.     none
  888.  
  889.   BUGS
  890.     none known
  891.  
  892.   SEE ALSO
  893.     rtFileRequest()
  894.  
  895. reqtools.library/rtFreeReqBuffer             reqtools.library/rtFreeReqBuffer
  896.  
  897.   NAME  rtFreeReqBuffer()
  898.  
  899.     rtFreeReqBuffer (req);
  900.  
  901.     void rtFreeReqBuffer (APTR);
  902.                           A1
  903.  
  904.   DESCRIPTION
  905.     Frees the buffer associated with 'req'.  In case of a file requester this
  906.     function will deallocate the directory buffer, in case of a font
  907.     requester the font list.
  908.  
  909.     It is safe to call this function for requesters that have no buffer, so
  910.     you may call this for all requesters to free as much memory as possible.
  911.  
  912.   INPUTS
  913.     req - pointer to requester.
  914.  
  915.   RESULT
  916.     none
  917.  
  918.   BUGS
  919.     none known
  920.  
  921.   SEE ALSO
  922.     rtFileRequest(), rtFontRequest()
  923.  
  924. reqtools.library/rtFreeRequest                 reqtools.library/rtFreeRequest
  925.  
  926.   NAME  rtFreeRequest()
  927.  
  928.     rtFreeRequest (req);
  929.  
  930.     void rtFreeRequest (APTR);
  931.                         A1
  932.  
  933.   DESCRIPTION
  934.     Free requester structure previously allocated by rtAllocRequestA().
  935.     This will also free all buffers associated with the requester, so there
  936.     is no need to call rtFreeReqBuffer() first.
  937.  
  938.   INPUTS
  939.     req - pointer to requester (may be NULL).
  940.  
  941.   RESULT
  942.     none
  943.  
  944.   BUGS
  945.     none known
  946.  
  947.   SEE ALSO
  948.     rtAllocRequestA()
  949.  
  950. reqtools.library/rtGetLongA                       reqtools.library/rtGetLongA
  951.  
  952.   NAME  rtGetLongA()
  953.  
  954.     ret = rtGetLongA (&longvar, title, reqinfo, taglist);
  955.  
  956.     ULONG rtGetLongA (ULONG *, char *, struct rtReqInfo *, struct TagItem *);
  957.     D0                A1       A2      A3                  A0
  958.  
  959.     ret = rtGetLong (&longvar, title, reqinfo, tag1,...);
  960.  
  961.     ULONG rtGetLong (ULONG *, char *, struct rtReqInfo *, Tag,...);
  962.  
  963.   DESCRIPTION
  964.     Puts up a requester to get a signed long (32-bit) number from the user.
  965.  
  966.     'reqinfo' can be used to customize the requester.  For greater control
  967.     use the tags listed below.  The advantage of the rtReqInfo structure is
  968.     that it is global, where tags have to be specified each function call.
  969.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  970.  
  971.   INPUTS
  972.     &longvar - address of long (32 bit!) variable to hold result.
  973.     title    - pointer to null terminated title of requester window.
  974.     reqinfo  - pointer to a rtReqInfo structure allocated with
  975.                rtAllocRequest() or NULL.
  976.     taglist  - pointer to a TagItem array.
  977.  
  978.   TAGS
  979.     RT_Window        - see rtEZRequestA()
  980.     RT_IDCMPFlags    - see rtEZRequestA()
  981.     RT_ReqPos        - see rtEZRequestA()
  982.     RT_LeftOffset    - see rtEZRequestA()
  983.     RT_TopOffset     - see rtEZRequestA()
  984.     RT_PubScrName    - see rtEZRequestA()
  985.     RT_Screen        - see rtEZRequestA()
  986.     RT_ReqHandler    - see rtEZRequestA()
  987.     RT_WaitPointer   - see rtEZRequestA()
  988.     RT_Underscore    - [V38] see rtEZRequestA()
  989.                        Only when you also use the RTGL_GadFmt tag.
  990.     RT_LockWindow    - [V38] see rtEZRequestA()
  991.     RT_ScreenToFront - [V38] see rtEZRequestA()
  992.     RT_ShareIDCMP    - [V38] see rtEZRequestA()
  993.     RT_Locale        - [V38] see rtEZRequestA()
  994.     RT_IntuiMsgFunc  - [V38] see rtEZRequestA()
  995.     RT_TextAttr      - [V38] see rtEZRequestA()
  996.                        Note that under 1.2/1.3 the string gadget's font
  997.                        will remain the screen font.
  998.     RTGL_Min         - (ULONG)
  999.                        Minimum allowed value. If the user tries to enter a
  1000.                        smaller value the requester will refuse to accept it.
  1001.     RTGL_Max         - (ULONG)
  1002.                        Maximum allowed value, higher values are refused.
  1003.     RTGL_Width       - (ULONG)
  1004.                        Width of requester window in pixels.  This is only a
  1005.                        suggestion. rtGetLongA() will not go below a
  1006.                        certain width.
  1007.     RTGL_ShowDefault - (BOOL)
  1008.                        If this is TRUE (default) the value already in
  1009.                        'longvar' will be displayed in the requester when it
  1010.                        comes up. If set to FALSE the requester will be empty.
  1011.     RTGL_GadFmt      - (char *) [V38]
  1012.                        Using this tag you can offer the user several
  1013.                        responses.  See rtEZRequestA() for more information.
  1014.                        Note that selecting this gadget is considered a
  1015.                        positive response so the integer in the gadget is
  1016.                        copied to '&longvar'.
  1017.     RTGL_GadFmtArgs  - (APTR) [V38]
  1018.                        If you used formatting codes with RTGL_GadFmt use this
  1019.                        tag to pass the arguments.
  1020.     RTGL_Invisible   - (BOOL) [V38]
  1021.                        Using this tag you can switch on invisible typing.
  1022.                        Very useful if you need to get something like a
  1023.                        code number from the user.  It is strongly advised to
  1024.                        use { RTGL_ShowDefault, FALSE } or the user may get 
  1025.                        very confused!  Default is FALSE.
  1026.     RTGL_BackFill    - (BOOL) [V38]
  1027.                        Backfill requester window with pattern.  Default TRUE.
  1028.     RTGL_TextFmt     - (char *) [V38]
  1029.                        Print these lines of text above the gadget in the
  1030.                        requester.  Very useful to inform the user of what
  1031.                        he should enter.  Most of the time you will also want
  1032.                        to set the GLREQF_CENTERTEXT flag.  If you set the
  1033.                        RTGL_BackFill tag to FALSE _no_ recessed border will
  1034.                        be placed around the text.  Formatting codes may be
  1035.                        used in the string (see RTGL_TextFmtArgs tag).
  1036.     RTGL_TextFmtArgs - (APTR) [V38]
  1037.                        If you used formatting codes with RTGL_TextFmt use
  1038.                        this tag to pass the arguments.
  1039.     RTGL_Flags       - (ULONG) [V38]
  1040.                          GLREQF_CENTERTEXT    - centers each line of text
  1041.                                                 above the gadget in the
  1042.                                                 requester window. Should
  1043.                                                 be generally set.
  1044.                          GLREQF_HIGHLIGHTTEXT - Highlight text above the
  1045.                                                 gadget. You will normally
  1046.                                                 only want to use this if you
  1047.                                                 also turned off the window
  1048.                                                 backfilling.
  1049.  
  1050.   RESULT
  1051.     ret - TRUE if user entered a number, FALSE if not. If one of your idcmp
  1052.           flags caused the requester to end 'ret' will hold this flag.
  1053.           If you used the RTGL_GadFmt tag the return code will hold the
  1054.           value of the response as with rtEZRequestA().
  1055.  
  1056.   NOTE
  1057.     'longvar' will NOT change if the requester is aborted.
  1058.  
  1059.     Automatically adjusts the requester to the screen font.
  1060.  
  1061.     rtGetLongA() checks the pr_WindowPtr of your process to find the
  1062.     screen to put the requester on.
  1063.  
  1064.     If you use the RTGL_GadFmt tag the return value is not always the gadget
  1065.     the user selected.  If the integer gadget is empty and the user presses
  1066.     the leftmost gadget (normally 'Ok') rtGetLong() will return 0 (FALSE)!
  1067.     If the integer gadget is empty and the user presses one of the other
  1068.     gadgets rtGetLong() _will_ return its value!  Important: &longvar will
  1069.     not be changed in either of these cases.
  1070.  
  1071.   BUGS
  1072.     none known
  1073.  
  1074.   SEE ALSO
  1075.  
  1076. reqtools.library/rtGetStringA                   reqtools.library/rtGetStringA
  1077.  
  1078.   NAME  rtGetStringA()
  1079.  
  1080.     ret = rtGetStringA (buffer, maxchars, title, reqinfo, taglist);
  1081.  
  1082.     ULONG rtGetStringA
  1083.               (UBYTE *, ULONG, char *, struct rtReqInfo *, struct TagItem *);
  1084.     D0         A1       D0     A2      A3                  A0
  1085.  
  1086.     ret = rtGetString (buffer, maxchars, title, reqinfo, tag1,...);
  1087.  
  1088.     ULONG rtGetString (UBYTE *, ULONG, char *, struct rtReqInfo *, Tag,...);
  1089.  
  1090.   DESCRIPTION
  1091.     Puts up a string requester to get a line of text from the user.
  1092.     The string present in 'buffer' upon entry will be displayed, ready to
  1093.     be edited.
  1094.  
  1095.     'reqinfo' can be used to customize the requester.  For greater control
  1096.     use the tags listed below.  The advantage of the rtReqInfo structure is
  1097.     that it is global, where tags have to be specified each function call.
  1098.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  1099.  
  1100.   INPUTS
  1101.     buffer   - pointer to buffer to hold characters entered.
  1102.     maxchars - maximum number of characters that fit in buffer (EX-cluding
  1103.                the 0 to terminate the string !).
  1104.     title    - pointer to null terminated title of requester window.
  1105.     reqinfo  - pointer to a rtReqInfo structure allocated with
  1106.                rtAllocRequest() or NULL.
  1107.     taglist  - pointer to a TagItem array.
  1108.  
  1109.   TAGS
  1110.     RT_Window        - see rtEZRequestA()
  1111.     RT_IDCMPFlags    - see rtEZRequestA()
  1112.     RT_ReqPos        - see rtEZRequestA()
  1113.     RT_LeftOffset    - see rtEZRequestA()
  1114.     RT_TopOffset     - see rtEZRequestA()
  1115.     RT_PubScrName    - see rtEZRequestA()
  1116.     RT_Screen        - see rtEZRequestA()
  1117.     RT_ReqHandler    - see rtEZRequestA()
  1118.     RT_WaitPointer   - see rtEZRequestA()
  1119.     RT_Underscore    - [V38] see rtEZRequestA()
  1120.                        Only when you also use the RTGS_GadFmt tag.
  1121.     RT_LockWindow    - [V38] see rtEZRequestA()
  1122.     RT_ScreenToFront - [V38] see rtEZRequestA()
  1123.     RT_ShareIDCMP    - [V38] see rtEZRequestA()
  1124.     RT_Locale        - [V38] see rtEZRequestA()
  1125.     RT_IntuiMsgFunc  - [V38] see rtEZRequestA()
  1126.     RT_TextAttr      - [V38] see rtEZRequestA()
  1127.                        Note that under 1.2/1.3 the string gadget's font
  1128.                        will remain the screen font.
  1129.     RTGS_Width       - (ULONG)
  1130.                        Width of requester window in pixels.  This is only a
  1131.                        suggestion. rtGetStringA() will not go below a certain
  1132.                        width.
  1133.     RTGS_AllowEmpty  - (BOOL)
  1134.                        If RTGS_AllowEmpty is TRUE an empty string will also
  1135.                        be accepted and returned.  Defaults to FALSE, meaning
  1136.                        that if the user enters an empty string the requester
  1137.                        will be canceled.
  1138.     RTGS_GadFmt      - (char *) [V38]
  1139.                        Using this tag you can offer the user several
  1140.                        responses.  See rtEZRequestA() for more information.
  1141.                        Note that selecting this gadget is considered a
  1142.                        positive response so the string in the gadget is
  1143.                        copied to 'buffer'.
  1144.     RTGS_GadFmtArgs  - (APTR) [V38]
  1145.                        If you used formatting codes with RTGS_GadFmt use this
  1146.                        tag to pass the arguments.
  1147.     RTGS_Invisible   - (BOOL) [V38]
  1148.                        Using this tag you can switch on invisible typing.
  1149.                        Very useful if you need to get something like a
  1150.                        password from the user.  It is strongly advised to use
  1151.                        an empty initial string or the user may get very
  1152.                        confused!  Default is FALSE.
  1153.     RTGS_BackFill    - (BOOL) [V38]
  1154.                        Backfill requester window with pattern.  Default TRUE.
  1155.     RTGS_TextFmt     - (char *) [V38]
  1156.                        Print these lines of text above the gadget in the
  1157.                        requester.  Very useful to inform the user of what
  1158.                        he should enter.  Most of the time you will also want
  1159.                        to set the GSREQF_CENTERTEXT flag.  If you set the
  1160.                        RTGS_BackFill tag to FALSE _no_ recessed border will
  1161.                        be placed around the text.  Formatting codes may be
  1162.                        used in the string (see RTGS_TextFmtArgs tag).
  1163.     RTGS_TextFmtArgs - (APTR) [V38]
  1164.                        If you used formatting codes with RTGS_TextFmt use
  1165.                        this tag to pass the arguments.
  1166.     RTGS_Flags       - (ULONG) [V38]
  1167.                          GSREQF_CENTERTEXT    - centers each line of text
  1168.                                                 above the gadget in the
  1169.                                                 requester window. Should
  1170.                                                 be generally set.
  1171.                          GSREQF_HIGHLIGHTTEXT - Highlight text above the
  1172.                                                 gadget. You will normally
  1173.                                                 only want to use this if you
  1174.                                                 also turned off the window
  1175.                                                 backfilling.
  1176.  
  1177.   RESULT
  1178.     ret - TRUE if user entered something, FALSE if not. If one of your idcmp
  1179.           flags caused the requester to end 'ret' will hold this flag.
  1180.           If you used the RTGS_GadFmt tag the return code will hold the
  1181.           value of the response as with rtEZRequestA().
  1182.  
  1183.   NOTE
  1184.     The contents of the buffer will NOT change if the requester is aborted.
  1185.  
  1186.     Automatically adjusts the requester to the screen font.
  1187.  
  1188.     rtGetStringA() checks the pr_WindowPtr of your process to find the
  1189.     screen to put the requester on.
  1190.  
  1191.     If you use the RTGS_GadFmt tag the return value is not always the gadget
  1192.     the user selected.  If the string gadget is empty and the user presses
  1193.     the leftmost gadget (normally 'Ok') rtGetString() will return 0 (FALSE)!
  1194.     If the string gadget is empty and the user presses one of the other
  1195.     gadgets rtGetString() _will_ return its value!  Important: 'buffer' will
  1196.     not be changed in either of these cases.
  1197.     If you set the RTGS_AllowEmpty tag to TRUE 'buffer' will always be
  1198.     changed of course, and rtGetString() will always return the value of the
  1199.     gadget pressed.
  1200.  
  1201.   BUGS
  1202.     none known
  1203.  
  1204.   SEE ALSO
  1205.  
  1206. reqtools.library/rtGetVScreenSize           reqtools.library/rtGetVScreenSize
  1207.  
  1208.   NAME  rtGetVScreenSize()
  1209.  
  1210.     rtGetVScreenSize (screen, widthptr, heightptr);
  1211.  
  1212.     ULONG rtGetVScreenSize (struct Screen *, ULONG *, ULONG *);
  1213.     D0                      A0               A1       A2
  1214.  
  1215.   DESCRIPTION
  1216.     Use this function to get the size of the visible portion of a screen.
  1217.  
  1218.     The value returned by rtGetVScreenSize() can be used for vertical
  1219.     spacing.  It will be larger for interlaced and productivity screens.
  1220.     Using this number for spacing will assure your requester will look
  1221.     good on an interlaced and a non-interlaced screen.
  1222.  
  1223.     Current return codes are 2 for non-interlaced and 4 for interlaced.
  1224.     These values may change in the future, don't depend on them too much.
  1225.     They will in any case remain of the same magnitude.
  1226.  
  1227.   INPUTS
  1228.     screen    - pointer to the screen.
  1229.     widthptr  - address of an ULONG variable to hold the width.
  1230.     heightptr - address of an ULONG variable to hold the height.
  1231.  
  1232.   RESULT
  1233.     none
  1234.  
  1235.   NOTE
  1236.     This function is for the advanced ReqTools user.
  1237.  
  1238.   BUGS
  1239.  
  1240.   SEE ALSO
  1241.  
  1242. reqtools.library/rtLockWindow                   reqtools.library/rtLockWindow
  1243.  
  1244.   NAME  rtLockWindow() [V38]
  1245.  
  1246.     windowlock = rtLockWindow (window);
  1247.  
  1248.     APTR rtLockWindow (struct Window *);
  1249.     D0                 A0
  1250.  
  1251.   DESCRIPTION
  1252.     Lock a window so it will no longer accept any user input.  The only
  1253.     functions left to the user are depth arrangement and window dragging.
  1254.     All gadgets will be un-selectable and the window can not be resized.
  1255.     It will also get the standard wait pointer set.  The pointer at the
  1256.     time of locking will be restored when the window is unlocked.
  1257.  
  1258.     You may nest calls to rtLockWindow() and rtUnlockWindow().  Just make
  1259.     sure you unlock the window in the correct (opposite) order.
  1260.  
  1261.     See the RT_LockWindow tag for an automatic way of locking your window.
  1262.  
  1263.     Use this function (and rtUnlockWindow()) instead of rtSetWaitPointer().
  1264.  
  1265.   INPUTS
  1266.     window - pointer to the window to be locked.
  1267.  
  1268.   RESULT
  1269.     windowlock - a pointer to a (private) window lock.  You must pass this
  1270.                  to rtUnlockWindow() to unlock the window again.
  1271.                  Never mind if this is NULL.  This means there was not enough
  1272.                  memory and the window will not be locked.  There is no
  1273.                  sense in reporting this, just carry on and pass the NULL
  1274.                  window lock to rtUnlockWindow().
  1275.  
  1276.   NOTE
  1277.     The wait pointer will look exactly like the standard Workbench 2.0
  1278.     wait pointer.  In combination with PointerX, ClockTick or LacePointer
  1279.     the handle will turn.
  1280.  
  1281.   BUGS
  1282.     none known
  1283.  
  1284.   SEE ALSO
  1285.  
  1286. reqtools.library/rtPaletteRequestA         reqtools.library/rtPaletteRequestA
  1287.  
  1288.   NAME  rtPaletteRequestA()
  1289.  
  1290.     color = rtPaletteRequestA (title, reqinfo, taglist);
  1291.  
  1292.     LONG rtPaletteRequestA (char *, struct rtReqInfo *, struct TagItem *);
  1293.     D0                      A2      A3                  A0
  1294.  
  1295.     color = rtPaletteRequest (title, reqinfo, tag1,...);
  1296.  
  1297.     LONG rtPaletteRequest (char *, struct rtReqInfo *, Tag,...);
  1298.  
  1299.   DESCRIPTION
  1300.     Put up a palette requester so the user can change the screen's colors.
  1301.  
  1302.     The colors are changed in the viewport of the screen the requester will
  1303.     appear on, so that is where you will find them after the palette
  1304.     requester returns.
  1305.  
  1306.     The selected color is returned, so you can also use this requester to let
  1307.     the user select a color.
  1308.  
  1309.     'reqinfo' can be used to customize the requester.  For greater control
  1310.     use the tags listed below.  The advantage of the rtReqInfo structure is
  1311.     that it is global, where tags have to be specified each function call.
  1312.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  1313.  
  1314.   INPUTS
  1315.     title   - pointer to requester window title (null terminated).
  1316.     reqinfo - pointer to a rtReqInfo structure allocated with
  1317.               rtAllocRequest() or NULL.
  1318.     taglist - pointer to a TagItem array.
  1319.  
  1320.   TAGS
  1321.     RT_Window        - see rtEZRequestA()
  1322.     RT_ReqPos        - see rtEZRequestA()
  1323.     RT_LeftOffset    - see rtEZRequestA()
  1324.     RT_TopOffset     - see rtEZRequestA()
  1325.     RT_PubScrName    - see rtEZRequestA()
  1326.     RT_Screen        - see rtEZRequestA()
  1327.     RT_ReqHandler    - see rtEZRequestA()
  1328.     RT_WaitPointer   - see rtEZRequestA()
  1329.     RT_LockWindow    - [V38] see rtEZRequestA()
  1330.     RT_ScreenToFront - [V38] see rtEZRequestA()
  1331.     RT_ShareIDCMP    - [V38] see rtEZRequestA()
  1332.     RT_Locale        - [V38] see rtEZRequestA()
  1333.     RT_IntuiMsgFunc  - [V38] see rtEZRequestA()
  1334.     RT_DefaultFont   - (struct TextFont *)
  1335.                        This tag allows you to specify the font to be used in
  1336.                        the requester when the screen font is proportional.
  1337.                        Default is GfxBase->DefaultFont.
  1338.     RT_TextAttr      - [V38] see rtFileRequestA()
  1339.                        Remember: font cannot be proportional!
  1340.     RTPA_Color       - (ULONG)
  1341.                        Initially selected color of palette.  Default is 1.
  1342.  
  1343.   RESULT
  1344.     color - the color number of the selected color or -1 if the user
  1345.             canceled the requester.
  1346.  
  1347.   NOTE
  1348.     Automatically adjusts the requester to the screen font.
  1349.     If the screen font is proportional the default font will be used.
  1350.  
  1351.     If the requester got too big for the screen because of a very large font,
  1352.     the topaz.font will be used.
  1353.  
  1354.     rtPaletteRequestA() checks the pr_WindowPtr of your process to find the
  1355.     screen to put the requester on.
  1356.  
  1357.   BUGS
  1358.     none known
  1359.  
  1360.   SEE ALSO
  1361.  
  1362. reqtools.library/rtReqHandlerA                 reqtools.library/rtReqHandlerA
  1363.  
  1364.   NAME  rtReqHandlerA()
  1365.  
  1366.     ret = rtReqHandlerA (handlerinfo, sigs, taglist);
  1367.  
  1368.     ULONG rtReqHandlerA (struct rtHandlerInfo *, ULONG, struct TagItem *);
  1369.     D0                   A1                      D0     A0
  1370.  
  1371.     ret = rtReqHandler (handlerinfo, sigs, tag1,...);
  1372.  
  1373.     ULONG rtReqHandler (struct rtHandlerInfo *, ULONG, Tag,...);
  1374.  
  1375.   DESCRIPTION
  1376.     This function should be called if you used the RT_ReqHandler tag with a
  1377.     requester function.
  1378.  
  1379.     The requester you used the tag with will have returned immediately after
  1380.     its initialization and will have initialized a pointer to a rtHandlerInfo
  1381.     structure for you.
  1382.     You should now do the following:
  1383.  
  1384.     Check the DoNotWait field. If it is FALSE you have to wait for the
  1385.     signals in the WaitMask field (plus your own signals if you like).
  1386.     If any of the signals in WaitMask are received or DoNotWait was not FALSE
  1387.     you have to call rtReqHandlerA() and check its return value for one of
  1388.     the following values:
  1389.  
  1390.       CALL_HANDLER    - Check DoNotWait again, Wait() if you have to
  1391.                         and call rtReqHandlerA() again. In other words, loop.
  1392.       everything else - normal return value, requester has finished. This
  1393.                         return value will be the same as if the requester
  1394.                         had run normally.
  1395.  
  1396.     You must pass the signals you received to rtReqHandlerA().
  1397.  
  1398.     NOTE: if you want to wait for your own signals do not do so if
  1399.           DoNotWait is TRUE.  Call rtReqHandlerA() and if you must know
  1400.           if one of your signals arrived use SetSignal() to find this out.
  1401.           If you are waiting for a message to arrive at a message port you
  1402.           can simple call GetMsg() and check if it is non-null.
  1403.           DoNotWait will naturally only be TRUE when it absolutely,
  1404.           positively has to be.  A multitasking machine as the Amiga should
  1405.           use Wait() as much as possible.
  1406.  
  1407.     This is an example of a "requester loop":
  1408.  
  1409.     ...
  1410.     struct rtHandlerInfo *hinfo;
  1411.     ULONG ret, mymask, sigs;
  1412.  
  1413.     ...
  1414.        /* calculate our mask */
  1415.        mymask = 1 << win->UserPort->mp_SigBit;
  1416.  
  1417.        /* We use the RT_ReqHandler tag to cause the requester to return
  1418.           after initializing.
  1419.           Check the return value to see if this setup went ok. */
  1420.        if (rtFontRequest (req, "Font", RT_ReqHandler, &hinfo, TAG_END)
  1421.                                                            == CALL_HANDLER) {
  1422.           do {
  1423.             /* Wait() if we can */
  1424.             if (!hinfo->DoNotWait)
  1425.                sigs = Wait (hinfo->WaitMask | mymask);
  1426.  
  1427.             /* check our own message port */
  1428.             while (msg = GetMsg (win->UserPort)) {
  1429.                ...
  1430.                /* here we handle messages received at our windows IDCMP               ...
  1431.                   port */
  1432.                ...
  1433.                }
  1434.  
  1435.             /* let the requester do its thing (remember to pass 'sigs') */
  1436.             ret = rtReqHandler (hinfo, sigs, TAG_END);
  1437.  
  1438.             /* continue this loop as long as the requester is up */
  1439.             } while (ret == CALL_HANDLER)
  1440.  
  1441.           /* when we get here we know the requester has finished, 'ret'
  1442.              is the return code. */
  1443.           ...
  1444.           }
  1445.        else notify ("Error opening requester!");
  1446.     ...
  1447.  
  1448.   INPUTS
  1449.     handlerinfo - pointer to handler info structure initialized by using
  1450.                   the RT_ReqHandler tag when calling a requester function.
  1451.     sigs        - the signals received by previous wait, will be ignored if
  1452.                   hinfo->DoNotWait was TRUE.
  1453.     taglist     - pointer to a TagItem array.
  1454.  
  1455.   TAGS
  1456.     RTRH_EndRequest - supplying this tag will end the requester. The return
  1457.                       code from rtReqHandlerA() will _not_ be CALL_HANDLER,
  1458.                       but the requester return code.  If the tagdata of this
  1459.                       tag is REQ_CANCEL the requester will be canceled, if it
  1460.                       is REQ_OK the requester will be ok-ed.
  1461.                       In case of an EZRequest tagdata should be the return
  1462.                       code of the requester (TRUE, FALSE or 2,3,4,...).
  1463.  
  1464.   RESULT
  1465.     ret - CALL_HANDLER if you have to call rtReqHandlerA() again,
  1466.           or the normal return value from the requester.
  1467.  
  1468.   BUGS
  1469.     none known
  1470.  
  1471.   SEE ALSO
  1472.     rtEZRequest() (RT_ReqHandler explanation)
  1473.  
  1474. reqtools.library/rtScreenModeRequestA   reqtools.library/rtScreenModeRequestA
  1475.  
  1476.   NAME  rtScreenModeRequestA() [V38]
  1477.  
  1478.     ret = rtScreenModeRequestA (screenmodereq, title, taglist);
  1479.  
  1480.     BOOL rtScreenModeRequestA 
  1481.                   (struct rtScreenModeRequester *, char *, struct TagItem *);
  1482.     D0             A1                              A3      A0
  1483.  
  1484.     ret = rtScreenModeRequest (screenmodereq, title, tag1,...);
  1485.  
  1486.     BOOL rtScreenModeRequest
  1487.                            (struct rtScreenModeRequester *, char *, Tag,...);
  1488.  
  1489.   DESCRIPTION
  1490.  
  1491.     *IMPORTANT* THIS REQUESTER IS ONLY AVAILABLE FROM KICKSTART 2.0 ONWARDS!
  1492.                 The 1.3 version of ReqTools also contains the screenmode
  1493.                 requester, but unless you are running 2.0 or higher it will
  1494.                 not come up.  So what you essentially have to do is NOT
  1495.                 call rtScreenModeRequestA() if your program is running on
  1496.                 a machine with Kickstart 1.2/1.3.  You can safely call
  1497.                 rtScreenModeRequestA() if you are running on a 2.0 machine,
  1498.                 even if the user has installed the 1.3 version of ReqTools.
  1499.  
  1500.     Get a screen mode from the user.
  1501.  
  1502.     The user will be able to pick a screen mode by name, enter the size and
  1503.     the number of colors (bitplane depth).
  1504.  
  1505.     rtScreenModeRequestA() will call the appropriate 2.0 functions to get all
  1506.     the mode's information.  If no name has been assigned to the mode one
  1507.     will be constructed automatically.
  1508.  
  1509.   INPUTS
  1510.     screenmodereq - pointer to a struct rtScreenModeRequester allocated with
  1511.                     rtAllocRequestA().
  1512.     title         - pointer to requester window title (null terminated).
  1513.     taglist       - pointer to a TagItem array.
  1514.  
  1515.   TAGS
  1516.     RT_Window          - see rtEZRequestA()
  1517.     RT_ReqPos          - see rtEZRequestA()
  1518.     RT_LeftOffset      - see rtEZRequestA()
  1519.     RT_TopOffset       - see rtEZRequestA()
  1520.     RT_PubScrName      - see rtEZRequestA()
  1521.     RT_Screen          - see rtEZRequestA()
  1522.     RT_ReqHandler      - see rtEZRequestA()
  1523.     RT_WaitPointer     - see rtEZRequestA()
  1524.     RT_LockWindow      - see rtEZRequestA()
  1525.     RT_ScreenToFront   - see rtEZRequestA()
  1526.     RT_ShareIDCMP      - see rtEZRequestA()
  1527.     RT_Locale          - see rtEZRequestA()
  1528.     RT_IntuiMsgFunc    - (struct Hook *) [V38]
  1529.                          The requester will call this hook for each IDCMP
  1530.                          message it gets that doesn't belong to its window.
  1531.                          Only applies if you used the RT_ShareIDCMP tag to
  1532.                          share the IDCMP port with the parent window.
  1533.                          Parameters are as follows:
  1534.                            A0 - (struct Hook *) your hook
  1535.                            A2 - (struct rtScreenModeRequester *) your req
  1536.                            A1 - (struct IntuiMessage *) the message
  1537.                          After you have finished examining the message and
  1538.                          your hook returns, ReqTools will reply the message.
  1539.                          So do not reply the message yourself!
  1540.     RT_Underscore      - (char) [V38]
  1541.                          Indicates the symbol that precedes the character in
  1542.                          a gadget's label to be underscored.  This will also
  1543.                          define the keyboard shortcut for this gadget.
  1544.                          Currently only needed for RTSC_OkText.  Usually set
  1545.                          to '_'.
  1546.     RT_DefaultFont     - (struct TextFont *)
  1547.                          This tag allows you to specify the font to be used
  1548.                          in the requester when the screen font is
  1549.                          proportional.  Default is GfxBase->DefaultFont.
  1550.     RT_TextAttr        - [V38] see rtFileRequestA()
  1551.                          Remember: font cannot be proportional!
  1552.     RTSC_Flags         - (ULONG)
  1553.                          Several flags:
  1554.                            SCREQF_OVERSCANGAD   - Add an overscan cycle
  1555.                                                   gadget to the requester.
  1556.                                                   After the requester returns
  1557.                                                   you may read the overscan
  1558.                                                   type in 'rq->OverscanType'
  1559.                                                   If this is 0 no overscan is
  1560.                                                   selected (Regular Size), if
  1561.                                                   non-zero it holds one of
  1562.                                                   the OSCAN_... values
  1563.                                                   defined in the include file
  1564.                                                   'intuition/screens.[h|i]'.
  1565.                            SCREQF_AUTOSCROLLGAD - Add an autoscroll checkbox
  1566.                                                   gadget to the requester.
  1567.                                                   After the requester returns
  1568.                                                   read 'smreq->AutoScroll' to
  1569.                                                   see if the user prefers
  1570.                                                   autoscroll to be on or off.
  1571.                            SCREQF_SIZEGADS      - Add width and height
  1572.                                                   gadgets to the requester.
  1573.                                                   If you do not add these
  1574.                                                   gadgets the width and
  1575.                                                   height returned will be the
  1576.                                                   default width and height
  1577.                                                   for the selected overscan
  1578.                                                   type.
  1579.                            SCREQF_DEPTHGAD      - Add a depth slider gadget
  1580.                                                   to the requester.  If you
  1581.                                                   do not add a depth gadget,
  1582.                                                   the depth returned will be
  1583.                                                   the maximum depth this mode
  1584.                                                   can be opened in.
  1585.                            SCREQF_NONSTDMODES   - Include all modes. Unless
  1586.                                                   this flag is set
  1587.                                                   rtScreenModeRequestA()
  1588.                                                   will exclude nonstandard
  1589.                                                   modes.  Nonstandard modes
  1590.                                                   are presently HAM and EHB
  1591.                                                   (ExtraHalfBrite). So unless
  1592.                                                   you are picking a mode to
  1593.                                                   do some rendering in leave
  1594.                                                   this flag unset.  Without
  1595.                                                   this flag set the mode
  1596.                                                   returned will be a normal
  1597.                                                   bitplaned mode.
  1598.                            SCREQF_GUIMODES      - Set this flag if you are
  1599.                                                   getting a screen mode to
  1600.                                                   open a user interface
  1601.                                                   screen in.  The modes
  1602.                                                   shown will be standard
  1603.                                                   modes with a high enough
  1604.                                                   resolution (minumum 640
  1605.                                                   pixels).  If this flag is
  1606.                                                   set the SCREQF_NONSTDMODES
  1607.                                                   flag is ignored.
  1608.     RTSC_Height        - (ULONG)
  1609.                          Suggested height of screenmode requester window.
  1610.     RTSC_OkText        - (char *)
  1611.                          Replacement text for "Ok" gadget, max 6 chars long.
  1612.     RTSC_MinWidth      - (UWORD)
  1613.                          The minimum display width allowed.
  1614.     RTSC_MaxWidth      - (UWORD)
  1615.                          The maximum display width allowed.
  1616.     RTSC_MinHeight     - (UWORD)
  1617.                          The minimum display height allowed.
  1618.     RTSC_MaxHeight     - (UWORD)
  1619.                          The maximum display height allowed.
  1620.     RTSC_MinDepth      - (UWORD)
  1621.                          The minimum display depth allowed.  Modes with a
  1622.                          minimum display depth lower than this value will not
  1623.                          be included in the list.
  1624.     RTSC_MaxDepth      - (UWORD)
  1625.                          The maximum display depth allowed.
  1626.     RTSC_PropertyFlags - (ULONG)
  1627.                          A mode must have these property flags to be
  1628.                          included.  Only bits set in RTSC_PropertyMask are
  1629.                          considered.
  1630.     RTSC_PropertyMask  - (ULONG)
  1631.                          Mask to apply to RTSC_PropertyFlags to determine
  1632.                          which bits to consider.  See use of 'newsignals' and
  1633.                          'signalmask' in exec.library/SetSignal().  Default
  1634.                          is to consider all bits in RTSC_PropertyFlags as
  1635.                          significant.
  1636.     RTSC_FilterFunc    - (struct Hook *)
  1637.                          Call this hook for each display mode id in the
  1638.                          system's list.
  1639.                          Parameters are as follows:
  1640.                            A0 - (struct Hook *) your hook
  1641.                            A2 - (struct rtScreenModeRequester *) your req
  1642.                            A1 - (ULONG) 32-bit extended mode id
  1643.                          If your hook returns TRUE the mode will be accepted.
  1644.                          If it returns FALSE the mode will be skipped and
  1645.                          will not appear in the requester.
  1646.  
  1647.   RESULT
  1648.     ret - FALSE if the requester was canceled or TRUE if the user selected a
  1649.           screen mode (check 'smreq->DisplayID' for the 32-bit extended
  1650.           display mode, 'smreq->DisplayWidth' and 'smreq->DisplayHeight' for
  1651.           the display size, 'smreq->DisplayDepth' for the screen's depth) or
  1652.           FALSE if the requester was canceled.
  1653.  
  1654.   NOTE
  1655.     Automatically adjusts the requester to the screen font.
  1656.     If the screen font is proportional the default font will be used.
  1657.  
  1658.     If the requester got too big for the screen because of a very large font,
  1659.     the topaz.font will be used.
  1660.  
  1661.     rtScreenModeRequest() checks the pr_WindowPtr of your process to find the
  1662.     screen to put the requester on.
  1663.  
  1664.   BUGS
  1665.     none known
  1666.  
  1667.   SEE ALSO
  1668.     graphics/GetDisplayInfoData() graphics/displayinfo.h
  1669.     exec.library/SetSignal()
  1670.     Intuition/SA_DisplayID screen tag
  1671.  
  1672. reqtools.library/rtScreenToFrontSafely reqtools.library/rtScreenToFrontSafely
  1673.  
  1674.   NAME  rtScreenToFrontSafely()
  1675.  
  1676.     rtScreenToFrontSafely (screen); 
  1677.  
  1678.     void rtScreenToFrontSafely (struct Screen *);
  1679.                                 A0
  1680.  
  1681.   DESCRIPTION
  1682.     Brings the specified screen to the front of the display, but only after
  1683.     checking it is still in the list of currently open screens.
  1684.  
  1685.     This function can be used to bring a screen back to the front of the
  1686.     display after bringing another screen to the front.  If the first screen
  1687.     closed while you where busy it is harmless to call this function, unlike
  1688.     calling the normal ScreenToFront().
  1689.  
  1690.   INPUTS
  1691.     screen - pointer to the screen.
  1692.  
  1693.   RESULT
  1694.     none
  1695.  
  1696.   NOTE
  1697.     This function is for the advanced ReqTools user.
  1698.  
  1699.   BUGS
  1700.     none known
  1701.  
  1702.   SEE ALSO
  1703.     intuition.library/ScreenToFront()
  1704.  
  1705. reqtools.library/rtSetReqPosition           reqtools.library/rtSetReqPosition
  1706.  
  1707.   NAME  rtSetReqPosition()
  1708.  
  1709.     rtSetReqPosition (reqpos, newwindow, screen, window);
  1710.  
  1711.     void rtSetReqPosition
  1712.                (ULONG, struct NewWindow *, struct Screen *, struct Window *);
  1713.                 D0     A0                  A1               A2
  1714.  
  1715.   DESCRIPTION
  1716.     Sets newwindow->LeftEdge and newwindow->TopEdge according to reqpos.
  1717.  
  1718.     Except for the left- and topedge 'newwindow' must already be completely
  1719.     initialized.
  1720.  
  1721.     The newwindow->LeftEdge and newwindow->TopEdge already in the NewWindow
  1722.     structure will be used as offsets to the requested position.  If you'd
  1723.     like a window at position (25,18) from the top left of the screen you
  1724.     would fill newwindow->LeftEdge with 25, newwindow->TopEdge with 18 and
  1725.     call rtSetReqPosition() with reqpos equal to REQPOS_TOPLEFTSCR.
  1726.  
  1727.     Don't forget to make sure newwindow->LeftEdge and newwindow->TopEdge
  1728.     are 0 if you don't want to offset your window.
  1729.  
  1730.     In case of REQPOS_POINTER you can use them to point to your window's
  1731.     hotspot, where the pointer should point.  If you call rtSetReqPosition()
  1732.     with the left- and topedge equal to 0 you'd get a window appearing with
  1733.     its top- and leftedge equal to the current pointer position.
  1734.  
  1735.     Note that the screen pointer may _NOT_ be NULL.  If you have your own
  1736.     window open you can supply yourwindow->WScreen to this function.
  1737.  
  1738.     The window pointer is only required if reqpos is REQPOS_CENTERWIN or
  1739.     REQPOS_TOPLEFTWIN.  Even in this case you may call rtSetReqPosition()
  1740.     with a NULL window pointer.  The positions will simply fall back to
  1741.     REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR respectively.
  1742.  
  1743.   INPUTS
  1744.     reqpos    - one of the REQPOS_... constants usable with RT_ReqPos.
  1745.     newwindow - pointer to your (already initialized) NewWindow structure.
  1746.     screen    - pointer to screen the requester will appear on.
  1747.     window    - pointer to parent window or NULL.
  1748.  
  1749.   RESULT
  1750.     none
  1751.  
  1752.   NOTE
  1753.     This function is for the advanced ReqTools user.
  1754.  
  1755.   BUGS
  1756.     none known
  1757.  
  1758.   SEE ALSO
  1759.     RT_ReqPos tag
  1760.  
  1761. reqtools.library/rtSetWaitPointer           reqtools.library/rtSetWaitPointer
  1762.  
  1763.   NAME  rtSetWaitPointer()
  1764.  
  1765.     rtSetWaitPointer (window);
  1766.  
  1767.     void rtSetWaitPointer (struct Window *);
  1768.                            A0
  1769.  
  1770.   DESCRIPTION
  1771.     Change the window's pointer image to that of a wait pointer.  Call this
  1772.     function whenever your program will be busy doing something for a lengthy
  1773.     period of time.
  1774.  
  1775.     It is recommended you call this function before calling any of the
  1776.     requester functions.  This way if the user clicks in your window he will
  1777.     know he must respond to the requester before doing anything else.  Also
  1778.     see the RT_WaitPointer tag for an automatic way of setting the wait
  1779.     pointer.  If you are using ReqTools V38+ check out the RT_LockWindow tag!
  1780.  
  1781.   INPUTS
  1782.     window - pointer to the window to receive the wait pointer.
  1783.  
  1784.   RESULT
  1785.     none
  1786.  
  1787.   NOTE
  1788.     The wait pointer will look exactly like the standard Workbench 2.0
  1789.     wait pointer.  In combination with PointerX, ClockTick or LacePointer
  1790.     the handle will turn.
  1791.  
  1792.   BUGS
  1793.     none known
  1794.  
  1795.   SEE ALSO
  1796.  
  1797. reqtools.library/rtSpread                           reqtools.library/rtSpread
  1798.  
  1799.   NAME  rtSpread()
  1800.  
  1801.     rtSpread (posarray, sizearray, totalsize, min, max, num);
  1802.  
  1803.     void rtSpread (ULONG *, ULONG *, ULONG, ULONG, ULONG, ULONG);
  1804.                    A0       A1       D0     D1     D2     D3
  1805.  
  1806.   DESCRIPTION
  1807.     Evenly spread a number of objects over a certain length.
  1808.     Primary use is for arrangement of gadgets in a window.
  1809.  
  1810.     Example:
  1811.  
  1812.     'sizearray' holds following values: 4, 6, 4, 2 and 8,
  1813.     'totalsize' is 24 (= 4 + 6 + 4 + 2 + 8),
  1814.     'min' is 3, 'max' is 43,
  1815.     and finally, 'num' is 5.
  1816.  
  1817.     After calling rtSpread() 'posarray' would hold the following
  1818.     values: 3, 11, 19, 26 and 31.
  1819.  
  1820.     My attempt at a visual representation:
  1821.  
  1822.         |                                            |
  1823.         |  |                                      |  |
  1824.         |  OOOO    OOOOOO    OOOO    OO    OOOOOOOO  |
  1825.         |  |                                      |  |
  1826.         |         1    1    2    2    3    3    4    4
  1827.         0----5----0----5----0----5----0----5----0----5
  1828.  
  1829.   INPUTS
  1830.     posarray  - pointer to array to be filled with positions.
  1831.     sizearray - pointer to array of sizes.
  1832.     totalsize - total size of all objects (sum of all values in sizearray).
  1833.     min       - first position to use.
  1834.     max       - last position, first _NOT_ to use.
  1835.     num       - number of objects (size of posarray and sizearray).
  1836.  
  1837.   RESULT
  1838.     none
  1839.  
  1840.   NOTE
  1841.     This function is for the advanced ReqTools user.
  1842.  
  1843.   BUGS
  1844.     none known
  1845.  
  1846.   SEE ALSO
  1847.  
  1848. reqtools.library/rtUnlockWindow               reqtools.library/rtUnlockWindow
  1849.  
  1850.   NAME  rtUnlockWindow() [V38]
  1851.  
  1852.     rtUnlockWindow (window, windowlock);
  1853.  
  1854.     void rtUnlockWindow (struct Window *, APTR);
  1855.                          A0               A1
  1856.  
  1857.   DESCRIPTION
  1858.     Unlock a window previously locked with rtLockWindow().  The window will
  1859.     once again accept user input and will get its original mouse pointer
  1860.     back (default or custom).
  1861.  
  1862.   INPUTS
  1863.     window     - pointer to the window to be unlocked.
  1864.     windowlock - the windowlock pointer returned by rtLockWindow(), may
  1865.                  be NULL.
  1866.  
  1867.   RESULT
  1868.     none
  1869.  
  1870.   BUGS
  1871.     none known
  1872.  
  1873.   SEE ALSO
  1874.  
  1875.