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

  1. Library Name:
  2.   rireqlib #79
  3.  
  4. Authors:
  5.   ReflectiveImages, 17 Mayles Road, Southsea, Portsmouth, Hampshire, UK PO4 8NP
  6.  
  7. OverView:
  8.   Another Reflective Images Library, oh no not another req library, clash
  9.   city here we come...
  10.  
  11. Authors Docs:
  12.  
  13. ;------------------------------
  14. ;- ReqLib.library version 0.9 -
  15. ;- ©1994 Reflective Images    -
  16. ;------------------------------
  17.  
  18. The well known Req.Library for the Amiga is one of the best file requesters
  19. around, so I wrote this small lib to enable Blitz users to have Req
  20. requesters in their programs with the minimum of hassle.
  21.  
  22. * PLEASE NOTE * That this library must have at least v2.2 of the Req.Library
  23. available.
  24.  
  25. Command List:
  26.  
  27.   ReqOutput()
  28.   ReqFileRequest()
  29.   ReqFileLoc()
  30.  
  31.  
  32. Statement: ReqOutput
  33. ------------------------------------------------------------------------------
  34. Modes  : Amiga
  35. Syntax : ReqOutput windownumber
  36.  
  37. This command sets the ReqLib.library to put all requesters onto the
  38. window specified by <windownumber>. If this command is not called
  39. then the requesters will appear on the Default Public Screen.
  40.  
  41.  
  42. Function: ReqFileRequest
  43. ------------------------------------------------------------------------------
  44. Modes  : Amiga
  45. Syntax : pathname$=ReqFileRequest([title$[,flags]])
  46.  
  47. This opens up the standard file requester. If <title$> is given then
  48. the text will appear on the requester title bar.
  49. The optional <flags> parameter specifies a flag setting (see below)
  50. for use. If this is omitted then the last flag setting is used.
  51.  
  52.  
  53. Function: ReqFileLoc
  54. ------------------------------------------------------------------------------
  55. Modes  : Amiga/Blitz
  56. Syntax : memorylocation.l=ReqFileLoc
  57.  
  58. This simply returns the address in memory where the Req.Library file requester
  59. stucture is located.
  60.  
  61.  
  62.  
  63. FLAGS
  64. =====
  65.  
  66. Below is a list of possible flag settings and a brief description of each.
  67.  
  68.  
  69. #FRQSHOWINFOB     = %1   ;Set to show .info files. Default is not.
  70. #FRQEXTSELECTB    = %10   ;Extended select.  Default is not.
  71. #FRQCACHINGB      = %100   ;Directory caching.  Default is not.
  72. #FRQGETFONTSB     = %1000   ;Font requester rather than a file requester.
  73. #FRQINFOGADGETB   = %10000   ;Hide-info files gadget.
  74. #FRQHIDEWILDSB    = %100000   ;DON'T want 'show' and 'hide' string gadgets.
  75. #FRQABSOLUTEXYB   = %1000000   ;Use absolute x,y positions rather than centering on mouse.
  76. #FRQCACHEPURGEB   = %10000000   ;Purge the cache whenever the directory date stamp changes if this is set.
  77. #FRQNOHALFCACHEB  = %100000000   ;Don't cache a directory unless it is completely read in when this is set.
  78. #FRQNOSORTB       = %1000000000   ;DON'T want sorted directories.
  79. #FRQNODRAGB       = %10000000000  ;DON'T want a drag bar and depth gadgets.
  80. #FRQSAVINGB       = %100000000000  ;Are selecting a file to save to.
  81. #FRQLOADINGB      = %1000000000000  ;Are selecting a file(s) to load from.
  82. #FRQDIRONLYB      = %10000000000000  ;Allow the user to select a directory, rather than a file.
  83.  
  84.  
  85. STRUCTURE
  86. =========
  87.  
  88. Below is a description of the Req.Library file requester structure.
  89.  
  90. STRUCTURE AFileRequester,0
  91.   UWORD frq_VersionNumber   ;MUST BE REQVERSION!!!!!!!!!!!!!!!!!!
  92.  
  93.   ;You will probably want to initialize these three variables.
  94.   APTR  frq_Title     ; Hailing text
  95.   APTR  frq_Dir       ; Directory array (must be DSIZE+1 characters long)
  96.   APTR  frq_File      ; Filename array (must be FCHARS+1 characters long)
  97.   ;If you initialize this variable then the file requester will place the complete path name in here on exit.
  98.   APTR  frq_PathName      ; Complete path name array - (must be DSIZE+FCHARS+2 long)
  99.   ;If you want the file requester to pop up on your custom screen, put one of your window pointers here.
  100.   ;Or better yet, you can leave this field zeroed and put a pointer to one of your windows in the
  101.   ;pr_WindowPtr field in your process structure.
  102.   APTR  frq_Window      ; Window requesting or NULL
  103.   ;Initialize these to the number of lines and columns you want to appear in the inner window that
  104.   ;displays the file names.  If you leave these set to zero then default values will be used.
  105.   UWORD frq_MaxExtendedSelect   ; Zero implies a maximum of 65535, as long as FRQEXTSELECT is set.
  106.   UWORD frq_numlines      ; Number of lines in file window.
  107.   UWORD frq_numcolumns      ; Number of columns in file window.
  108.   UWORD frq_devcolumns      ; Number of columns in device window.
  109.   ULONG frq_Flags     ; Various - umm - flags.  See above for more info.
  110.   UWORD frq_dirnamescolor ;These five colors will all default
  111.   UWORD frq_filenamescolor  ;to color one if you don't specify
  112.   UWORD frq_devicenamescolor  ;a color (ie; if you specify color zero).
  113.   UWORD frq_fontnamescolor  ;If you want color zero to be used, specify
  114.   UWORD frq_fontsizescolor  ;color 32, or some other too large number
  115.           ;which mods down to zero.
  116.  
  117.   UWORD frq_detailcolor   ;If both of these colors are specified as
  118.   UWORD frq_blockcolor    ;zero then the block pen will be set to one.
  119.  
  120.   UWORD frq_gadgettextcolor ;The color for the text of the five boolean gadgets.  Defaults to 1.
  121.   UWORD frq_textmessagecolor  ;The color for the message at the screen top.  Defaults to 1.
  122.   UWORD frq_stringnamecolor ;The color for the words Drawer, File, Hide and Show.  Defaults to 3.
  123.   UWORD frq_stringgadgetcolor ;The color for the borders of the string gadgets.  Defaults to 3.
  124.           ;Unfortunately it is not possible to specify
  125.           ;the color of the actual text in an Intuition
  126.           ;string gadget.
  127.   UWORD frq_boxbordercolor  ;The color for the boxes around the file and directory areas.  Defaults to 3.
  128.   UWORD frq_gadgetboxcolor  ;The color for the boxes around the five boolean gadgets.  Defaults to 3.
  129.  
  130.   STRUCT  frq_RFU_Stuff,36    ;This area, which is reserved for
  131.             ;future use, should all be zero.
  132.  
  133.   STRUCT  frq_DirDateStamp,ds_SIZEOF  ; A copy of the cached directories date stamp.
  134.             ; There should never be any need to change this.
  135.  
  136.   UWORD frq_WindowLeftEdge;   ;These two fields are only used when the
  137.   UWORD frq_WindowTopEdge;    ;FRQABSOLUTEXY flag is set.  They specify
  138.             ;the location of the upper left hand
  139.             ;corner of the window.
  140.  
  141.   UWORD frq_FontYSize     ;These fields are used to return the selected
  142.   UWORD frq_FontStyle     ;font size and style, only applicable when the
  143.             ;font bit is set.
  144.  
  145.   ;If you set the extended select bit and the user extended selects, the list of filenames will start from here.
  146.   APTR  frq_ExtendedSelect    ; Linked list of ESStructures if more than one filename is chosen.
  147.   ;All of the following variables you shouldn't need to touch.  They contain fields that the file
  148.   ;requester sets and likes to preserve over calls, just to make life easier for the user.
  149.   STRUCT  frq_Hide,WILDLENGTH+2   ; Wildcards for files to hide.
  150.   STRUCT  frq_Show,WILDLENGTH+2   ; Wildcards for files to show.
  151.   WORD  frq_FileBufferPos   ; Cursor's  position  and first
  152.   WORD  frq_FileDispPos     ; displayed character number in
  153.   WORD  frq_DirBufferPos    ; the three string gadgets.  No
  154.   WORD  frq_DirDispPos      ; need  to initialized these if
  155.   WORD  frq_HideBufferPos   ; you don't want to.
  156.   WORD  frq_HideDispPos
  157.   WORD  frq_ShowBufferPos
  158.   WORD  frq_ShowDispPos
  159.  
  160. ;         The  following  fields are PRIVATE!  Don't go messing with them or
  161. ; wierd  things may/will happen.  If this isn't enough of a warning, go read
  162. ; the one in intuition.h, that should scare you off.
  163.  
  164.   APTR  frq_Memory      ; Memory allocated for dir entries.
  165.   APTR  frq_Memory2     ; Used for currently hidden files.
  166.   APTR  frq_Lock      ; Contains lock on directories being read across calls.
  167.   STRUCT  frq_PrivateDirBuffer,DSIZE+2  ; Used for keeping a record of which
  168.             ; directory we have file names for.
  169.   APTR  frq_FileInfoBlock
  170.   WORD  frq_NumEntries
  171.   WORD  frq_NumHiddenEntries
  172.   WORD  frq_filestartnumber
  173.   WORD  frq_devicestartnumber
  174.   LABEL frq_SIZEOF
  175.  
  176.  
  177.  
  178. Enjoy!
  179.  
  180. Steve.
  181.  
  182.