Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXFileDialog.h
1 /********************************************************************************
2 * *
3 * F i l e S e l e c t i o n D i a l o g *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1998,2017 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXFILEDIALOG_H
22 #define FXFILEDIALOG_H
23 
24 #ifndef FXDIALOGBOX_H
25 #include "FXDialogBox.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXFileSelector;
32 class FXIconSource;
33 class FXFileAssociations;
34 
35 
37 class FXAPI FXFileDialog : public FXDialogBox {
38  FXDECLARE(FXFileDialog)
39 protected:
40  FXFileSelector *filebox;
41 protected:
42  static const FXchar sectionName[];
43 protected:
44  FXFileDialog(){}
45  void loadSettings();
46  void saveSettings();
47 private:
48  FXFileDialog(const FXFileDialog&);
49  FXFileDialog &operator=(const FXFileDialog&);
50 public:
51 
53  FXFileDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=500,FXint h=300);
54 
56  FXFileDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=500,FXint h=300);
57 
59  void setFilename(const FXString& path);
60 
62  FXString getFilename() const;
63 
65  FXString* getFilenames() const;
66 
68  void setDirectory(const FXString& path);
69 
71  FXString getDirectory() const;
72 
74  void setSelectMode(FXuint mode);
75 
77  FXuint getSelectMode() const;
78 
80  void setPattern(const FXString& ptrn);
81 
83  FXString getPattern() const;
84 
86  void setMatchMode(FXuint mode);
87 
89  FXuint getMatchMode() const;
90 
105  void setPatternList(const FXString& patterns);
106 
108  FXString getPatternList() const;
109 
114  void setCurrentPattern(FXint patno);
115 
117  FXint getCurrentPattern() const;
118 
120  void setPatternText(FXint patno,const FXString& text);
121 
123  FXString getPatternText(FXint patno) const;
124 
126  FXint getNumPatterns() const;
127 
129  void allowPatternEntry(FXbool flag);
130 
132  FXbool allowPatternEntry() const;
133 
135  void setItemSpace(FXint s);
136 
138  FXint getItemSpace() const;
139 
141  FXbool showHiddenFiles() const;
142 
144  void showHiddenFiles(FXbool flag);
145 
147  FXbool showImages() const;
148 
150  void showImages(FXbool flag);
151 
153  FXint getImageSize() const;
154 
156  void setImageSize(FXint size);
157 
159  void showReadOnly(FXbool flag);
160 
162  FXbool shownReadOnly() const;
163 
165  void setReadOnly(FXbool flag);
166 
168  FXbool getReadOnly() const;
169 
171  void setFileBoxStyle(FXuint style);
172 
174  FXuint getFileBoxStyle() const;
175 
177  void allowNavigation(FXbool flag);
178 
180  FXbool allowNavigation() const;
181 
183  void setDraggableFiles(FXbool flag);
184 
186  FXbool getDraggableFiles() const;
187 
189  void setTimeFormat(const FXString& fmt);
190 
192  FXString getTimeFormat() const;
193 
195  void setAssociations(FXFileAssociations* assoc,FXbool owned=false);
196 
198  FXFileAssociations* getAssociations() const;
199 
201  void setIconSource(FXIconSource* src);
202 
204  FXIconSource* getIconSource() const;
205 
212  static FXString getOpenFilename(FXWindow* owner,const FXString& caption,const FXString& path,const FXString& patterns="*",FXint initial=0);
213 
222  static FXString* getOpenFilenames(FXWindow* owner,const FXString& caption,const FXString& path,const FXString& patterns="*",FXint initial=0);
223 
230  static FXString getSaveFilename(FXWindow* owner,const FXString& caption,const FXString& path,const FXString& patterns="*",FXint initial=0);
231 
238  static FXString getOpenDirectory(FXWindow* owner,const FXString& caption,const FXString& path);
239 
241  virtual void save(FXStream& store) const;
242 
244  virtual void load(FXStream& store);
245 
247  virtual ~FXFileDialog();
248  };
249 
250 }
251 
252 #endif

Copyright © 1997-2016 Jeroen van der Zijp