home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Environments / Clean 1.2.4 / IOInterface / deltaFileSelect.dcl < prev    next >
Encoding:
Modula Definition  |  1997-04-24  |  1.5 KB  |  37 lines  |  [TEXT/3PRM]

  1. definition module deltaFileSelect;
  2.  
  3. //    Version 0.8 to 1.0
  4.  
  5. from StdString import String;
  6. from    StdFile            import Files;
  7. from    deltaEventIO    import IOState;
  8.  
  9. /*    With the functions defined in this module standard file selector
  10.     dialogs can be opened, which provide a user-friendly way to select
  11.     input or output files. The lay-out of these dialogs depends on the
  12.     (version of the) operating system.
  13. */
  14.  
  15. SelectInputFile    :: !*s !(IOState *s)
  16.                 -> (!Bool,!String,!*s,!IOState *s);
  17.  
  18. /*    SelectInputFile opens a dialog in which the user can traverse the
  19.     file system to select an existing file. The boolean result indicates
  20.     whether the user pressed the Open button (True) or the Cancel button
  21.     (False). The String result contains the complete pathname of the
  22.     selected file. When Cancel was pressed an empty string will be
  23.     returned. */
  24.  
  25. SelectOutputFile:: !String !String !*s !(IOState *s)
  26.                 -> (!Bool, !String,!*s,!IOState *s);
  27.  
  28. /*    SelectOutputFile opens a dialog in which the user can specify the
  29.     name of a file to write to in a certain directory. The first argument
  30.     is the prompt of the dialog (default: "Save As:"), the second
  31.     argument is the default filename. The boolean result indicates
  32.     whether the user pressed the Save button (True) or the Cancel button
  33.     (False). The String result contains the complete pathname of the
  34.     selected file. When Cancel was pressed an empty string will be
  35.     returned. When a file with the indicated name already exists in the
  36.     indicated directory a confirm dialog will be opened. */
  37.