home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d575 / reqtools.lha / ReqTools / doc / reqtools.doc next >
Text File  |  1991-12-22  |  51KB  |  1,257 lines

  1. TABLE OF CONTENTS
  2.  
  3. reqtools.library/rtAllocRequestA
  4. reqtools.library/rtChangeReqAttrA
  5. reqtools.library/rtEZRequestA
  6. reqtools.library/rtFileRequestA
  7. reqtools.library/rtFontRequestA
  8. reqtools.library/rtFreeFileList
  9. reqtools.library/rtFreeReqBuffer
  10. reqtools.library/rtFreeRequest
  11. reqtools.library/rtGetLongA
  12. reqtools.library/rtGetStringA
  13. reqtools.library/rtGetVScreenSize
  14. reqtools.library/rtPaletteRequestA
  15. reqtools.library/rtReqHandlerA
  16. reqtools.library/rtScreenToFrontSafely
  17. reqtools.library/rtSetReqPosition
  18. reqtools.library/rtSetWaitPointer
  19. reqtools.library/rtSpread
  20.  
  21. reqtools.library/rtAllocRequestA             reqtools.library/rtAllocRequestA
  22.  
  23.   NAME  rtAllocRequestA()
  24.  
  25.     req = rtAllocRequestA (type, taglist);
  26.  
  27.     APTR rtAllocRequestA (ULONG, struct TagItem *);
  28.     D0                    D0     A0
  29.  
  30.     req = rtAllocRequest (type, tag1,...);
  31.  
  32.     APTR rtAllocRequest (ULONG, Tag,...);
  33.  
  34.   DESCRIPTION
  35.     Allocates a requester structure for you in a future compatible manner.
  36.     This is the only way to properly allocate a rtFileRequester,
  37.     rtFontRequester or rtReqInfo structure.  The structure will be
  38.     initialized for you.
  39.  
  40.     Use rtFreeRequest() to free the requester structure when you no longer
  41.     need it.
  42.  
  43.   INPUTS
  44.     type    - type of structure to allocate, currently RT_REQINFO,
  45.               RT_FILEREQ or RT_FONTREQ.
  46.     taglist - pointer to array of tags (currently always NULL).
  47.  
  48.   TAGS
  49.     no tags defined yet
  50.  
  51.   RESULT
  52.     req - pointer to the requester allocated or NULL if no memory.
  53.  
  54.   BUGS
  55.     none known
  56.  
  57.   SEE ALSO
  58.     rtFreeRequest()
  59.  
  60. reqtools.library/rtChangeReqAttrA           reqtools.library/rtChangeReqAttrA
  61.  
  62.   NAME  rtChangeReqAttrA()
  63.  
  64.     [long =] rtChangeReqAttrA (req, taglist);
  65.  
  66.     [LONG] rtChangeReqAttrA (APTR, struct TagItem *);
  67.                       A1    A0
  68.  
  69.     [long =] rtChangeReqAttr (req, tag1,...);
  70.  
  71.     [LONG] rtChangeReqAttr (APTR, Tag,...);
  72.  
  73.   DESCRIPTION
  74.     Change requester attributes with supplied taglist.  This is the only
  75.     correct way to change the attributes listed below.
  76.  
  77.     The return code from rtChangeReqAttrA() should be ignored unless stated
  78.     otherwise.
  79.  
  80.   INPUTS
  81.     req     - pointer to requester.
  82.     taglist - pointer to array of tags.
  83.  
  84.   TAGS
  85.     for the file requester:
  86.         RTFI_Dir         - (char *)
  87.                            Name of new directory to position file requester
  88.                            in. The requester's buffer will be deallocated.
  89.         RTFI_MatchPat    - (char *)
  90.                            New pattern string to match files on.
  91.         RTFI_AddEntry    - (BPTR)
  92.                            THIS *MUST* BE THE LAST TAG (just before TAG_END)!
  93.                            Tagdata must hold a lock on a file or directory
  94.                            you want to add to the file requester's buffer.
  95.                            The lock should have been obtained using Lock(),
  96.                            and you must unlock this lock yourself.
  97.                            It is your responsability to make sure the file
  98.                            or directory is indeed in the directory the file
  99.                            requester is in.
  100.                            If the entry is already in the file requester's
  101.                            buffer it will simply be updated.
  102.                            It is harmless to call this function if the
  103.                            requester's buffer is not initialized.
  104.                            rtChangeReqAttr() will return a boolean to
  105.                            indicate success or failure (out of memory).
  106.         RTFI_RemoveEntry - (char *)
  107.                            Name of file or directory you want to remove from
  108.                            the file requester's buffer.
  109.                            It is your responsability to make sure the file
  110.                            or directory is indeed in the directory the file
  111.                            requester is in.
  112.                            It is harmless to call this function if the
  113.                            requester's buffer is not initialized.
  114.     for the font requester:
  115.         RTFO_FontName    - (char *) 
  116.                            Set the name of the currently selected font.
  117.         RTFO_FontHeight  - (UWORD)
  118.                            Set the fontsize of the currently selected font.
  119.         RTFO_FontStyle   - (UBYTE)
  120.                            Set the style of the current font.
  121.         RTFO_FontFlags   - (UBYTE)
  122.                            Set the flags of the current font.
  123.  
  124.   RESULT
  125.     none
  126.  
  127.   BUGS
  128.     none known
  129.  
  130.   SEE ALSO
  131.     dos.library/Lock()
  132.  
  133. reqtools.library/rtEZRequestA                   reqtools.library/rtEZRequestA
  134.  
  135.   NAME  rtEZRequestA()
  136.  
  137.     ret = rtEZRequestA (bodyfmt, gadfmt, reqinfo, argarray, taglist);
  138.  
  139.     ULONG rtEZRequestA
  140.                 (char *, char *, struct rtReqInfo *, APTR, struct TagItem *);
  141.     D0           A1      A2      A3                  A4    A0
  142.  
  143.     ret = rtEZRequest (bodyfmt, gadfmt, reqinfo, taglist, arg1, arg2,...);
  144.  
  145.     ULONG rtEZRequest
  146.                   (char *, char *, struct rtReqInfo *, struct TagItem *,...);
  147.  
  148.     ret = rtEZRequestTags(bodyfmt, gadfmt, reqinfo, argarray, tag1,...);
  149.  
  150.     ULONG rtEZRequestTags(char *, char *, struct rtReqInfo *, APTR, Tag,...);
  151.  
  152.   DESCRIPTION
  153.     This function puts up a requester for you and waits for a response from
  154.     the user. If the response is positive, this procedure returns TRUE.
  155.     If the response is negative, this procedure returns FALSE.
  156.     The function may also return an IDCMP flag or a value corresponding with
  157.     one of other possible responses (see below).
  158.  
  159.     'gadfmt' may contain several possible responses.  Seperate these
  160.     responses by a '|'.  For example: "Yes|No", or 'Yes|Maybe|No".  The
  161.     responses should be typed in the same order as they will appear on
  162.     screen, from left to right.  There is no limit to the number of responses
  163.     other than the width of the screen the requester will appear on.
  164.  
  165.     'bodyfmt' can contain newlines ('\n', ASCII 10). This will cause a new
  166.     line to be started (surprise, surprise :-).
  167.     You may also include 'printf' style formating codes. The format arguments
  168.     should be pointed to by 'argarray'.
  169.     You can use formatting codes in 'gadfmt' as well.  The arguments for
  170.     this format string should follow the ones for 'bodyfmt'.
  171.  
  172.     NOTE: The formatting is done by exec.library/RawDoFmt(), so be aware that
  173.           to display a 32-bit integer argument you must use "%ld", not "%d",
  174.           since RawDoFmt() is "word-oriented."
  175.  
  176.     The second and third function use a variable number of arguments. These
  177.     functions can be found in 'reqtools[nb].lib'.
  178.     The second function has the RawDoFmt arguments as variable args, the
  179.     third the tags. If you need both this is what you can do:
  180.  
  181.     ...
  182.        {
  183.        ULONG tags[] = { RTEZ_ReqTitle, (ULONG)"mytitle", TAG_END };
  184.  
  185.        rtEZRequest ("String, num: %s, %ld", NULL, "Ok",
  186.                                            (struct TagItem *)tags, "six", 6);
  187.        }
  188.     ...
  189.  
  190.     You can satisfy the requester with the following keyboard shortcuts:
  191.       'Y' or 'V' for a positive response,
  192.       ESC, 'N', 'R' or 'B' for a negative response.
  193.  
  194.     If EZREQF_NORETURNKEY is _not_ set (see RTEZ_Flags below) the RETURN key
  195.     is also accepted as a shortcut for the positive response (can be changed
  196.     using RTEZ_DefaultResponse, see below).  The response that will be
  197.     selected when you press RETURN will be printed in bold.
  198.  
  199.     The EZREQF_LAMIGAQUAL flag should be used when you put up a requester
  200.     for a destructive action (e.g. to delete something).  When it is set
  201.     the keyboard shortcuts are limited to Left Amiga 'V' and 'B' so it is
  202.     harder to accidently select something you will regret.
  203.     Note that the RETURN and ESC key remain active!  To disable the RETURN
  204.     key use the EZREQF_NORETURNKEY flag.  The ESC key cannot be disabled.
  205.  
  206.     You may pass a NULL for 'gadfmt', but make sure you know what you are
  207.     doing.  Passing a NULL opens an EZRequester with NO responses, just a
  208.     body text.  This implies the user has no means of "answering" this
  209.     requester.  You must therefore use the RT_IDCMPFlags tag to allow some
  210.     other events to end the requester (e.g. IDCMP_MOUSEBUTTONS,
  211.     IDCMP_INACTIVEWINDOW,...) or you must make use of the ReqHandler feature.
  212.     Using a requester handler you can end the requester by program control.
  213.     This way you can e.g. put up a requester before you start loading a file
  214.     and remove it after the file has been loaded.  Do not pass an empty
  215.     string as 'gadfmt'!
  216.  
  217.     'reqinfo' can be used to customize the requester.  For greater control
  218.     use the tags listed below.  The advantage of the rtReqInfo structure is
  219.     that it is global, where tags have to be specified each function call.
  220.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  221.  
  222.   INPUTS
  223.     bodyfmt  - requester body text, can be format string a la RawDoFmt().
  224.     gadfmt   - text for gadgets (left to right, seperated by '|') or NULL.
  225.     argarray - pointer to array of arguments for format string(s).
  226.     reqinfo  - pointer to a rtReqInfo structure allocated with
  227.                rtAllocRequest() or NULL.
  228.     taglist  - pointer to a TagItem array.
  229.  
  230.   TAGS
  231.     RT_Window       - (struct Window *)
  232.                       Window that will be used to find the screen to put the
  233.                       requester on.
  234.                       You *MUST* supply this if you are a task calling this
  235.                       function and not a process! This is because tasks
  236.                       don't have a pr_WindowPtr.
  237.     RT_IDCMPFlags   - (ULONG)
  238.                       Extra idcmp flags to return on.  If one these IDCMP
  239.                       flags causes the requester to abort the return code
  240.                       will equal the flag in question.
  241.     RT_ReqPos       - (ULONG)
  242.                       One of the following:
  243.                         REQPOS_POINTER    - requester appears where the mouse
  244.                                             pointer is (default).
  245.                         REQPOS_CENTERSCR  - requester is centered on the
  246.                                             screen.
  247.                         REQPOS_CENTERWIN  - requester is centered in the
  248.                                             window (only works if the
  249.                                             pr_WindowPtr of your process is
  250.                                             valid or if you use RT_Window).
  251.                                             If RT_Window is NULL the
  252.                                             requester will be centered on
  253.                                             the screen.
  254.                         REQPOS_TOPLEFTSCR - requester appears at the top left
  255.                                             of the screen.
  256.                         REQPOS_TOPLEFTWIN - requester appears at the top left
  257.                                             of the window (only works if the
  258.                                             pr_WindowPtr of your process is
  259.                                             valid or if you use RT_Window).
  260.                       The requester will always remain in the visible part of
  261.                       the screen, so if you use the Workbench 2.0 ScreenMode
  262.                       preferences editor to enlarge your Workbench screen and
  263.                       you scroll around, the requester will always appear in
  264.                       the part you can see.
  265.                       REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR also apply to
  266.                       the visible part of the screen. So if you use one of
  267.                       these the requester will be appear in the center or the
  268.                       top left off what you can see of the screen as opposed
  269.                       to the entire screen.
  270.                       REQPOS_CENTERWIN and REQPOS_TOPLEFTWIN fall back to
  271.                       REQPOS_CENTERSCR or REQPOS_TOPLEFTSCR respectively
  272.                       when there is no parent window.  So you can safely use
  273.                       these without worrying about the existence of a window.
  274.     RT_LeftOffset   - (ULONG)
  275.                       Offset of left edge of requester relative to position
  276.                       specified with RT_ReqPos (does not offset the requester
  277.                       when RT_ReqPos is REQPOS_POINTER).
  278.     RT_TopOffset    - (ULONG)
  279.                       Offset of top edge of requester relative to position
  280.                       specified with RT_ReqPos (does not offset the requester
  281.                       when RT_ReqPos is REQPOS_POINTER).
  282.     RT_PubScrName   - (char *)
  283.                       Name of public screen requester should appear on. When
  284.                       this tag is used the RT_Window tag will be ignored.
  285.                       If the public screen is not found the requester will
  286.                       open on the default public screen.
  287.                       Only works on Kickstart 2.0!  reqtools.library does
  288.                       not check this, it is up to you *NOT* to use this tag
  289.                       on Kickstart 1.3 or below!
  290.                       Note that the 1.3 version of reqtools.library also
  291.                       understands and supports this tag (on 2.0).
  292.     RT_Screen       - (struct Screen *)
  293.                       Address of screen to put requester on.  You should
  294.                       never use this, use RT_Window or RT_PubScrName.
  295.     RT_ReqHandler   - (struct rtHandlerInfo **)
  296.                       Using this tag you can start an "asynchronous"
  297.                       requester. ti_TagData of the tag must hold the address
  298.                       of a pointer variable to a rtHandlerInfo structure.
  299.                       The requester will initialize this pointer and will
  300.                       return immediately after its normal initialization.
  301.                       The return code will not be what you would normally
  302.                       expect.  If the return code is _not_ equal to
  303.                       CALL_HANDLER an error occured and you should take
  304.                       appropriate steps. If the return code was CALL_HANDLER
  305.                       everything went ok and the requester will still be up!
  306.                       See the explanation for rtReqHandlerA() below for the
  307.                       following steps you have to take.
  308.     RT_WaitPointer  - (BOOL)
  309.                       If this is TRUE the window calling the requester will
  310.                       get a standard wait pointer set while the requester is
  311.                       up.  This will happen if you used the RT_Window tag or
  312.                       if your process's pr_WindowPtr is valid.  Note that
  313.                       after the requester has finished your window will be
  314.                       ClearPointer()-ed.  If you used a custom pointer in
  315.                       your window you will have to re-set it, or not use the
  316.                       RT_WaitPointer tag and put up a wait pointer yourself.
  317.                       Defaults to FALSE.  It is advised you use this tag as
  318.                       much as possible.
  319.     RTEZ_ReqTitle   - (char *)
  320.                       Title of requester window, default is "Request" unless
  321.                       the requester has less than 2 responses, then the
  322.                       default title is "Information".
  323.     RTEZ_Flags      - (ULONG)
  324.                       Flags for rtEZRequestA():
  325.                         EZREQF_NORETURNKEY - turn off the RETURN key as
  326.                                              shorcut for positive response.
  327.                         EZREQF_LAMIGAQUAL  - keyboard shortcuts are limited
  328.                                              to Left Amiga 'V' and 'B', ESC
  329.                                              and RETURN.
  330.                         EZREQF_CENTERTEXT  - centers each line of body text
  331.                                              in the requester window. Useful
  332.                                              for about requesters.
  333.     RTEZ_DefaultResponse - (ULONG)
  334.                       Response value that will be returned when the user
  335.                       presses the return key.  Will be ignored if the
  336.                       EZREQF_NORETURNKEY flag is set.  The text for this
  337.                       response will be printed in bold. Default is 1.
  338.  
  339.   RESULT
  340.     ret - 1 (TRUE) for leftmost (positive) response, then each consecutive
  341.           response will return 1 more, the rightmost (false) respons will
  342.           return 0 (FALSE), so 1,2,3,...,num-1,0 -- or idcmp flag.
  343.  
  344.   NOTE
  345.     Automatically adjusts the requester to the screen's font.
  346.  
  347.     rtEZRequestA() checks the pr_WindowPtr of your process to find the
  348.     screen to put the requester on.
  349.  
  350.   BUGS
  351.     none known
  352.  
  353.   SEE ALSO
  354.     exec.library/RawDoFmt(), rtReqHandlerA()
  355.  
  356. reqtools.library/rtFileRequestA               reqtools.library/rtFileRequestA
  357.  
  358.   NAME  rtFileRequestA()
  359.  
  360.     ret = rtFileRequestA (filereq, filename, title, taglist);
  361.  
  362.     APTR rtFileRequestA
  363.                 (struct rtFileRequester *, char *, char *, struct TagItem *);
  364.     D0           A1                        A2      A3      A0
  365.  
  366.     ret = rtFileRequest (filereq, filename, title, tag1,...);
  367.  
  368.     APTR rtFileRequest (struct rtFileRequester *, char *, char *, Tag,...);
  369.  
  370.   DESCRIPTION
  371.     Get a directory and filename(s), or just a directory from the user.
  372.  
  373.     'filename' should point to an array of at least 108 chars.  The filename
  374.     already in 'filename' will be displayed in the requester when it comes
  375.     up.  When the requester returns 'filename' will probably have changed.
  376.  
  377.     Setting certain flags may result in the calling of a caller-supplied
  378.     hook.
  379.     The hook will be called with A0 holding the address of your hook
  380.     structure (you may use the h_Data field to your own liking), A1 a pointer
  381.     to the requester structure ('req') and A2 a pointer to an array of
  382.     longwords ('param[]').
  383.     'param[0]' will hold the type of the hook, the rest (if any) depends on
  384.     that type.
  385.     'req' will point to the requester structure of the requester calling the
  386.     hook.
  387.  
  388.     SAS/C users can define their function thus:
  389.  
  390.     ULONG __asm __saveds hookfunc (register __a0 struct Hook *hook,
  391.                                    register __a2 APTR req,
  392.                                    register __a1 ULONG *param)
  393.     {
  394.        switch (param[0]) {
  395.           case REQHOOK_WILDFILE:
  396.              /* param[1] holds address of a FileInfoBlock */
  397.              ...
  398.              return (skipit);
  399.           case REQHOOK_WILDFONT:
  400.              /* param[1] holds address of a TextAttr */
  401.              ...
  402.              return (skipit);
  403.           default:
  404.              return (0);
  405.           }
  406.     }
  407.  
  408.     Your hook should then be initialized like this:
  409.  
  410.        hook->h_Entry = hookfunc;
  411.        /* in this case no need to initialize hook->h_SubEntry */
  412.        hook->h_Data = your_userdata_if_needed;
  413.  
  414.     Succesively you should initialize the filereq->Hook field to point to
  415.     your hook.  Note that there is no tag to set the hook!
  416.  
  417.     You can also use a stub written in machine code to call
  418.     your function. (see 'utility/hooks.h')
  419.  
  420.     Always check the hook's type to see why it is being called!  You should
  421.     always return a value to tell the requester what to do after your hook
  422.     has finished.  The return value of 0 has been reserved for "continue as
  423.     usual". So if your hook is called with a type other than the ones you
  424.     understand/handle return a 0!
  425.  
  426.     Hook types ('param[0]') currently implemented for rtFileRequest():
  427.  
  428.         REQHOOK_WILDFILE:
  429.             Set the FREQF_DOWILDFUNC flag to activate. The requester will
  430.             call your hook for each file in the directory.
  431.             'param[1]' will hold the address of a struct FileInfoBlock. If
  432.             your hook returns TRUE the file will be skipped an will not
  433.             appear in the requester.
  434.  
  435.     Finally note that when you change your hook or your hook's behaviour
  436.     you _MUST_ purge the requester's buffer (using rtFreeReqBuffer())!
  437.  
  438.   INPUTS
  439.     filereq  - pointer to a struct rtFileRequester allocated with
  440.                rtAllocRequestA().
  441.     filename - pointer to an array of chars (must be 108 bytes big).
  442.     title    - pointer to requester window title (null terminated).
  443.     taglist  - pointer to a TagItem array.
  444.  
  445.   TAGS
  446.     RT_Window      - see rtEZRequestA()
  447.     RT_ReqPos      - see rtEZRequestA()
  448.     RT_LeftOffset  - see rtEZRequestA()
  449.     RT_TopOffset   - see rtEZRequestA()
  450.     RT_PubScrName  - see rtEZRequestA()
  451.     RT_Screen      - see rtEZRequestA()
  452.     RT_ReqHandler  - see rtEZRequestA()
  453.     RT_WaitPointer - see rtEZRequestA()
  454.     RT_DefaultFont - (struct TextFont *)
  455.                      This tag allows you to specify the font to be used in
  456.                      the requester when the screen font is proportional.
  457.                      Default is GfxBase->DefaultFont.
  458.     RTFI_Flags     - (ULONG)
  459.                      Several flags:
  460.                        FREQF_NOBUFFER    - do _not_ use a buffer to remember
  461.                                            directory contents for the next
  462.                                            time rtFileRequestA() is used.
  463.                        FREQF_MULTISELECT - allow multiple files to be
  464.                                            selected. rtFileRequestA() will
  465.                                            return a pointer to a rtFileList
  466.                                            structure which will contain all
  467.                                            selected files.
  468.                                            Use rtFreeFileList() to free the
  469.                                            memory used by this file list.
  470.                        FREQF_SELECTDIRS  - set this flag if you wish to
  471.                                            enable the selecting of dirs as
  472.                                            well as files.  You *must* also
  473.                                            set FREQF_MULTISELECT.
  474.                                            Directories will be returned
  475.                                            together with files in rtFileList,
  476.                                            but with StrLen equal to -1.
  477.                                            If you need the length of the
  478.                                            directory's name use strlen().
  479.                        FREQF_SAVE        - Set this if you are using the
  480.                                            requester to save or delete
  481.                                            something.  Double-clicking will
  482.                                            be disabled so it is harder to
  483.                                            make a mistake and select the
  484.                                            wrong file.  If the user enters a
  485.                                            non-existent directory in the
  486.                                            string gadget, a requester will
  487.                                            appear asking if the directory
  488.                                            should be created.
  489.                        FREQF_NOFILES     - Set this if you want to use the
  490.                                            requester to allow the user to
  491.                                            select a directory rather than a
  492.                                            file.  Ideal for getting a
  493.                                            destination directory.
  494.                                            May be used with FREQF_MULTISELECT
  495.                                            and FREQF_SELECTDIRS.
  496.                        FREQF_PATGAD      - When this is set a pattern gadget
  497.                                            will be added to the requester.
  498.                        FREQF_DOWILDFUNC  - Call req->Hook for each entry in
  499.                                            the directory.
  500.                                            Note that there is no tag to set
  501.                                            the hook.  You must initialize
  502.                                            the req->Hook field with a pointer
  503.                                            to a valid hook structure.
  504.                                            See above for more information on
  505.                                            the calling of hooks.
  506.     RTFI_Height    - (ULONG)
  507.                      Suggested height of file requester window.
  508.     RTFI_OkText    - (char *)
  509.                      Replacement text for "Ok" gadget, max 6 characters long.
  510.  
  511.   RESULT
  512.     ret - TRUE if the user selected a file (check 'filereq->Dir' for the
  513.           directory and 'filename' for the filename) or FALSE if the
  514.           requester was canceled -- or a pointer to a struct rtFileList
  515.           (if FREQF_MULTISELECT was used).
  516.  
  517.   NOTE
  518.     Automatically adjusts the requester to the screen's font.
  519.     If the screen's font is proportional the default font will be used.
  520.  
  521.     If the requester got too big for the screen because of a very large font,
  522.     the topaz.font will be used.
  523.  
  524.     rtFileRequest() checks the pr_WindowPtr of your process to find the
  525.     screen to put the requester on.
  526.  
  527.   BUGS
  528.     none known
  529.  
  530.   SEE ALSO
  531.  
  532. reqtools.library/rtFontRequestA               reqtools.library/rtFontRequestA
  533.  
  534.   NAME  rtFontRequestA()
  535.  
  536.     bool = rtFontRequestA (fontreq, title, taglist);
  537.  
  538.     BOOL rtFontRequestA (struct rtFontRequester *, char *, struct TagItem *);
  539.     D0                   A1                        A3      A0
  540.  
  541.     bool = rtFontRequest (fontreq, title, tag1,...);
  542.  
  543.     BOOL rtFontRequest (struct rtFontRequester *, char *, Tag,...);
  544.  
  545.   DESCRIPTION
  546.     Let the user select a font and a style (optional).
  547.  
  548.     Setting certain flags may result in the calling of a caller-supplied
  549.     hook. See rtFileRequest() for more information on the calling of this
  550.     hook.
  551.  
  552.     Hook types ('param[0]') currently implemented for rtFontRequest():
  553.  
  554.         REQHOOK_WILDFONT:
  555.             Set the FREQF_DOWILDFUNC flag to activate. The requester will
  556.             call your hook for each font in the system's font list.
  557.             'param[1]' will hold the address of a struct TextAttr. If your
  558.             hook returns TRUE the font will be skipped.
  559.  
  560.     Finally note that when you change your hook or your hook's behaviour
  561.     you _MUST_ purge the requester's buffer (using rtFreeReqBuffer())!
  562.  
  563.   INPUTS
  564.     fontreq  - pointer to a struct rtFontRequester allocated with
  565.                rtAllocRequestA().
  566.     title    - pointer to requester window title (null terminated).
  567.     taglist  - pointer to a TagItem array.
  568.  
  569.   TAGS
  570.     RT_Window         - see rtEZRequestA()
  571.     RT_ReqPos         - see rtEZRequestA()
  572.     RT_LeftOffset     - see rtEZRequestA()
  573.     RT_TopOffset      - see rtEZRequestA()
  574.     RT_PubScrName     - see rtEZRequestA()
  575.     RT_Screen         - see rtEZRequestA()
  576.     RT_ReqHandler     - see rtEZRequestA()
  577.     RT_WaitPointer    - see rtEZRequestA()
  578.     RT_DefaultFont    - (struct TextFont *)
  579.                         This tag allows you to specify the font to be used in
  580.                         the requester when the screen font is proportional.
  581.                         Default is GfxBase->DefaultFont.
  582.     RTFO_Flags        - (ULONG)
  583.                         Several flags:
  584.                           FREQF_NOBUFFER      - do not buffer the font list
  585.                                                 for subsequent calls to
  586.                                                 rtFontRequestA().
  587.                           FREQF_FIXEDWIDTH    - only display fixed-width fonts.
  588.                           FREQF_COLORFONTS    - display color fonts also.
  589.                           FREQF_CHANGEPALETTE - change the screen's palette
  590.                                                 to match that of a selected
  591.                                                 color font.
  592.                           FREQF_LEAVEPALETTE  - leave the palette as it is
  593.                                                 when exiting rtFontRequestA()
  594.                                                 Useful in combination with
  595.                                                 FREQF_CHANGEPALETTE.
  596.                           FREQF_SCALE         - allow fonts to be scaled
  597.                                                 when they don't exist in the
  598.                                                 requested size.
  599.                                                 (works on Kickstart 2.0 only,                                                
  600.                                                  has no effect on 1.2/1.3).
  601.                           FREQF_STYLE         - include gadgets so the user
  602.                                                 may select the font's style.
  603.                           FREQF_DOWILDFUNC    - Call req->Hook for each font.
  604.                                                 Note that there is no tag to
  605.                                                 set the hook.  You must
  606.                                                 initialize the req->Hook
  607.                                                 field with a pointer to a
  608.                                                 valid hook structure.
  609.                                                 See rtFileRequest() for more
  610.                                                 information on the calling of
  611.                                                 this hook.
  612.     RTFO_Height       - (ULONG)
  613.                         Suggested height of font requester window.
  614.     RTFO_OkText       - (char *)
  615.                         Replacement text for "Ok" gadget.  Maximum 6 chars.
  616.                         (7 is still ok, but not esthetically pleasing)
  617.     RTFO_SampleHeight - (ULONG)
  618.                         Height of font sample display in pixels (default 24).
  619.     RTFO_MinHeight    - (ULONG)
  620.                         Minimum font size displayed.
  621.     RTFO_MaxHeight    - (ULONG)
  622.                         Maximum font size displayed.
  623.  
  624.   RESULT
  625.     bool - TRUE if the user selected a font (freq->Attr holds the font),
  626.            FALSE if the requester was canceled.
  627.  
  628.   NOTE
  629.     Automatically adjusts the requester to the screen's font.
  630.     If the screen's font is proportional the default font will be used.
  631.  
  632.     If the requester got too big for the screen because of a very large font,
  633.     the topaz.font will be used.
  634.  
  635.     rtFontRequest() checks the pr_WindowPtr of your process to find the
  636.     screen to put the requester on.
  637.  
  638.   BUGS
  639.     none known
  640.  
  641.   SEE ALSO
  642.  
  643. reqtools.library/rtFreeFileList               reqtools.library/rtFreeFileList
  644.  
  645.   NAME  rtFreeFileList()
  646.  
  647.     rtFreeFileList (filelist);
  648.  
  649.     void rtFreeFileList (struct rtFileList *);
  650.                          A0
  651.  
  652.   DESCRIPTION
  653.     Frees a filelist returned by rtFileRequest() when the FREQF_MULTISELECT
  654.     flag was set.  Call this after you have scanned the filelist and you no
  655.     longer need it.
  656.  
  657.   INPUTS
  658.     filelist - pointer to rtFileList structure, returned by rtFileRequest()
  659.                (may be NULL).
  660.  
  661.   RESULT
  662.     none
  663.  
  664.   BUGS
  665.     none known
  666.  
  667.   SEE ALSO
  668.     rtFileRequest()
  669.  
  670. reqtools.library/rtFreeReqBuffer             reqtools.library/rtFreeReqBuffer
  671.  
  672.   NAME  rtFreeReqBuffer()
  673.  
  674.     rtFreeReqBuffer (req);
  675.  
  676.     void rtFreeReqBuffer (APTR);
  677.                           A1
  678.  
  679.   DESCRIPTION
  680.     Frees the buffer associated with 'req'.  In case of a file requester this
  681.     function will deallocate the directory buffer, in case of a font
  682.     requester the font list.
  683.  
  684.     It is safe to call this function for requesters that have no buffer, so
  685.     you may call this for all requesters to free as much memory as possible.
  686.  
  687.   INPUTS
  688.     req - pointer to requester.
  689.  
  690.   RESULT
  691.     none
  692.  
  693.   BUGS
  694.     none known
  695.  
  696.   SEE ALSO
  697.     rtFileRequest(), rtFontRequest()
  698.  
  699. reqtools.library/rtFreeRequest                 reqtools.library/rtFreeRequest
  700.  
  701.   NAME  rtFreeRequest()
  702.  
  703.     rtFreeRequest (req);
  704.  
  705.     void rtFreeRequest (APTR);
  706.                         A1
  707.  
  708.   DESCRIPTION
  709.     Free requester structure previously allocated by rtAllocRequestA().
  710.     This will also free all buffers associated with the requester, so there
  711.     is no need to call rtFreeReqBuffer() first.
  712.  
  713.   INPUTS
  714.     req - pointer to requester (may be NULL).
  715.  
  716.   RESULT
  717.     none
  718.  
  719.   BUGS
  720.     none known
  721.  
  722.   SEE ALSO
  723.     rtAllocRequestA()
  724.  
  725. reqtools.library/rtGetLongA                       reqtools.library/rtGetLongA
  726.  
  727.   NAME  rtGetLongA()
  728.  
  729.     ret = rtGetLongA (&longvar, title, reqinfo, taglist);
  730.  
  731.     ULONG rtGetLongA (ULONG *, char *, struct rtReqInfo *, struct TagItem *);
  732.     D0                A1       A2      A3                  A0
  733.  
  734.     ret = rtGetLong (&longvar, title, reqinfo, tag1,...);
  735.  
  736.     ULONG rtGetLong (ULONG *, char *, struct rtReqInfo *, Tag,...);
  737.  
  738.   DESCRIPTION
  739.     Puts up a requester to get a signed long (32-bit) number from the user.
  740.  
  741.     'reqinfo' can be used to customize the requester.  For greater control
  742.     use the tags listed below.  The advantage of the rtReqInfo structure is
  743.     that it is global, where tags have to be specified each function call.
  744.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  745.  
  746.   INPUTS
  747.     &longvar - address of long (32 bit!) variable to hold result.
  748.     title    - pointer to null terminated title of requester window.
  749.     reqinfo  - pointer to a rtReqInfo structure allocated with
  750.                rtAllocRequest() or NULL.
  751.     taglist  - pointer to a TagItem array.
  752.  
  753.   TAGS
  754.     RT_Window        - see rtEZRequestA()
  755.     RT_IDCMPFlags    - see rtEZRequestA()
  756.     RT_ReqPos        - see rtEZRequestA()
  757.     RT_LeftOffset    - see rtEZRequestA()
  758.     RT_TopOffset     - see rtEZRequestA()
  759.     RT_PubScrName    - see rtEZRequestA()
  760.     RT_Screen        - see rtEZRequestA()
  761.     RT_ReqHandler    - see rtEZRequestA()
  762.     RT_WaitPointer   - see rtEZRequestA()
  763.     RTGL_Min         - (ULONG)
  764.                        Minimum allowed value. If the user tries to enter a
  765.                        smaller value the requester will refuse to accept it.
  766.     RTGL_Max         - (ULONG)
  767.                        Maximum allowed value, higher values are refused.
  768.     RTGL_Width       - (ULONG)
  769.                        Width if requester window in pixels.  This is only a
  770.                        suggestion. rtGetLongA() will not go below a
  771.                        certain width.
  772.     RTGL_ShowDefault - (BOOL)
  773.                        If this is TRUE (default) the value already in
  774.                        'longvar' will be displayed in the requester when it
  775.                        comes up. If set to FALSE the requester will be empty.
  776.  
  777.   RESULT
  778.     ret - TRUE if user entered a number, FALSE if not. If one of your idcmp
  779.           flags caused the requester to end 'ret' will hold this flag.
  780.  
  781.   NOTE
  782.     'longvar' will NOT change if the requester is aborted.
  783.  
  784.     Automatically adjusts the requester to the screen's font.
  785.  
  786.     rtGetLongA() checks the pr_WindowPtr of your process to find the
  787.     screen to put the requester on.
  788.  
  789.   BUGS
  790.     none known
  791.  
  792.   SEE ALSO
  793.  
  794. reqtools.library/rtGetStringA                   reqtools.library/rtGetStringA
  795.  
  796.   NAME  rtGetStringA()
  797.  
  798.     ret = rtGetStringA (buffer, maxchars, title, reqinfo, taglist);
  799.  
  800.     ULONG rtGetStringA
  801.               (UBYTE *, ULONG, char *, struct rtReqInfo *, struct TagItem *);
  802.     D0         A1       D0     A2      A3                  A0
  803.  
  804.     ret = rtGetString (buffer, maxchars, title, reqinfo, tag1,...);
  805.  
  806.     ULONG rtGetString (UBYTE *, ULONG, char *, struct rtReqInfo *, Tag,...);
  807.  
  808.   DESCRIPTION
  809.     Puts up a string requester to get a line of text from the user.
  810.     The string present in 'buffer' upon entry will be displayed, ready to
  811.     be edited.
  812.  
  813.     'reqinfo' can be used to customize the requester.  For greater control
  814.     use the tags listed below.  The advantage of the rtReqInfo structure is
  815.     that it is global, where tags have to be specified each function call.
  816.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  817.  
  818.   INPUTS
  819.     buffer   - pointer to buffer to hold characters entered.
  820.     maxchars - maximum number of characters that fit in buffer (EX-cluding
  821.                the 0 to terminate the string !).
  822.     title    - pointer to null terminated title of requester window.
  823.     reqinfo  - pointer to a rtReqInfo structure allocated with
  824.                rtAllocRequest() or NULL.
  825.     taglist  - pointer to a TagItem array.
  826.  
  827.   TAGS
  828.     RT_Window        - see rtEZRequestA()
  829.     RT_IDCMPFlags    - see rtEZRequestA()
  830.     RT_ReqPos        - see rtEZRequestA()
  831.     RT_LeftOffset    - see rtEZRequestA()
  832.     RT_TopOffset     - see rtEZRequestA()
  833.     RT_PubScrName    - see rtEZRequestA()
  834.     RT_Screen        - see rtEZRequestA()
  835.     RT_ReqHandler    - see rtEZRequestA()
  836.     RT_WaitPointer   - see rtEZRequestA()
  837.     RTGS_Width       - (ULONG)
  838.                        Width of requester window in pixels.  This is only a
  839.                        suggestion. rtGetStringA() will not go below a certain
  840.                        width.
  841.     RTGS_AllowEmpty  - (BOOL)
  842.                        If RTGS_AllowEmpty is TRUE an empty string will also
  843.                        be accepted and returned.  Defaults to FALSE, meaning
  844.                        that if the user enters an empty string the requester
  845.                        will be canceled.
  846.  
  847.   RESULT
  848.     ret - TRUE if user entered something, FALSE if not. If one of your idcmp
  849.           flags caused the requester to end 'ret' will hold this flag.
  850.  
  851.   NOTE
  852.     The contents of the buffer will NOT change if the requester is aborted.
  853.  
  854.     Automatically adjusts the requester to the screen's font.
  855.  
  856.     rtGetStringA() checks the pr_WindowPtr of your process to find the
  857.     screen to put the requester on.
  858.  
  859.   BUGS
  860.     none known
  861.  
  862.   SEE ALSO
  863.  
  864. reqtools.library/rtGetVScreenSize           reqtools.library/rtGetVScreenSize
  865.  
  866.   NAME  rtGetVScreenSize()
  867.  
  868.     rtGetVScreenSize (screen, widthptr, heightptr);
  869.  
  870.     ULONG rtGetVScreenSize (struct Screen *, ULONG *, ULONG *);
  871.     D0                      A0               A1       A2
  872.  
  873.   DESCRIPTION
  874.     Use this function to get the size of the visible portion of a screen.
  875.  
  876.     The value returned by rtGetVScreenSize() can be used for vertical
  877.     spacing.  It will be larger for interlaced and productivity screens.
  878.     Using this number for spacing will assure your requester will look
  879.     good on an interlaced and a non-interlaced screen.
  880.  
  881.     Current return codes are 2 for non-interlaced and 4 for interlaced.
  882.     These values may change in the future, don't depend on them too much.
  883.     They will in any case remain of the same magnitude.
  884.  
  885.   INPUTS
  886.     screen    - pointer to the screen.
  887.     widthptr  - address of an ULONG variable to hold the width.
  888.     heightptr - address of an ULONG variable to hold the height.
  889.  
  890.   RESULT
  891.     none
  892.  
  893.   NOTE
  894.     This function is for the advanced reqtools user.
  895.  
  896.   BUGS
  897.  
  898.   SEE ALSO
  899.  
  900. reqtools.library/rtPaletteRequestA         reqtools.library/rtPaletteRequestA
  901.  
  902.   NAME  rtPaletteRequestA()
  903.  
  904.     color = rtPaletteRequestA (title, reqinfo, taglist);
  905.  
  906.     LONG rtPaletteRequestA (char *, struct rtReqInfo *, struct TagItem *);
  907.     D0                      A2      A3                  A0
  908.  
  909.     color = rtPaletteRequest (title, reqinfo, tag1,...);
  910.  
  911.     LONG rtPaletteRequest (char *, struct rtReqInfo *, Tag,...);
  912.  
  913.   DESCRIPTION
  914.     Put up a palette requester so the user can change the screen's colors.
  915.  
  916.     The colors are changed in the viewport of the screen the requester will
  917.     appear on, so that is where you will find them after the palette
  918.     requester returns.
  919.  
  920.     The selected color is returned, so you can also use this requester to let
  921.     the user select a color.
  922.  
  923.     'reqinfo' can be used to customize the requester.  For greater control
  924.     use the tags listed below.  The advantage of the rtReqInfo structure is
  925.     that it is global, where tags have to be specified each function call.
  926.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  927.  
  928.   INPUTS
  929.     title   - pointer to requester window title (null terminated).
  930.     reqinfo - pointer to a rtReqInfo structure allocated with
  931.               rtAllocRequest() or NULL.
  932.     taglist - pointer to a TagItem array.
  933.  
  934.   TAGS
  935.     RT_Window        - see rtEZRequestA()
  936.     RT_ReqPos        - see rtEZRequestA()
  937.     RT_LeftOffset    - see rtEZRequestA()
  938.     RT_TopOffset     - see rtEZRequestA()
  939.     RT_PubScrName    - see rtEZRequestA()
  940.     RT_Screen        - see rtEZRequestA()
  941.     RT_ReqHandler    - see rtEZRequestA()
  942.     RT_WaitPointer   - see rtEZRequestA()
  943.     RT_DefaultFont   - (struct TextFont *)
  944.                        This tag allows you to specify the font to be used in
  945.                        the requester when the screen font is proportional.
  946.                        Default is GfxBase->DefaultFont.
  947.     RTPA_Color       - (ULONG)
  948.                        Initially selected color of palette.  Default is 1.
  949.  
  950.   RESULT
  951.     color - the color number of the selected color or -1 if the user
  952.             canceled the requester.
  953.  
  954.   NOTE
  955.     Automatically adjusts the requester to the screen's font.
  956.     If the screen's font is proportional the default font will be used.
  957.  
  958.     If the requester got too big for the screen because of a very large font,
  959.     the topaz.font will be used.
  960.  
  961.     rtPaletteRequestA() checks the pr_WindowPtr of your process to find the
  962.     screen to put the requester on.
  963.  
  964.   BUGS
  965.     none known
  966.  
  967.   SEE ALSO
  968.  
  969. reqtools.library/rtReqHandlerA                 reqtools.library/rtReqHandlerA
  970.  
  971.   NAME  rtReqHandlerA()
  972.  
  973.     ret = rtReqHandlerA (handlerinfo, sigs, taglist);
  974.  
  975.     ULONG rtReqHandlerA (struct rtHandlerInfo *, ULONG, struct TagItem *);
  976.     D0                   A1                      D0     A0
  977.  
  978.     ret = rtReqHandler (handlerinfo, sigs, tag1,...);
  979.  
  980.     ULONG rtReqHandler (struct rtHandlerInfo *, ULONG, Tag,...);
  981.  
  982.   DESCRIPTION
  983.     This function should be called if you used the RT_ReqHandler tag with a
  984.     requester function.
  985.  
  986.     The requester you used the tag with will have returned immediately after
  987.     its initialization and will have initialized a pointer to a rtHandlerInfo
  988.     structure for you.
  989.     You should now do the following:
  990.  
  991.     Check the DoNotWait field. If it is FALSE you have to wait for the
  992.     signals in the WaitMask field (plus your own signals if you like).
  993.     If any of the signals in WaitMask are received or DoNotWait was not FALSE
  994.     you have to call rtReqHandlerA() and check its return value for one of
  995.     the following values:
  996.  
  997.       CALL_HANDLER    - Check DoNotWait again, Wait() if you have to
  998.                         and call rtReqHandlerA() again. In other words, loop.
  999.       everything else - normal return value, requester has finished. This
  1000.                         return value will be the same as if the requester
  1001.                         had run normally.
  1002.  
  1003.     You must pass the signals you received to rtReqHandlerA().
  1004.  
  1005.     NOTE: if you want to wait for your own signals do not do so if
  1006.           DoNotWait is TRUE.  Call rtReqHandlerA() and if you must know
  1007.           if one of your signals arrived use SetSignal() to find this out.
  1008.           If you are waiting for a message to arrive at a message port you
  1009.           can simple call GetMsg and check if it is non-null.
  1010.           DoNotWait will naturally only be TRUE when it absolutely,
  1011.           positively has to be.  A multitasking machine as the Amiga should
  1012.           use Wait() as much as possible.
  1013.  
  1014.     This is an example of a "requester loop":
  1015.  
  1016.     ...
  1017.     struct rtHandlerInfo *hinfo;
  1018.     ULONG ret, mymask, sigs;
  1019.  
  1020.     ...
  1021.        /* calculate our mask */
  1022.        mymask = 1 << win->UserPort->mp_SigBit;
  1023.  
  1024.        /* We use the RT_ReqHandler tag to cause the requester to return
  1025.           after initializing.
  1026.           Check the return value to see if this setup went ok. */
  1027.        if (rtFontRequest (req, "Font", RT_ReqHandler, &hinfo, TAG_END)
  1028.                                                            == CALL_HANDLER) {
  1029.           do {
  1030.             /* Wait() if we can */
  1031.             if (!hinfo->DoNotWait)
  1032.                sigs = Wait (hinfo->WaitMask | mymask);
  1033.  
  1034.             /* check our own message port */
  1035.             while (msg = GetMsg (win->UserPort)) {
  1036.                ...
  1037.                /* here we handle messages received at our windows IDCMP               ...
  1038.                   port */
  1039.                ...
  1040.                }
  1041.  
  1042.             /* let the requester do its thing (remember to pass 'sigs') */
  1043.             ret = rtReqHandler (hinfo, sigs, TAG_END);
  1044.  
  1045.             /* continue this loop as long as the requester is up */
  1046.             } while (ret == CALL_HANDLER)
  1047.  
  1048.           /* when we get here we know the requester has finished, 'ret'
  1049.              is the return code. */
  1050.           ...
  1051.           }
  1052.        else notify ("Error opening requester!");
  1053.     ...
  1054.  
  1055.   INPUTS
  1056.     handlerinfo - pointer to handler info structure initialized by using
  1057.                   the RT_ReqHandler tag when calling a requester function.
  1058.     sigs        - the signals received by previous wait, will be ignored if
  1059.                   hinfo->DoNotWait was TRUE.
  1060.     taglist     - pointer to a TagItem array.
  1061.  
  1062.   TAGS
  1063.     RTRH_EndRequest - supplying this tag will end the requester. The return
  1064.                       code from rtReqHandlerA() will _not_ be CALL_HANDLER,
  1065.                       but the requester return code.  If the tagdata of this
  1066.                       tag is REQ_CANCEL the requester will be canceled, if it
  1067.                       is REQ_OK the requester will be ok-ed.
  1068.                       In case of an EZRequest tagdata should be the return
  1069.                       code of the requester (TRUE, FALSE or 2,3,4,...).
  1070.  
  1071.   RESULT
  1072.     ret - CALL_HANDLER if you have to call rtReqHandlerA() again,
  1073.           or the normal return value from the requester.
  1074.  
  1075.   BUGS
  1076.     none known
  1077.  
  1078.   SEE ALSO
  1079.     rtEZRequest() (RT_ReqHandler explanation)
  1080.  
  1081. reqtools.library/rtScreenToFrontSafely reqtools.library/rtScreenToFrontSafely
  1082.  
  1083.   NAME  rtScreenToFrontSafely()
  1084.  
  1085.     rtScreenToFrontSafely (screen); 
  1086.  
  1087.     void rtScreenToFrontSafely (struct Screen *);
  1088.                                 A0
  1089.  
  1090.   DESCRIPTION
  1091.     Brings the specified screen to the front of the display, but only after
  1092.     checking it is still in the list of currently open screens.
  1093.  
  1094.     This function can be used to bring a screen back to the front of the
  1095.     display after bringing another screen to the front.  If the first screen
  1096.     closed while you where busy it is harmless to call this function, unlike
  1097.     calling the normal ScreenToFront().
  1098.  
  1099.   INPUTS
  1100.     screen - pointer to the screen.
  1101.  
  1102.   RESULT
  1103.     none
  1104.  
  1105.   NOTE
  1106.     This function is for the advanced reqtools user.
  1107.  
  1108.   BUGS
  1109.     none known
  1110.  
  1111.   SEE ALSO
  1112.     intuition.library/ScreenToFront()
  1113.  
  1114. reqtools.library/rtSetReqPosition           reqtools.library/rtSetReqPosition
  1115.  
  1116.   NAME  rtSetReqPosition()
  1117.  
  1118.     rtSetReqPosition (reqpos, newwindow, screen, window);
  1119.  
  1120.     void rtSetReqPosition
  1121.                (ULONG, struct NewWindow *, struct Screen *, struct Window *);
  1122.                 D0     A0                  A1               A2
  1123.  
  1124.   DESCRIPTION
  1125.     Sets newwindow->LeftEdge and newwindow->TopEdge according to reqpos.
  1126.  
  1127.     Except for the left- and topedge 'newwindow' must already be completely
  1128.     initialized.
  1129.  
  1130.     The newwindow->LeftEdge and newwindow->TopEdge already in the NewWindow
  1131.     structure will be used as offsets to the requested position.  If you'd
  1132.     like a window at position (25,18) from the top left of the screen you
  1133.     would fill newwindow->LeftEdge with 25, newwindow->TopEdge with 18 and
  1134.     call rtSetReqPosition() with reqpos equal to REQPOS_TOPLEFTSCR.
  1135.  
  1136.     Don't forget to make sure newwindow->LeftEdge and newwindow->TopEdge
  1137.     are 0 if you don't want to offset your window.
  1138.  
  1139.     In case of REQPOS_POINTER you can use them to point to your window's
  1140.     hotspot, where the pointer should point.  If you call rtSetReqPosition()
  1141.     with the left- and topedge equal to 0 you'd get a window appearing with
  1142.     its top- and leftedge equal to the current pointer position.
  1143.  
  1144.     Note that the screen pointer may _NOT_ be NULL.  If you have your own
  1145.     window open you can supply yourwindow->WScreen to this function.
  1146.  
  1147.     The window pointer is only required if reqpos is REQPOS_CENTERWIN or
  1148.     REQPOS_TOPLEFTWIN.  Even in this case you may call rtSetReqPosition()
  1149.     with a NULL window pointer.  The positions will simply fall back to
  1150.     REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR respectively.
  1151.  
  1152.   INPUTS
  1153.     reqpos    - one of the REQPOS_... constants usable with RT_ReqPos.
  1154.     newwindow - pointer to your (already initialized) NewWindow structure.
  1155.     screen    - pointer to screen the requester will appear on.
  1156.     window    - pointer to parent window or NULL.
  1157.  
  1158.   RESULT
  1159.     none
  1160.  
  1161.   NOTE
  1162.     This function is for the advanced reqtools user.
  1163.  
  1164.   BUGS
  1165.     none known
  1166.  
  1167.   SEE ALSO
  1168.     RT_ReqPos tag
  1169.  
  1170. reqtools.library/rtSetWaitPointer           reqtools.library/rtSetWaitPointer
  1171.  
  1172.   NAME  rtSetWaitPointer()
  1173.  
  1174.     rtSetWaitPointer (window);
  1175.  
  1176.     void rtSetWaitPointer (struct Window *);
  1177.                            A0
  1178.  
  1179.   DESCRIPTION
  1180.     Change the window's pointer image to that of a wait pointer.  Call this
  1181.     function whenever your program will be busy doing something for a lengthy
  1182.     period of time.
  1183.  
  1184.     It is recomended you call this function before calling any of the
  1185.     requester functions.  This way if the user clicks in your window he will
  1186.     know he must respond to the requester before doing anything else.  See
  1187.     also the RT_WaitPointer tag for an automatic way of setting the wait
  1188.     pointer.
  1189.  
  1190.   INPUTS
  1191.     window - pointer to the window to receive the wait pointer.
  1192.  
  1193.   RESULT
  1194.     none
  1195.  
  1196.   NOTE
  1197.     The wait pointer will look exactly like the standard Workbench 2.0
  1198.     wait pointer.  In combination with PointerX or, even better, ClockTick
  1199.     the handle will turn.
  1200.  
  1201.   BUGS
  1202.     none known
  1203.  
  1204.   SEE ALSO
  1205.  
  1206. reqtools.library/rtSpread                           reqtools.library/rtSpread
  1207.  
  1208.   NAME  rtSpread()
  1209.  
  1210.     rtSpread (posarray, sizearray, totalsize, min, max, num);
  1211.  
  1212.     void rtSpread (ULONG *, ULONG *, ULONG, ULONG, ULONG, ULONG);
  1213.                    A0       A1       D0     D1     D2     D3
  1214.  
  1215.   DESCRIPTION
  1216.     Evenly spread a number of objects over a certain length.
  1217.     Primary use is for arrangement of gadgets in a window.
  1218.  
  1219.     Example:
  1220.  
  1221.     'sizearray' holds following values: 4, 6, 4, 2 and 8,
  1222.     'totalsize' is 24 (= 4 + 6 + 4 + 2 + 8),
  1223.     'min' is 3, 'max' is 43,
  1224.     and finally, 'num' is 5.
  1225.  
  1226.     After calling rtSpread() 'posarray' would hold the following
  1227.     values: 3, 11, 19, 26 and 31.
  1228.  
  1229.     My attempt at a visual representation:
  1230.  
  1231.         |                                            |
  1232.         |  |                                      |  |
  1233.         |  OOOO    OOOOOO    OOOO    OO    OOOOOOOO  |
  1234.         |  |                                      |  |
  1235.         |         1    1    2    2    3    3    4    4
  1236.         0----5----0----5----0----5----0----5----0----5
  1237.  
  1238.   INPUTS
  1239.     posarray  - pointer to array to be filled with positions.
  1240.     sizearray - pointer to array of sizes.
  1241.     totalsize - total size of all objects (sum of all values in sizearray).
  1242.     min       - first position to use.
  1243.     max       - last position, first _NOT_ to use.
  1244.     num       - number of objects (size of posarray and sizearray).
  1245.  
  1246.   RESULT
  1247.     none
  1248.  
  1249.   NOTE
  1250.     This function is for the advanced reqtools user.
  1251.  
  1252.   BUGS
  1253.     none known
  1254.  
  1255.   SEE ALSO
  1256.  
  1257.