#ifndef __XFILEDLG_H__
#define __XFILEDLG_H__

/*===========================================================================*/
/* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
/*===========================================================================*/
/*                              class: XFileDialog                           */
/*                       derived from: XSystemDialog                         */
/*                        last update: 12/96                                 */
/*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
/*===========================================================================*/




#include "xsysdlg.h"
#include "xstring.h"

#ifdef OOL_FOR_OS2_X86
   #define FD_OPEN        	FDS_OPEN_DIALOG
   #define FD_CENTER      	FDS_CENTER
   #define FD_SAVEAS      	FDS_SAVEAS_DIALOG
   #define FD_MULTIPLESEL 	FDS_MULTIPLESEL
   #define FD_HELP        	FDS_HELPBUTTON
   #define FD_MODELESS    	FDS_MODELESS
   #define FD_APPLYBUTTON 	FDS_APPLYBUTTON
   #define FD_EAS         	FDS_INCLUDE_EAS
   #define FD_FILTERUNION 	FDS_FILTERUNION
	#define FD_HELPBUTTON	FDS_HELPBUTTON
#endif

class XWindow;


class _export_ XFileDialog: public XSystemDialog
{
   private:
      char * fileName;
      PAPSZ pap;
      SHORT numbers;
   public:
      XFileDialog( const XWindow * owner, const char * filename ="*.*", const char * title = NULL, const char * fileType = NULL, const LONG options = FD_OPEN | FD_CENTER);
      virtual ~XFileDialog();
      void GetFileName( XString * st, const SHORT index = 0) { *st = (char*) (index == 0 ? (char*) fileName : (char*) *pap[index]); }
      SHORT GetFileCount( void ) const { return numbers; }
};

#endif
