00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ROOT_TGFileDialog
00014 #define ROOT_TGFileDialog
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef ROOT_TGFrame
00035 #include "TGFrame.h"
00036 #endif
00037
00038
00039 enum EFileDialogMode {
00040 kFDOpen,
00041 kFDSave
00042 };
00043
00044
00045 class TGTextBuffer;
00046 class TGTextEntry;
00047 class TGComboBox;
00048 class TGPictureButton;
00049 class TGTextButton;
00050 class TGCheckButton;
00051 class TGListView;
00052 class TGFileContainer;
00053 class TGFSComboBox;
00054
00055
00056 class TGFileInfo {
00057
00058 private:
00059 TGFileInfo(const TGFileInfo&);
00060 TGFileInfo& operator=(const TGFileInfo&);
00061
00062 public:
00063 char *fFilename;
00064 char *fIniDir;
00065 const char **fFileTypes;
00066 Int_t fFileTypeIdx;
00067 Bool_t fOverwrite;
00068 Bool_t fMultipleSelection;
00069 TList *fFileNamesList;
00070
00071 TGFileInfo() : fFilename(0), fIniDir(0), fFileTypes(0), fFileTypeIdx(0),
00072 fOverwrite(kFALSE), fMultipleSelection(0), fFileNamesList(0) { }
00073 ~TGFileInfo();
00074
00075 void SetMultipleSelection(Bool_t option);
00076 };
00077
00078
00079 class TGFileDialog : public TGTransientFrame {
00080
00081 protected:
00082 TGTextBuffer *fTbfname;
00083 TGTextEntry *fName;
00084 TGComboBox *fTypes;
00085 TGFSComboBox *fTreeLB;
00086 TGPictureButton *fCdup;
00087 TGPictureButton *fNewf;
00088 TGPictureButton *fList;
00089 TGPictureButton *fDetails;
00090 TGCheckButton *fCheckB;
00091
00092 const TGPicture *fPcdup;
00093 const TGPicture *fPnewf;
00094 const TGPicture *fPlist;
00095 const TGPicture *fPdetails;
00096 TGTextButton *fOk;
00097 TGTextButton *fCancel;
00098 TGListView *fFv;
00099 TGFileContainer *fFc;
00100 TGFileInfo *fFileInfo;
00101
00102 private:
00103 TGFileDialog(const TGFileDialog&);
00104 TGFileDialog& operator=(const TGFileDialog&);
00105
00106 public:
00107 TGFileDialog(const TGWindow *p = 0, const TGWindow *main = 0,
00108 EFileDialogMode dlg_type = kFDOpen, TGFileInfo *file_info = 0);
00109 virtual ~TGFileDialog();
00110
00111 virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
00112 virtual void CloseWindow();
00113
00114 ClassDef(TGFileDialog,0)
00115 };
00116
00117 #endif