home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / df3os2.zip / FILEOPEN.H < prev    next >
C/C++ Source or Header  |  1993-09-23  |  1KB  |  55 lines

  1. // --------- fileopen.h
  2.  
  3. #ifndef FILEOPEN_H
  4. #define FILEOPEN_H
  5.  
  6. #include "dflatpp.h"
  7. #include "directry.h"
  8.  
  9. // ------------ File Open dialog box
  10. class FileOpen : public Dialog    {
  11.     // -----File Open Dialog Box Controls:
  12. protected:
  13.     // ----- file name editbox
  14.     Label filelabel;
  15.     EditBox filename;
  16.     // ----- drive:path display
  17.     PathNameLabel dirlabel;
  18.     // ----- files list box
  19.     Label fileslabel;
  20.     FileNameListBox files;
  21.     // ----- directories list box
  22.     Label dirslabel;
  23.     DirectoryListBox dirs;
  24.     // ----- drives list box
  25.     Label disklabel;
  26.     DriveListBox disks;
  27.     // ----- command buttons
  28.     OKButton ok;
  29.     CancelButton cancel;
  30.     HelpButton help;
  31.     // ------ file open data members
  32.     String filespec;
  33.     // ------ private member functions
  34.     void SelectFileName();
  35.     void ShowLists();
  36.     // --- functions inherited from DFWindow
  37.     virtual void ControlSelected(DFWindow *Wnd);
  38.     virtual void ControlChosen(DFWindow *Wnd);
  39.     virtual void EnterFocus(DFWindow *Wnd);
  40.     virtual void OKFunction();
  41. public:
  42.     FileOpen(const char *spec = "*.*", const char *ttl = "File Open");
  43.     const String& FileName() { return filespec; }
  44. };
  45.  
  46. class SaveAs : public FileOpen    {
  47.     virtual void OKFunction();
  48. public:
  49.     SaveAs(const char *spec = "", const char *ttl = "Save As")
  50.         : FileOpen(spec, ttl) { }
  51. };
  52.  
  53. #endif
  54.  
  55.