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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXFileDialog.h
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,2012 by Jeroen van der Zijp.   All Rights Reserved.        *
00007 *********************************************************************************
00008 * This library is free software; you can redistribute it and/or modify          *
00009 * it under the terms of the GNU Lesser General Public License as published by   *
00010 * the Free Software Foundation; either version 3 of the License, or             *
00011 * (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                 *
00016 * GNU Lesser General Public License for more details.                           *
00017 *                                                                               *
00018 * You should have received a copy of the GNU Lesser General Public License      *
00019 * along with this program.  If not, see <http://www.gnu.org/licenses/>          *
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

Copyright © 1997-2011 Jeroen van der Zijp