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

FXDirDialog.h

Go to the documentation of this file.
00001 /********************************************************************************
00002 *                                                                               *
00003 *                D i r e c t o r y   S e l e c t i o n   D i a l o g            *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2000,2009 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 * $Id: FXDirDialog.h,v 1.26 2009/01/06 13:07:23 fox Exp $                       *
00022 ********************************************************************************/
00023 #ifndef FXDIRDIALOG_H
00024 #define FXDIRDIALOG_H
00025 
00026 #ifndef FXDIALOGBOX_H
00027 #include "FXDialogBox.h"
00028 #endif
00029 
00030 namespace FX {
00031 
00032 
00033 class FXFileDict;
00034 class FXDirSelector;
00035 
00036 
00037 /**
00038 * A Directory Dialog provides a way to select a directory.  In function,
00039 * the directory selection dialog is very similar to the file dialog, except that
00040 * the Directory Dialog displays a tree-structured view of the file system, and
00041 * thereby makes up and down navigation through the file system significantly easier.
00042 */
00043 class FXAPI FXDirDialog : public FXDialogBox {
00044   FXDECLARE(FXDirDialog)
00045 protected:
00046   FXDirSelector *dirbox;          // Directory selection widget
00047 protected:
00048   FXDirDialog(){}
00049   void initdialog();
00050 private:
00051   FXDirDialog(const FXDirDialog&);
00052   FXDirDialog &operator=(const FXDirDialog&);
00053 public:
00054 
00055   /// Construct Directory Dialog box
00056   FXDirDialog(FXWindow* owner,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=400,FXint h=300);
00057 
00058   /// Construct free-floating Directory Dialog box
00059   FXDirDialog(FXApp* a,const FXString& name,FXuint opts=0,FXint x=0,FXint y=0,FXint w=400,FXint h=300);
00060 
00061   /// Hide this window
00062   virtual void hide();
00063 
00064   /// Change directory
00065   void setDirectory(const FXString& path);
00066 
00067   /// Return directory
00068   FXString getDirectory() const;
00069 
00070   /// Return true if showing files as well as directories
00071   FXbool showFiles() const;
00072 
00073   /// Show or hide normal files
00074   void showFiles(FXbool showing);
00075 
00076   /// Return true if showing hidden files
00077   FXbool showHiddenFiles() const;
00078 
00079   /// Show or hide hidden files
00080   void showHiddenFiles(FXbool showing);
00081 
00082   /// Return wildcard matching mode
00083   FXuint getMatchMode() const;
00084 
00085   /// Change wildcard matching mode
00086   void setMatchMode(FXuint mode);
00087 
00088   /// Change directory list style
00089   void setDirBoxStyle(FXuint style);
00090 
00091   /// Return directory list style
00092   FXuint getDirBoxStyle() const;
00093 
00094   /// Change file associations; delete old ones if owned
00095   void setAssociations(FXFileDict* assoc,FXbool owned=false);
00096 
00097   /// Return file associations
00098   FXFileDict* getAssociations() const;
00099 
00100   /// Open directory name
00101   static FXString getOpenDirectory(FXWindow* owner,const FXString& caption,const FXString& path);
00102 
00103   /// Save to stream
00104   virtual void save(FXStream& store) const;
00105 
00106   /// Load from stream
00107   virtual void load(FXStream& store);
00108 
00109   /// Destructor
00110   virtual ~FXDirDialog();
00111   };
00112 
00113 }
00114 
00115 #endif

Copyright © 1997-2009 Jeroen van der Zijp