home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ocl150a.zip / OCL / Include / OFileDialog.hpp < prev    next >
C/C++ Source or Header  |  1997-01-13  |  3KB  |  96 lines

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1995
  3. // All Rights Reserved
  4. // OFileDialog.hpp
  5.  
  6. /*
  7.  * Redistribution and use in source and binary forms, with or without
  8.  * modification, are permitted provided that the following conditions
  9.  * are met:
  10.  * 1. Redistributions of source code must retain the above copyright
  11.  *    notice, this list of conditions and the following disclaimer.
  12.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  13.  *    endorse or promote products derived from this software
  14.  *    without specific prior written permission.
  15.  * 3. See OCL.INF for a detailed copyright notice.
  16.  *
  17.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  18.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  19.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  20.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  21.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  22.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  23.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  24.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  25.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  26.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  27.  * SUCH DAMAGE.
  28.  */
  29.  
  30. // $Header: W:/Projects/OCL/Include/rcs/OStatusLine.hpp 1.50 1996/08/11 23:47:31 B.STEIN Release $
  31.  
  32. #ifndef OFILEDIALOG_INCLUDED
  33.   #define OFILEDIALOG_INCLUDED
  34.  
  35.  
  36. #ifndef STDDIALOG_INCLUDED
  37.   #include <OStdDialog.hpp>
  38. #endif
  39.  
  40. #ifndef OPMEXCEPTION_INCLUDED
  41.   #include <OPMException.hpp>
  42. #endif
  43.  
  44.  
  45. typedef class OFileDialog *pOFileDialog;
  46.  
  47. class __CPP_EXPORT__ OFileDialog
  48.    : public OStdDialog
  49. {
  50.  protected:
  51.     FILEDLG  fileDialog;
  52.     OString  lastPath;
  53.     OString  lastFile;
  54.    
  55.  public:
  56.  
  57.    enum styles
  58.    {
  59.     applyButton  = FDS_APPLYBUTTON,
  60.     center       = FDS_CENTER,
  61.     custom       = FDS_CUSTOM,
  62.     enableFileLB = FDS_ENABLEFILELB,
  63.     filterUnion  = FDS_FILTERUNION,
  64.     helpButton   = FDS_HELPBUTTON,
  65.     includeEAs   = FDS_INCLUDE_EAS,
  66.     modeless     = FDS_MODELESS,
  67.     multipleSel  = FDS_MULTIPLESEL,
  68.     preloadVol   = FDS_PRELOAD_VOLINFO
  69.    };
  70.  
  71.  
  72.              OFileDialog (HWND hParent = HWND_DESKTOP,
  73.                           HWND hOwner  = HWND_DESKTOP);
  74.  
  75.     virtual ~OFileDialog ();
  76.   
  77.     virtual PSZ
  78.             isOfType     () const;
  79.  
  80.     
  81.     PSZ     open         (PSZ title,
  82.                           PSZ initialPath,
  83.                           PSZ fileMask = "*",
  84.                           OFileDialog::styles style = OFileDialog::center);
  85.  
  86.     PSZ     saveAs      (PSZ title,
  87.                          PSZ initialPath,
  88.                          PSZ initialFileName = NULL,
  89.                          OFileDialog::styles style = OFileDialog::center);
  90.  
  91.  
  92. };
  93.  
  94.  
  95. #endif // OCOLORDIALOG_INCLUDED
  96.