home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ool_main.zip / ool / include / xFileDlg.H < prev    next >
C/C++ Source or Header  |  1998-03-15  |  3KB  |  74 lines

  1. #ifndef __AFILEDLG_H__
  2. #define __AFILEDLG_H__
  3.  
  4. /*===========================================================================*/
  5. /* OOL ------------------- the Open Object Library ------------------- r 1.0 */
  6. /*===========================================================================*/
  7. /*                              class: XFileDialog                           */
  8. /*                       derived from: XObject                               */
  9. /*                        last update: 3/98                                  */
  10. /*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
  11. /*                      Win32-port by: Stefan von Brauk (sbrauk@gwdg.de)     */
  12. /*===========================================================================*/
  13.  
  14.  
  15. #include "xsysdlg.h"
  16. #include "xstring.h"
  17.  
  18. #ifdef OOL_FOR_OS2_X86
  19.    #define FD_OPEN           FDS_OPEN_DIALOG
  20.    #define FD_CENTER         FDS_CENTER
  21.    #define FD_SAVEAS         FDS_SAVEAS_DIALOG
  22.    #define FD_MULTIPLESEL    FDS_MULTIPLESEL
  23.    #define FD_HELP           FDS_HELPBUTTON
  24.    #define FD_MODELESS       FDS_MODELESS
  25.    #define FD_APPLYBUTTON    FDS_APPLYBUTTON
  26.    //#define FD_EAS            FDS_INCLUDE_EAS
  27.    #define FD_FILTERUNION    FDS_FILTERUNION
  28.    #define FD_HELPBUTTON   FDS_HELPBUTTON
  29. #endif
  30.  
  31.  
  32. #ifdef OOL_FOR_WIN32_X86
  33.    #include <commdlg.h>
  34.    #define FD_OPEN           0x00400000
  35.    #define FD_CENTER         0x00800000
  36.    #define FD_SAVEAS         2
  37.    #define FD_MULTIPLESEL    OFN_ALLOWMULTISELECT
  38.    //#define FD_HELP           FDS_HELPBUTTON
  39.    //#define FD_MODELESS       FDS_MODELESS
  40.    //#define FD_APPLYBUTTON    FDS_APPLYBUTTON
  41.    //#define FD_EAS            FDS_INCLUDE_EAS
  42.    //#define FD_FILTERUNION    FDS_FILTERUNION
  43.    //#define FD_HELPBUTTON   FDS_HELPBUTTON
  44. #endif
  45.  
  46. class XWindow;
  47.  
  48.  
  49. class _export_ XFileDialog: public XSystemDialog
  50. {
  51. friend class XGLibFileDialog;
  52.    private:
  53.       XString fileName;
  54. #ifdef OOL_FOR_OS2_X86
  55.       PAPSZ pap;
  56. #endif
  57.       USHORT numbers;
  58.    protected:
  59.       ULONG Start( const XWindow * owner, const char *f, const char *title, const char *fileType, const LONG options, char ** typeList, FNWP* dlgProc, ULONG ulUser );
  60.    public:
  61.       XFileDialog() {}
  62.       XFileDialog( const XWindow * owner, const char * filename ="*", const char * title = NULL, const char * fileType = NULL, const LONG options = FD_OPEN | FD_CENTER, char ** typeList = NULL, FNWP* dlgProc = NULL, ULONG ulUser = 0L);
  63.       virtual ~XFileDialog();
  64. #ifdef OOL_FOR_OS2_X86
  65.       void GetFileName( XString * st, const USHORT index = 0) { *st = (index == 0 ? (char*) fileName : (char*) *pap[index]); }
  66. #endif
  67. #ifdef OOL_FOR_WIN32_X86
  68.       void GetFileName( XString * st, const USHORT index = 0);
  69. #endif
  70.       SHORT GetFileCount( void ) const { return numbers; }
  71. };
  72.  
  73. #endif
  74.