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,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: FXDirDialog.h,v 1.17 2006/01/22 17:58:00 fox Exp $                       *
00023 ********************************************************************************/
00024 #ifndef FXDIRDIALOG_H
00025 #define FXDIRDIALOG_H
00026 
00027 #ifndef FXDIALOGBOX_H
00028 #include "FXDialogBox.h"
00029 #endif
00030 
00031 namespace FX {
00032 
00033 
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   /// Open directory name
00095   static FXString getOpenDirectory(FXWindow* owner,const FXString& caption,const FXString& path);
00096 
00097   /// Save to stream
00098   virtual void save(FXStream& store) const;
00099 
00100   /// Load from stream
00101   virtual void load(FXStream& store);
00102 
00103   /// Destructor
00104   virtual ~FXDirDialog();
00105   };
00106 
00107 }
00108 
00109 #endif

Copyright © 1997-2005 Jeroen van der Zijp