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 FXFILEDIALOG_H
00025
#define FXFILEDIALOG_H
00026
00027
#ifndef FXDIALOGBOX_H
00028
#include "FXDialogBox.h"
00029
#endif
00030
00031
namespace FX {
00032
00033
00034
class FXFileSelector;
00035
00036
00037
00038 class FXAPI FXFileDialog :
public FXDialogBox {
00039 FXDECLARE(FXFileDialog)
00040
protected:
00041
FXFileSelector *filebox;
00042
protected:
00043 FXFileDialog(){}
00044
void initdialog();
00045
private:
00046 FXFileDialog(
const FXFileDialog&);
00047 FXFileDialog &operator=(
const FXFileDialog&);
00048
public:
00049
00050
00051 FXFileDialog(
FXWindow* owner,
const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=500,FXint h=300);
00052
00053
00054 FXFileDialog(
FXApp* a,
const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=500,FXint h=300);
00055
00056
00057
virtual void hide();
00058
00059
00060
void setFilename(
const FXString& path);
00061
00062
00063
FXString getFilename()
const;
00064
00065
00066
FXString* getFilenames()
const;
00067
00068
00069
void setPattern(
const FXString& ptrn);
00070
00071
00072
FXString getPattern()
const;
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
void setPatternList(
const FXString& patterns);
00089
00090
00091
FXString getPatternList()
const;
00092
00093
00094
00095
00096
00097
void setCurrentPattern(FXint n);
00098
00099
00100 FXint getCurrentPattern()
const;
00101
00102
00103
FXString getPatternText(FXint patno)
const;
00104
00105
00106
void setPatternText(FXint patno,
const FXString& text);
00107
00108
00109
void allowPatternEntry(FXbool allow);
00110
00111
00112 FXbool allowPatternEntry()
const;
00113
00114
00115
void setDirectory(
const FXString& path);
00116
00117
00118
FXString getDirectory()
const;
00119
00120
00121
void setItemSpace(FXint s);
00122
00123
00124 FXint getItemSpace()
const;
00125
00126
00127
void setSelectMode(FXuint mode);
00128
00129
00130 FXuint getSelectMode()
const;
00131
00132
00133
void setMatchMode(FXuint mode);
00134
00135
00136 FXuint getMatchMode()
const;
00137
00138
00139 FXbool showHiddenFiles()
const;
00140
00141
00142
void showHiddenFiles(FXbool showing);
00143
00144
00145 FXbool showImages()
const;
00146
00147
00148
void showImages(FXbool showing);
00149
00150
00151 FXint getImageSize()
const;
00152
00153
00154
void setImageSize(FXint size);
00155
00156
00157
void showReadOnly(FXbool show);
00158
00159
00160 FXbool shownReadOnly()
const;
00161
00162
00163
void setReadOnly(FXbool state);
00164
00165
00166 FXbool getReadOnly()
const;
00167
00168
00169
void setFileBoxStyle(FXuint style);
00170
00171
00172 FXuint getFileBoxStyle()
const;
00173
00174
00175
static FXString getOpenFilename(
FXWindow* owner,
const FXString& caption,
const FXString& path,
const FXString& patterns=
"*",FXint initial=0);
00176
00177
00178
static FXString* getOpenFilenames(
FXWindow* owner,
const FXString& caption,
const FXString& path,
const FXString& patterns=
"*",FXint initial=0);
00179
00180
00181
static FXString getSaveFilename(
FXWindow* owner,
const FXString& caption,
const FXString& path,
const FXString& patterns=
"*",FXint initial=0);
00182
00183
00184
static FXString getOpenDirectory(
FXWindow* owner,
const FXString& caption,
const FXString& path);
00185
00186
00187
virtual void save(
FXStream& store)
const;
00188
00189
00190
virtual void load(
FXStream& store);
00191
00192
00193
virtual ~FXFileDialog();
00194 };
00195
00196 }
00197
00198
#endif