00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef FX_DISABLEFILEDIRDIALOGS
00025
00026 #ifndef FXFILEDIALOG_H
00027 #define FXFILEDIALOG_H
00028
00029 #ifndef FXDIALOGBOX_H
00030 #include "FXDialogBox.h"
00031 #endif
00032
00033 namespace FX {
00034
00035
00036 class FXFileSelector;
00037
00038
00040 class FXAPI FXFileDialog : public FXDialogBox {
00041 FXDECLARE(FXFileDialog)
00042 protected:
00043 FXFileSelector *filebox;
00044 protected:
00045 FXFileDialog(){}
00046 void initdialog();
00047 private:
00048 FXFileDialog(const FXFileDialog&);
00049 FXFileDialog &operator=(const FXFileDialog&);
00050 public:
00051
00053 FXFileDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=500,FXint h=300);
00054
00056 FXFileDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=500,FXint h=300);
00057
00059 virtual void hide();
00060
00062 void setFilename(const FXString& path);
00063
00065 FXString getFilename() const;
00066
00068 FXString* getFilenames() const;
00069
00071 void setPattern(const FXString& ptrn);
00072
00074 FXString getPattern() const;
00075
00090 void setPatternList(const FXString& patterns);
00091
00093 FXString getPatternList() const;
00094
00099 void setCurrentPattern(FXint n);
00100
00102 FXint getCurrentPattern() const;
00103
00105 FXString getPatternText(FXint patno) const;
00106
00108 void setPatternText(FXint patno,const FXString& text);
00109
00111 FXint getNumPatterns() const;
00112
00114 void allowPatternEntry(FXbool allow);
00115
00117 FXbool allowPatternEntry() const;
00118
00120 void setDirectory(const FXString& path);
00121
00123 FXString getDirectory() const;
00124
00126 void setItemSpace(FXint s);
00127
00129 FXint getItemSpace() const;
00130
00132 void setSelectMode(FXuint mode);
00133
00135 FXuint getSelectMode() const;
00136
00138 void setMatchMode(FXuint mode);
00139
00141 FXuint getMatchMode() const;
00142
00144 FXbool showHiddenFiles() const;
00145
00147 void showHiddenFiles(FXbool showing);
00148
00150 FXbool showImages() const;
00151
00153 void showImages(FXbool showing);
00154
00156 FXint getImageSize() const;
00157
00159 void setImageSize(FXint size);
00160
00162 void showReadOnly(FXbool show);
00163
00165 FXbool shownReadOnly() const;
00166
00168 void setReadOnly(FXbool state);
00169
00171 FXbool getReadOnly() const;
00172
00174 void setFileBoxStyle(FXuint style);
00175
00177 FXuint getFileBoxStyle() const;
00178
00180 void allowNavigation(FXbool navigable);
00181
00183 FXbool allowNavigation() const;
00184
00186 static FXString getOpenFilename(FXWindow* owner,const FXString& caption,const FXString& path,const FXString& patterns="*",FXint initial=0);
00187
00189 static FXString* getOpenFilenames(FXWindow* owner,const FXString& caption,const FXString& path,const FXString& patterns="*",FXint initial=0);
00190
00192 static FXString getSaveFilename(FXWindow* owner,const FXString& caption,const FXString& path,const FXString& patterns="*",FXint initial=0);
00193
00195 static FXString getOpenDirectory(FXWindow* owner,const FXString& caption,const FXString& path);
00196
00198 virtual void save(FXStream& store) const;
00199
00201 virtual void load(FXStream& store);
00202
00204 virtual ~FXFileDialog();
00205 };
00206
00207 }
00208
00209 #endif
00210 #endif