00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FXFILEDIALOG_H
00022 #define FXFILEDIALOG_H
00023
00024 #ifndef FXDIALOGBOX_H
00025 #include "FXDialogBox.h"
00026 #endif
00027
00028 namespace FX {
00029
00030
00031 class FXFileDict;
00032 class FXFileSelector;
00033
00034
00036 class FXAPI FXFileDialog : public FXDialogBox {
00037 FXDECLARE(FXFileDialog)
00038 protected:
00039 FXFileSelector *filebox;
00040 protected:
00041 FXFileDialog(){}
00042 void initdialog();
00043 private:
00044 FXFileDialog(const FXFileDialog&);
00045 FXFileDialog &operator=(const FXFileDialog&);
00046 public:
00047
00049 FXFileDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=500,FXint h=300);
00050
00052 FXFileDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=500,FXint h=300);
00053
00055 virtual void hide();
00056
00058 void setFilename(const FXString& path);
00059
00061 FXString getFilename() const;
00062
00064 FXString* getFilenames() const;
00065
00067 void setPattern(const FXString& ptrn);
00068
00070 FXString getPattern() const;
00071
00086 void setPatternList(const FXString& patterns);
00087
00089 FXString getPatternList() const;
00090
00095 void setCurrentPattern(FXint n);
00096
00098 FXint getCurrentPattern() const;
00099
00101 void setPatternText(FXint patno,const FXString& text);
00102
00104 FXString getPatternText(FXint patno) const;
00105
00107 FXint getNumPatterns() const;
00108
00110 void allowPatternEntry(FXbool flag);
00111
00113 FXbool allowPatternEntry() const;
00114
00116 void setDirectory(const FXString& path);
00117
00119 FXString getDirectory() const;
00120
00122 void setItemSpace(FXint s);
00123
00125 FXint getItemSpace() const;
00126
00128 void setSelectMode(FXuint mode);
00129
00131 FXuint getSelectMode() const;
00132
00134 void setMatchMode(FXuint mode);
00135
00137 FXuint getMatchMode() const;
00138
00140 FXbool showHiddenFiles() const;
00141
00143 void showHiddenFiles(FXbool flag);
00144
00146 FXbool showImages() const;
00147
00149 void showImages(FXbool flag);
00150
00152 FXint getImageSize() const;
00153
00155 void setImageSize(FXint size);
00156
00158 void showReadOnly(FXbool flag);
00159
00161 FXbool shownReadOnly() const;
00162
00164 void setReadOnly(FXbool flag);
00165
00167 FXbool getReadOnly() const;
00168
00170 void setFileBoxStyle(FXuint style);
00171
00173 FXuint getFileBoxStyle() const;
00174
00176 void allowNavigation(FXbool flag);
00177
00179 FXbool allowNavigation() const;
00180
00182 void setDraggableFiles(FXbool flag);
00183
00185 FXbool getDraggableFiles() const;
00186
00188 void setAssociations(FXFileDict* assoc,FXbool owned=false);
00189
00191 FXFileDict* getAssociations() const;
00192
00194 static FXString getOpenFilename(FXWindow* owner,const FXString& caption,const FXString& path,const FXString& patterns="*",FXint initial=0);
00195
00197 static FXString* getOpenFilenames(FXWindow* owner,const FXString& caption,const FXString& path,const FXString& patterns="*",FXint initial=0);
00198
00200 static FXString getSaveFilename(FXWindow* owner,const FXString& caption,const FXString& path,const FXString& patterns="*",FXint initial=0);
00201
00203 static FXString getOpenDirectory(FXWindow* owner,const FXString& caption,const FXString& path);
00204
00206 virtual void save(FXStream& store) const;
00207
00209 virtual void load(FXStream& store);
00210
00212 virtual ~FXFileDialog();
00213 };
00214
00215 }
00216
00217 #endif