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