FXFileDialog.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                   F i l e   S e l e c t i o n   D i a l o g                   *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1998,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or                 *
00009 * modify it under the terms of the GNU Lesser General Public                    *
00010 * License as published by the Free Software Foundation; either                  *
00011 * version 2.1 of the License, or (at your option) any later version.            *
00012 *                                                                               *
00013 * This library is distributed in the hope that it will be useful,               *
00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU             *
00016 * Lesser General Public License for more details.                               *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public              *
00019 * License along with this library; if not, write to the Free Software           *
00020 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.    *
00021 *********************************************************************************
00022 * $Id: FXFileDialog.h,v 1.34 2006/01/23 06:03:15 fox Exp $                      *
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

(C) 2002-2009 Niall Douglas. Some parts (C) to assorted authors.
Generated on Fri Nov 20 18:31:21 2009 for TnFOX by doxygen v1.4.7