home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Basic / wst!blz1.dms / in.adf / docs / NeilsReqToolsLib.doc < prev    next >
Encoding:
Text File  |  1994-09-05  |  37.9 KB  |  835 lines

  1. Library:
  2.   neilsreqtoolslib #54
  3.  
  4. Author:
  5.   Neil O'Rourke, 6 Victoria St, TAMWORTH, NSW 2340, AUSTRALIA
  6.  
  7. Overview:
  8.   Access to the ReqTools library.
  9.  
  10. Commands:
  11.  
  12. Author's Documentation
  13.  
  14.  
  15. ReqToolslib V1.70b
  16.  
  17. Neil O'Rourke
  18.  
  19. ** BETA FOUR **
  20.  
  21. This is an implementation of Nico Franco's ReqTools library.
  22.  
  23. There are two different implementations of each function, a simple one
  24. (denoted by EZ (pronounced E-Zee) in the command name),  and a complex one.
  25. The simple implementation has bog standard requesters that the programmer
  26. has little (if any) control over.  The purpose of these is to get your
  27. programs working fast (or it could be that you don't need all the fancy
  28. options that are available), with a minimum of setup for the requesters.
  29. That isn't to say the requesters aren't powerful; on the contrary, ReqTools
  30. requesters leave ASL requesters in the dust when it comes down to sheer power.
  31.  
  32. The more complex implementation requires you to build a TagList and supply
  33. it to the requester.  This shouldn't really be needed, as all the EZ
  34. requesters have a resonable set of defaults and options to avoid this.
  35.  
  36. All the ReqTools requesters attach themselves to the window that DOS errors
  37. are.  To do this, simply make your window the current window with Use
  38. Window WindowNum, then CatchDosErrs.  By default, the requesters will go to
  39. the Workbench.
  40.  
  41.  
  42. Compatibility
  43. ~~~~~~~~~~~~~
  44. All ReqTools requesters, with the exception of the ScreenMode request, are
  45. compatible with KickStart 1.3.
  46.  
  47. DO NOT CALL RTEZSCREENMODEREQUEST IF YOU ARE RUNNING 1.3!!
  48.  
  49. THIS IS YOUR RESPONSIBILITY!
  50.  
  51.  
  52. Future Directions
  53. ~~~~~~~~~~~~~~~~~
  54. The recent releases of ReqTools have included a preferences program to
  55. control the behaviour of requesters.  This does not sit well with the
  56. pre-programmed options that my interface code uses.  It could be that
  57. future releases of ReqToolsLib will not set these, but this is early days
  58. and only time and user feed-back will indicate the path to go.
  59.  
  60.  
  61. Simple Functions (EZ)
  62. ~~~~~~~~~~~~~~~~~~~~~
  63.  
  64. result=RTEZRequest(Title$,BodyText$,GadgetText$ [,ReqPosition 
  65. [, DefaultResponse, Flags]])
  66. ---------------------------------------------------------------
  67.  
  68. Opens a simple requester in the center of your screen.  You can have multiple
  69. gadgets in Gadget$, seperate the by a bar (|).
  70.  
  71. To have multiple lines in your gadget, seperate them by a Chr$(10).
  72.  
  73. Title$ can be whatever you want.  If it is left blank, the title of the
  74. calling window will be used.
  75.  
  76. The requester auto-adjusts its size to the length of the body text.
  77.  
  78. Also, the requester will block any input to the calling window, and if the
  79. user selects that window he will see the usual wait pointer.
  80.  
  81. The requester returns the number of the gadget selected, gadget zero is the
  82. extreme right hand gadget (usually Cancel), and numbered from one starting
  83. from the left hand side of the requester.
  84.  
  85. The optional parameter ReqPos allows relative positioning of the requester.
  86. You can have the requester open up in the center of the screen (the default
  87. position), or the center of the window, or the TopLeft corner of the screen
  88. or window.  The valid flags are:
  89.  
  90. #REQPOS_POINTER      =0  Relative to MousePointer
  91. #REQPOS_CENTERWIN    =1  Center of window
  92. #REQPOS_CENTERSCR    =2  Center of screen (default)
  93. #REQPOS_TOPLEFTWIN   =3  TopLeft of the window
  94. #REQPOS_TOPLEFTSCR   =4  TopLeft of the screen (Amiga default)
  95.  
  96. There are two further options:
  97.  
  98. DefaultResponse allows you to change what gadget is selected when the
  99. Return key is hit, and this is by default the left hand gadget (1)
  100.  
  101. Flags controls a few other items in the requester.
  102. #EZREQB_NORETURNKEY  =1   Turns off the return key as positive response
  103. #EZREQB_LAMIGAQUAL   =2   Keyboard shortcuts are limited to LA-V and LA-B
  104. #EZREQB_CENTERTEXT   =4   Centers the text in the requester.
  105.  
  106. You can make keyboard shortcuts for the gadgets by placing an underscore
  107. character '_' before the character you wish to have as the shortcut, for
  108. example your "Ok" gadget could be defined as "_Ok", and Right Amiga-O would
  109. then satisfy the requester.
  110.  
  111.  
  112. result=RTEZFlagsRequest(Title$,BodyText$,GadgetText$,IDCMPFlags[,ReqPos])
  113. -------------------------------------------------------------------------
  114.  
  115. This requester is similar to the standard RTEZRequest, but it can also be
  116. satisfied by an IDCMP flag (eg DiskInserted).  Either the gadget number or
  117. the IDCMP flag will be returned in result.
  118.  
  119. This requester also supports no gadgets, by supplying "" as the GadgetText$.
  120. Since the window is locked, the user cannot proceed until the request is
  121. satisfied.  Use this at your own peril!  This requester can force the user to
  122. take an action he may not want to, if you don't supply any gadgets.  Think,
  123. have second thoughts, and then think some more.  With enough thought, you
  124. *will* come to the conclusion that the user needs at least one gadget.
  125.  
  126. The ReqPosition flag is also available for this requester, as is the
  127. keyboard shortcuts.
  128.  
  129.  
  130. *MyFont.TextAttr=RTEZFontRequest(Title$)
  131. ----------------------------------------
  132.  
  133. Brings up the Font requester, and returns a pointer to a TextAttr
  134. structure.
  135.  
  136. The Font requester has had a total rewrite for the V1.7 release of
  137. ReqToolsLib.  Using it is just the same, but it now returns a saner
  138. structure.
  139.  
  140. The structure is defined:
  141.  
  142. NewType.TA
  143.   Name.s
  144.   YSize.w
  145.   Style.b
  146.   Flags.b
  147. End Newtype
  148.  
  149.  
  150. *MyScreenMode =RTEZScreenModeRequest(Title$ [,DisplayFlags])
  151. ------------------------------------------------------------
  152.  
  153. Returns a pointer to the following structure:
  154.  
  155. NEWTYPE.MyScreenMode
  156.   DisplayID.l
  157.   DisplayWidth.w
  158.   DisplayHeight.w
  159.   DisplayDepth.w
  160.   OverscanType.w
  161.   AutoScroll.l
  162. End NEWTYPE
  163.  
  164. The DisplayFlags field allows you to have control over what options you
  165. offer the user.  By default, the requester has a resonable set of options,
  166. but you may wish to add too (or subtract from) these.
  167.  
  168. Allowable flags are:
  169. #SCREQF_OVERSCANGAD  - Add an overscan cycle gadget to the requester.  After
  170.                        the requester returns you may read the overscan type 
  171.                        in '\OverscanType'  If this is 0 no overscan is selected
  172.                        (Regular Size), if non-zero it holds one of the 
  173.                        OSCAN_... values defined in the include file 'intuition
  174.                        /screens.[h|i]'.
  175. #SCREQF_AUTOSCROLLGAD- Add an autoscroll checkbox gadget to the requester.
  176.                        After the requester returns read '\AutoScroll' to see
  177.                        if the user prefers autoscroll to be on or off.
  178. #SCREQF_SIZEGADS     - Add width and height gadgets to the requester.  If you
  179.                        do not add these gadgets the width and height returned
  180.                        will be the default width and height for the selected
  181.                        overscan type.
  182. #SCREQF_DEPTHGAD     - Add a depth slider gadget to the requester.  If you
  183.                        do not add a depth gadget, the depth returned will be
  184.                        the maximum depth this mode can be opened in.
  185. #SCREQF_NONSTDMODES  - Include all modes. Unless this flag is set
  186.                        RTEZScreenModeRequest() will exclude nonstandard modes.
  187.                        Nonstandard modes are presently HAM and EHB 
  188.                        (ExtraHalfBrite). So unless you are picking a mode to
  189.                        do some rendering in leave this flag unset.  Without
  190.                        this flag set the mode returned will be a normal
  191.                        bitplaned mode.
  192. #SCREQF_GUIMODES     - Set this flag if you are getting a screen mode to open
  193.                        a user interface screen in.  The modes shown will be
  194.                        standard modes with a high enough resolution (minumum 640
  195.                        pixels).  If this flag is set the SCREQF_NONSTDMODES 
  196.                        flag is ignored.
  197.  
  198. Do not attempt to call this requester under WB1.3.
  199.  
  200.  
  201. SelectedColour.w=RTEZPaletteRequest(Title$,FirstColour)
  202. ---------------------------------------------------------
  203.  
  204. Brings up the Palette requester.  Returns the last colour the user
  205. selected, or -1 if the user hit cancel.  If the user changed the colours,
  206. they are reflected in the viewport that the window is attached to.
  207.  
  208.  
  209. name$=RTEZLoadFile(Title$,FileName$)
  210. ------------------------------------
  211.  
  212. This brings up the standard file requester.  The directories are buffered,
  213. so it doesn't have to reload the directory each time it is called.  Note that
  214. FileName$ must be at least 108 characters long (use the MaxLen function of
  215. this).
  216.  
  217. Note that by default, pattern matching is not enabled.  If you want to
  218. match a particular pattern, use the RTEZSetPattern command described below.
  219.  
  220. Also, the file name isn't copied to FileName$.  You can have a default
  221. file name by writing to FileName$, but this will be cleared after the call
  222. finishes.  This is also true of the SaveFile requester.
  223.  
  224.  
  225. name$=RTEZSaveFile(Title$,FileName$)
  226. ------------------------------------
  227.  
  228. A seperate requester, the SaveFile requester is different from the LoadFile
  229. requester in a number of ways.  First, it has a seperate buffer from the
  230. LoadFile requester.  Second, the OK text is changed to Save.  Third, the
  231. user cannot double-click a file to select it, to prevent accidental
  232. deletions.  Finally, if the user types in a non-existent directory, he will
  233. be asked if he would like that directory created.
  234.  
  235. FileName$ must be at least 108 bytes long as well.
  236.  
  237. Note that by default, pattern matching is not enabled.  If you want to
  238. match a particular pattern, use the RTEZSetPattern command described below.
  239.  
  240.  
  241. name$=RTEZPathRequest(Title$)
  242. -----------------------------
  243.  
  244. Prompts the user to select a path.  This is also a seperate requester to
  245. the LoadFile and SaveFile requesters, and maintains its own directory list.
  246.  
  247.  
  248. ret.l=RTEZMultiLoadFile(Title$)
  249. -------------------------------
  250.  
  251. Allows the user to select multiple files for loading (this makes no sense
  252. for saving).  ret is either True for a list having been selected, or False
  253. if the user cancelled.
  254.  
  255. If you call RTEZMultiLoadFile, any previous FileList that was loaded is
  256. deleted, even if the user cancels the requester.
  257.  
  258.  
  259. name$=RTNextPathEntry
  260. --------------------- 
  261.  
  262. This function returns the next file from a RTEZMultiLoadFile call, or a
  263. null string is there is no entry, so you can safely loop about until an
  264. empty string is returned.
  265.  
  266.  
  267. RTEZSetDefaultDirectory Requester#,Directory$
  268. ---------------------------------------------
  269.  
  270. This can be used to set a default directory for the user.  Directory$ is
  271. the default path, and Requester# is one of the following:
  272. 0 - EZLoadFile
  273. 1 - EZSaveFile
  274. 2 - EZPathRequest
  275. 3 - EZMultiLoadFile
  276.  
  277.  
  278. RTEZSetPattern Requester#,Pattern$
  279. ----------------------------------
  280.  
  281. Enables and sets the pattern matching in LoadFile and SaveFile requesters.
  282. Valid requesters are:
  283. 0 - EZLoadFile
  284. 1 - EZSaveFile
  285. 3 - EZMultiLoadFile
  286.  
  287.  
  288. RTEZFreePattern Requester#
  289. --------------------------
  290.  
  291. Turns off pattern matching in the requester.  Valid requester numbers are:
  292. 0 - EZLoadFile
  293. 1 - EZSaveFile
  294. 3 - EZMultiLoadFile
  295.  
  296.  
  297. result.l=RTEZGetLong(Title$,BodyText$ [,DefaultValue])
  298. ------------------------------------------------------
  299.  
  300. This prompts the user for a number.  BodyText$ can be formatted with
  301. chr$(10) if needed.  DefaultValue can be supplied to suggest a value to the
  302. user.
  303.  
  304.  
  305. result.l=RTEZGetLongRange(Title$,BodyText$,Min.l,Max.l [,DefaultValue])
  306. -----------------------------------------------------------------------
  307.  
  308. Like RTEZGetLong, but this imposes an inclusive minimum and maximum on the
  309. number entered.  Again, DefaultValue can be used to suggest a value to the
  310. user.
  311.  
  312.  
  313. returned$=RTEZGetString(Title$,BodyText$,MaxChars [,DefaultString])
  314. -------------------------------------------------------------------
  315.  
  316. Prompts the user to enter a string (which can be up to MaxChars in length).
  317. As usual, you can format the BodyText$ with chr$(10) and supply a default
  318. string.  If you do supply one, then make sure that the length of the string
  319. is less than MaxChars, otherwise you could corrupt innocent memory.
  320.  
  321.  
  322. WinLock=RTLockWindow(Window#)
  323. -----------------------------
  324.  
  325. This locks the numbered window, blocks all input to that window except
  326. depth arranging (and the Zip gadget, under 2.0), and put up the standard
  327. wait pointer.  If you have some utility to make the hands spin or something
  328. like that, then that happens as well.  WinLock must be saved!
  329.  
  330.  
  331. RTUnlockWindow Window#,WinLock
  332. -------------------------------
  333.  
  334. Unlocks the window that you locked with RTLockWindow.
  335.  
  336.  
  337. RTVersion and RTRevision
  338. ------------------------
  339.  
  340. Both these functions return the version number and revision number of the
  341. ReqTools library that this code interfaces to.
  342.  
  343. Of no real use at the moment, but future developments in ReqTools may
  344. require a minimum library version to work.  ReqToolsLib will always open
  345. whatever ReqTools are available.
  346.  
  347.  
  348. IsReqToolsActive
  349. ----------------
  350.  
  351. Returns True if ReqTools was able to initialise, and False if it wasn't (eg
  352. not available).
  353.  
  354.  
  355. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  356.  
  357. Advanced Functions
  358. ~~~~~~~~~~~~~~~~~~
  359.  
  360. The following functions can be considered advanced, in that they require a
  361. bit more work on the programmers part.
  362.  
  363.  
  364. ret.l=RTASyncRequest(Title$,BodyText$,GadgetText$)
  365. --------------------------------------------------
  366.  
  367. This function puts up a request, locks the window and returns immediately.
  368. If the requester couldn't be put up, ret is False.  The program is now free
  369. to continue, but the user can have the option of aborting a lengthy
  370. operation if required.
  371.  
  372. Important Note: Do not attempt to have two asyncronous requesters up.
  373.  
  374. Note: As of V1.41b, RTASyncRequest uses the current window for the
  375. requester.
  376.  
  377.  
  378. ret.l=RTCheckASyncRequest
  379. -------------------------
  380.  
  381. Checks the status of the asyncronous requester, and returns True if it is
  382. still up.
  383.  
  384.  
  385. RTEndASyncRequest
  386. -----------------
  387.  
  388. Ends the asyncronous request, under program control, and unlocks the
  389. calling window.
  390.  
  391. NOTE:  Do not call this finction if the user has hit the gadget in the
  392. request!  The requester automatically frees its self.
  393.  
  394.  
  395. These three commands require a demonstration to illustrate:
  396.  
  397. NoCli:WBStartup
  398. WbToScreen 0
  399. Window 0,10,10,100,100,$8|$1000|2|4,"RTTest window",2,1
  400. CatchDosErrs
  401. ret.l=RTASyncRequest("Hi There!","Please Wait...","Cancel")
  402.  
  403. If ret  ;The requester opened OK
  404.   For x.w=10 To 1 Step -1
  405.     WLocate 0,10
  406.     NPrint "Seconds:",x
  407.     VWait(50)
  408.     ret1.l=RTCheckASyncRequest ;Is the requester still up?
  409.     If NOT ret1 ;No, so end this processing
  410.       Pop If:Pop For:Pop If
  411.       Goto cancelled
  412.     EndIf
  413.   Next x
  414.   RTEndASyncRequest ;Normal finish
  415. EndIf
  416.  
  417. End
  418.  
  419. cancelled:
  420. a.l=RTEZRequest("Oi!","You cancelled!?!","Sure Did")
  421. End
  422.  
  423.  
  424. ret.l=RTASyncPaletteRequest(Title$,FirstColour)
  425. -----------------------------------------------
  426.  
  427. Similar to RTEZPaletteRequest, this command puts up a palette requester and
  428. returns immediatly.  Note, however, that the calling window is NOT locked,
  429. unlike all other ReqTools requesters.  This allows you to launch a seperate
  430. palette requester and continue processing.
  431.  
  432.  
  433. ret.l=RTCheckASyncPaletteRequest
  434. --------------------------------
  435.  
  436. Returns True if the requester is still up, False if the user hit Ok or
  437. Cancel.  NOTE: There is no way to detect exactly how the user exited the
  438. command.
  439.  
  440.  
  441. RTEndASyncPaletteRequest
  442. ------------------------
  443.  
  444. Closes the requester.
  445.  
  446.  
  447. A short demonstration program to illustrate:
  448.  
  449. WbToScreen 0
  450. Window 0,0,0,200,100,$40,"Hi there",2,1
  451. CatchDosErrs
  452.  
  453. ret.l=RTASyncPaletteRequest("Play with these",1)
  454.  
  455. count.l=0
  456. If ret
  457.   While count<100
  458.     count+1
  459.     WLocate 0,0
  460.     NPrint "Seconds:",count
  461.     If NOT RTCheckASyncPaletteRequest Then Goto quit
  462.     Delay_ 60
  463.   Wend
  464.   RTEndASyncPaletteRequest
  465. EndIf
  466.  
  467. quit:
  468. Free Window 0
  469.  
  470.  
  471.  
  472.  
  473. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  474.  
  475. TagList Functions
  476. ~~~~~~~~~~~~~~~~~
  477.  
  478. ret=RTRequest(BodyText$,GadgetText$,TagList)
  479. --------------------------------------------
  480.  
  481. This is the standard form of the ReqTools Requester.  You must supply the
  482. tag list to control the requester.  The requester title, if not specified
  483. in the tag list, will be "Information" if you have only one response
  484. gadget, or "Request" if you have two or more responses.
  485.  
  486. If you don't supply a tag list, ReqTools will use its own defaults.
  487.  
  488. It is *your* responsibility to ensure the TagList is correctly set up.
  489.  
  490. Most of the tags of interest are included in RTEZRequest and
  491. RTEZFlagsRequest as standard.
  492.  
  493. Acceptable tags are:
  494.    #RT_Window       - *name.Window
  495.                       Window that will be used to find the screen to put the
  496.                       requester on.
  497.                       You *MUST* supply this if you are a task calling this
  498.                       function and not a process! This is because tasks
  499.                       don't have a pr_WindowPtr.
  500.    #RT_IDCMPFlags   - (LONG)
  501.                       Extra idcmp flags to return on.  If one these IDCMP
  502.                       flags causes the requester to abort the return code
  503.                       will equal the flag in question.
  504.    #RT_ReqPos       - (LONG)
  505.                       One of the following:
  506.                        #REQPOS_POINTER    - requester appears where the mouse
  507.                                             pointer is (default).
  508.                        #REQPOS_CENTERSCR  - requester is centered on the
  509.                                             screen.
  510.                        #REQPOS_CENTERWIN  - requester is centered in the
  511.                                             window (only works if the
  512.                                             pr_WindowPtr of your process is
  513.                                             valid or if you use RT_Window).
  514.                                             If RT_Window is NULL the
  515.                                             requester will be centered on
  516.                                             the screen.
  517.                        #REQPOS_TOPLEFTSCR - requester appears at the top left
  518.                                             of the screen.
  519.                        #REQPOS_TOPLEFTWIN - requester appears at the top left
  520.                                             of the window (only works if the
  521.                                             pr_WindowPtr of your process is
  522.                                             valid or if you use RT_Window).
  523.                       The requester will always remain in the visible part of
  524.                       the screen, so if you use the Workbench 2.0 ScreenMode
  525.                       preferences editor to enlarge your Workbench screen and
  526.                       you scroll around, the requester will always appear in
  527.                       the part you can see.
  528.                       REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR also apply to
  529.                       the visible part of the screen. So if you use one of
  530.                       these the requester will be appear in the center or the
  531.                       top left off what you can see of the screen as opposed
  532.                       to the entire screen.
  533.                       REQPOS_CENTERWIN and REQPOS_TOPLEFTWIN fall back to
  534.                       REQPOS_CENTERSCR or REQPOS_TOPLEFTSCR respectively
  535.                       when there is no parent window.  So you can safely use
  536.                       these without worrying about the existence of a window.
  537.    #RT_LeftOffset   - (LONG)
  538.                       Offset of left edge of requester relative to position
  539.                       specified with RT_ReqPos (does not offset the requester
  540.                       when RT_ReqPos is REQPOS_POINTER).
  541.    #RT_TopOffset    - (LONG)
  542.                       Offset of top edge of requester relative to position
  543.                       specified with RT_ReqPos (does not offset the requester
  544.                       when RT_ReqPos is REQPOS_POINTER).
  545.    #RT_PubScrName   - (*string)
  546.                       Name of public screen requester should appear on. When
  547.                       this tag is used the RT_Window tag will be ignored.
  548.                       If the public screen is not found the requester will
  549.                       open on the default public screen.
  550.                       Only works on Kickstart 2.0!  reqtools.library does
  551.                       not check this, it is up to you *NOT* to use this tag
  552.                       on Kickstart 1.3 or below!
  553.                       Note that the 1.3 version of reqtools.library also
  554.                       understands and supports this tag (on 2.0).
  555.    #RT_Screen       - (*name.Screen)
  556.                       Address of screen to put requester on.  You should
  557.                       never use this, use RT_Window or RT_PubScrName.
  558.    #RT_ReqHandler   - (struct rtHandlerInfo **)
  559.                       Using this tag you can start an "asynchronous"
  560.                       requester. ti_TagData of the tag must hold the address
  561.                       of a pointer variable to a rtHandlerInfo structure.
  562.                       The requester will initialize this pointer and will
  563.                       return immediately after its normal initialization.
  564.                       The return code will not be what you would normally
  565.                       expect.  If the return code is _not_ equal to
  566.                       CALL_HANDLER an error occurred and you should take
  567.                       appropriate steps. If the return code was CALL_HANDLER
  568.                       everything went ok and the requester will still be up!
  569.                       See the explanation for rtReqHandlerA() below for the
  570.                       following steps you have to take.
  571.    #RT_WaitPointer  - (BOOL)
  572.                       If this is TRUE the window calling the requester will
  573.                       get a standard wait pointer set while the requester is
  574.                       up.  This will happen if you used the RT_Window tag or
  575.                       if your process's pr_WindowPtr is valid.  Note that
  576.                       after the requester has finished your window will be
  577.                       ClearPointer()-ed.  If you used a custom pointer in
  578.                       your window you will have to re-set it, or not use the
  579.                       RT_WaitPointer tag and put up a wait pointer yourself.
  580.                       If your program requires ReqTools V38 it is advised you
  581.                       use RT_LockWindow instead.  Defaults to FALSE.
  582.    #RT_LockWindow   - (BOOL) [V38]
  583.                       If this is TRUE the window calling the requester will
  584.                       get locked.  It will no longer accept any user input
  585.                       and it will get standard wait pointer set.  This will
  586.                       happen only if you used the RT_Window tag or if your
  587.                       process's pr_WindowPtr is valid.  RT_LockWindow will
  588.                       restore a custom pointer if you have used one (unlike
  589.                       RT_WaitPointer).  So you do not have to worry about
  590.                       having to restore it yourself.  It is advised you use
  591.                       this tag as much as possible. Defaults to FALSE.
  592.    #RT_ScreenToFront - (BOOL) [V38]
  593.                       Boolean indicating whether to pop the screen the
  594.                       requester will appear on to the front. Default is TRUE.
  595.    #RT_ShareIDCMP   - (BOOL) [V38]
  596.                       Boolean indicating whether to share the IDCMP port of
  597.                       the parent window. Use this tag together with the
  598.                       RT_Window tag to indicate the window to share IDCMP
  599.                       with. Sharing the IDCMP port produces less overhead,
  600.                       so it is advised you use this tag. Defaults to FALSE.
  601.    #RT_Locale       - (struct Locale *) [V38]
  602.                       Locale to determine what language to use for the
  603.                       requester text.  If this tag is not used or its data
  604.                       is NULL, the system's current default locale will be
  605.                       used. Default NULL.
  606.    #RT_IntuiMsgFunc - (struct Hook *) [V38]
  607.                       The requester will call this hook for each IDCMP
  608.                       message it gets that doesn't belong to its window.
  609.                       Only applies if you used the RT_ShareIDCMP tag to share
  610.                       the IDCMP port with the parent window.  Parameters are
  611.                       as follows:
  612.                         A0 - (struct Hook *) your hook
  613.                         A2 - (struct rtReqInfo *) your requester info
  614.                         A1 - (struct IntuiMessage *) the message
  615.                       After you have finished examining the message and your
  616.                       hook returns, ReqTools will reply the message.  So do
  617.                       not reply the message yourself!
  618.    #RT_Underscore   - (char) [V38]
  619.                       Indicates the symbol that precedes the character in the
  620.                       gadget label to be underscored.  This is to define a
  621.                       keyboard shortcut for this gadget.  Example: to define
  622.                       the key 'Q' as a keyboard shortcut for "Quit" and 'N'
  623.                       for "Oh, No!" you would use the tag RT_Underscore, '_'
  624.                       and pass as gadfmt "_Quit|Oh, _No!".  Do not use the
  625.                       symbol '%' as it is used for string formatting.  The
  626.                       usual character to use is '_' like in the example.
  627.                       IMPORTANT: the shortcuts defined using RT_Underscore
  628.                       take precedence of the default shortcuts!  It is for
  629.                       example not wise to use a 'N' for a positive response!
  630.                       Pick your shortcuts carefully!
  631.    #RT_TextAttr     - (struct TextAttr *) [V38]
  632.                       Use this font for the requester.  Default is to use the
  633.                       screen font.  Note that the font must already be
  634.                       opened by you.  ReqTools will call OpenFont() on this
  635.                       TextAttr, _not_ OpenDiskFont()!  If the font cannot be
  636.                       opened using OpenFont() the default screen font will
  637.                       be used.
  638.    #RTEZ_ReqTitle   - (char *)
  639.                       Title of requester window, default is "Request" unless
  640.                       the requester has less than 2 responses, then the
  641.                       default title is "Information".
  642.    #RTEZ_Flags      - (ULONG)
  643.                       Flags for rtEZRequestA():
  644.                        #EZREQF_NORETURNKEY - turn off the RETURN key as
  645.                                              shortcut for positive response.
  646.                        #EZREQF_LAMIGAQUAL  - keyboard shortcuts are limited
  647.                                              to Left Amiga 'V' and 'B', ESC
  648.                                              and RETURN.
  649.                        #EZREQF_CENTERTEXT  - centers each line of body text
  650.                                              in the requester window. Useful
  651.                                              for about requesters.
  652.    #RTEZ_DefaultResponse - (ULONG)
  653.                       Response value that will be returned when the user
  654.                       presses the return key.  Will be ignored if the
  655.                       EZREQF_NORETURNKEY flag is set.  The text for this
  656.                       response will be printed in bold. Default is 1.
  657.  
  658.  
  659.  
  660. name$=RTFileRequest(Title$,FileName$,TagList)
  661. ---------------------------------------------
  662.  
  663. This is the standard ReqTools requester, and is seperate from the LoadFile,
  664. SaveFile and PathRequest requesters.  No setup is done, but the file name
  665. etc is returned as per the above requesters.
  666.  
  667. Most of the tags that you would set normally are included as standard in
  668. the RTREZxFile requesters.
  669.  
  670. It is *your* responsibility to ensure that the TagList is correctly set up.
  671.  
  672. Acceptable tags are:
  673.  
  674.    #RT_Window          - see rtEZRequestA()
  675.    #RT_ReqPos          - see rtEZRequestA()
  676.    #RT_LeftOffset      - see rtEZRequestA()
  677.    #RT_TopOffset       - see rtEZRequestA()
  678.    #RT_PubScrName      - see rtEZRequestA()
  679.    #RT_Screen          - see rtEZRequestA()
  680.    #RT_ReqHandler      - see rtEZRequestA()
  681.    #RT_WaitPointer     - see rtEZRequestA()
  682.    #RT_LockWindow      - [V38] see rtEZRequestA()
  683.    #RT_ScreenToFront   - [V38] see rtEZRequestA()
  684.    #RT_ShareIDCMP      - [V38] see rtEZRequestA()
  685.    #RT_Locale          - [V38] see rtEZRequestA()
  686.    #RT_IntuiMsgFunc    - (struct Hook *) [V38]
  687.                          The requester will call this hook for each IDCMP
  688.                          message it gets that doesn't belong to its window.
  689.                          Only applies if you used the RT_ShareIDCMP tag to
  690.                          share the IDCMP port with the parent window.
  691.                          Parameters are as follows:
  692.                            A0 - (struct Hook *) your hook
  693.                            A2 - (struct rtFileRequester *) your requester
  694.                            A1 - (struct IntuiMessage *) the message
  695.                          After you have finished examining the message and
  696.                          your hook returns, ReqTools will reply the message.
  697.                          So do not reply the message yourself!
  698.    #RT_Underscore      - (char) [V38]
  699.                          Indicates the symbol that precedes the character in
  700.                          a gadget's label to be underscored.  This will also
  701.                          define the keyboard shortcut for this gadget.
  702.                          Currently only needed for RTFI_OkText.  Usually set
  703.                          to '_'.
  704.    #RT_DefaultFont     - (struct TextFont *)
  705.                          This tag allows you to specify the font to be used
  706.                          in the requester when the screen font is
  707.                          proportional. Default is GfxBase->DefaultFont.
  708.    #RT_TextAttr        - (struct TextAttr *) [V38]
  709.                          Use this font for the requester.  Must be a fixed
  710.                          width font, _not_ a proportional one.  Default is to
  711.                          use the screen font or the default font (if the
  712.                          screen font is proportional).  Note that the font
  713.                          must already be opened by you.  ReqTools will call
  714.                          OpenFont() on this TextAttr, _not_ OpenDiskFont()!
  715.                          If the font cannot be opened using OpenFont() or if
  716.                          the font is proportional the default screen font
  717.                          will be used (or the font set with RT_DefaultFont).
  718.    #RTFI_Flags         - (ULONG)
  719.                          Several flags:
  720.                           #FREQF_NOBUFFER    - do _not_ use a buffer to
  721.                                                remember directory contents
  722.                                                for the next time the file
  723.                                                requester is used.
  724.                           #FREQF_MULTISELECT - allow multiple files to be
  725.                                                selected. rtFileRequest() will
  726.                                                return a pointer to an
  727.                                                rtFileList structure which
  728.                                                will contain all selected
  729.                                                files.  Use rtFreeFileList()
  730.                                                to free the memory used by
  731.                                                this file list.
  732.                           #FREQF_SELECTDIRS  - set this flag if you wish to
  733.                                                enable the selecting of dirs
  734.                                                as well as files.  You *must*
  735.                                                also set FREQF_MULTISELECT.
  736.                                                Directories will be returned
  737.                                                together with files in
  738.                                                rtFileList, but with StrLen
  739.                                                equal to -1.  If you need the
  740.                                                length of the directory's name
  741.                                                use strlen().
  742.                           #FREQF_SAVE        - Set this if you are using the
  743.                                                requester to save or delete
  744.                                                something.  Double-clicking
  745.                                                will be disabled so it is
  746.                                                harder to make a mistake and
  747.                                                select the wrong file.  If the
  748.                                                user enters a non-existent
  749.                                                directory in the drawer string
  750.                                                gadget, a requester will
  751.                                                appear asking if the directory
  752.                                                should be created.
  753.                           #FREQF_NOFILES     - Set this if you want to use
  754.                                                the requester to allow the
  755.                                                user to select a directory
  756.                                                rather than a file.  Ideal for
  757.                                                getting a destination dir. May
  758.                                                be used with FREQF_MULTISELECT
  759.                                                and FREQF_SELECTDIRS.
  760.                           #FREQF_PATGAD      - When this is set a pattern
  761.                                                gadget will be added to the
  762.                                                requester.
  763.    #RTFI_Height        - (ULONG)
  764.                          Suggested height of file requester window.
  765.    #RTFI_OkText        - (char *)
  766.                          Replacement text for "Ok" gadget, max 6 chars long.
  767.    #RTFI_VolumeRequest - (ULONG) [V38]
  768.                          The presence of this tag turns the file requester
  769.                          into a volume/assign disk requester.  This requester
  770.                          can be used to get a device name ("DF0:", "DH1:",..)
  771.                          or an assign ("C:", "FONTS:",...) from the user.
  772.                          The result of this requester can be found in the
  773.                          filereq->Dir field.  The volume can also be changed
  774.                          with rtChangeReqAttrA() and the RTFI_Dir tag.  Note
  775.                          that the user may edit the disk/assign names, or
  776.                          enter a new one.  Note also that the real device
  777.                          name is returned, not the name of the volume in the
  778.                          device.  For example "DH1:", not "Hard1:".
  779.                          The tag data (ULONG) is used to set following flags:
  780.                           #VREQF_NOASSIGNS - Do not include the assigns in
  781.                                              the list, only the real devices.
  782.                           #VREQF_NODISKS   - Do not include devices, just
  783.                                              show the assigns.
  784.                           #VREQF_ALLDISKS  - Show _all_ devices.  Default
  785.                                              behavior is to show only those
  786.                                              devices which have valid disks
  787.                                              inserted into them.  So if you
  788.                                              have no disk in drive DF0: it
  789.                                              will not show up.  Set this flag
  790.                                              if you do want these devices
  791.                                              included.
  792.                          NOTE: Do *NOT* use { RTFI_VolumeRequest, TRUE }!
  793.                                You are then setting the VREQF_NOASSIGNS flag!
  794.                                Use { RTFI_VolumeRequest, 0 } for a normal
  795.                                volume requester.
  796.                          NOTE: If you use the RTFI_FilterFunc described
  797.                                below the third parameter will be a pointer
  798.                                to a rtVolumeEntry structure rather than a
  799.                                pointer to a FileInfoBlock structure!
  800.                                Tech note: the DOS device list has been
  801.                                unlocked, so it is safe to e.g. Lock() this
  802.                                device and call Info() on this lock.
  803.                          NOTE: A file requester structure allocated with
  804.                                rtAllocRequest() should not be used for both
  805.                                a file and a volume requester. Allocate two
  806.                                requester structures if you need both a file
  807.                                and a volume requester in your program!
  808.    #RTFI_FilterFunc    - (struct Hook *) [V38]
  809.                          Call this hook for each file in the directory being
  810.                          read (or for each entry in the volume requester).
  811.                          Parameters are as follows:
  812.                            A0 - (struct Hook *) your hook
  813.                            A2 - (struct rtFileRequester *) your filereq
  814.                            A1 - (struct FileInfoBlock *) fib of file OR
  815.                                 (struct rtVolumeEntry *) device or assign
  816.                                 in case of a volume requester.
  817.                          If your hook returns TRUE the file will be accepted.
  818.                          If it returns FALSE the file will be skipped and
  819.                          will not appear in the requester.
  820.                          IMPORTANT NOTE: If you change your hook's behavior
  821.                                          you _MUST_ purge the requester's
  822.                                          buffer (using rtFreeReqBuffer())!
  823.                          IMPORTANT NOTE: When this callback hook is called
  824.                                          from a volume requester the
  825.                                          pr_WindowPtr of your process will
  826.                                          be set to -1 so *no* DOS requesters
  827.                                          will appear when an error occurs!
  828.    #RTFI_AllowEmpty    - (BOOL) [V38]
  829.                          If RTFI_AllowEmpty is TRUE an empty file string will
  830.                          also be accepted and returned.  Defaults to FALSE,
  831.                          meaning that if the user enters no filename the
  832.                          requester will be canceled.  You should use this tag
  833.                          as little as possible!
  834.  
  835.