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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXDirSelector.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *              D i r e c t o r y   S e l e c t i o n   W i d g e t              *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 2000,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 FXDIRSELECTOR_H
00022 #define FXDIRSELECTOR_H
00023 
00024 #ifndef FXPACKER_H
00025 #include "FXPacker.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 class FXFileDict;
00032 class FXDirList;
00033 class FXTextField;
00034 class FXButton;
00035 
00036 
00044 class FXAPI FXDirSelector : public FXPacker {
00045   FXDECLARE(FXDirSelector)
00046 protected:
00047   FXDirList     *dirbox;        // Directory list widget
00048   FXTextField   *dirname;       // Directory name entry field
00049   FXButton      *accept;        // Accept button
00050   FXButton      *cancel;        // Cancel button
00051   FXIcon        *updiricon;     // Up directory icon
00052   FXIcon        *homeicon;      // Go home icon
00053   FXIcon        *workicon;      // Go home icon
00054   FXIcon        *markicon;      // Book mark icon
00055   FXIcon        *clearicon;     // Book clear icon
00056   FXIcon        *newicon;       // New directory icon
00057   FXIcon        *deleteicon;    // Delete file icon
00058   FXIcon        *moveicon;      // Rename file icon
00059   FXIcon        *copyicon;      // Copy file icon
00060   FXIcon        *linkicon;      // Link file icon
00061   FXRecentFiles  mrufiles;      // Recently visited places
00062 protected:
00063   FXDirSelector(){}
00064 private:
00065   FXDirSelector(const FXDirSelector&);
00066   FXDirSelector &operator=(const FXDirSelector&);
00067 public:
00068   long onCmdName(FXObject*,FXSelector,void*);
00069   long onCmdOpened(FXObject*,FXSelector,void*);
00070   long onCmdHome(FXObject*,FXSelector,void*);
00071   long onCmdWork(FXObject*,FXSelector,void*);
00072   long onCmdDirectoryUp(FXObject*,FXSelector,void*);
00073   long onPopupMenu(FXObject*,FXSelector,void*);
00074   long onCmdBookmark(FXObject*,FXSelector,void*);
00075   long onCmdVisit(FXObject*,FXSelector,void*);
00076   long onCmdNew(FXObject*,FXSelector,void*);
00077   long onUpdNew(FXObject*,FXSelector,void*);
00078   long onCmdMove(FXObject*,FXSelector,void*);
00079   long onCmdCopy(FXObject*,FXSelector,void*);
00080   long onCmdLink(FXObject*,FXSelector,void*);
00081   long onCmdRemove(FXObject*,FXSelector,void*);
00082   long onUpdSelected(FXObject*,FXSelector,void*);
00083 public:
00084   enum {
00085     ID_DIRNAME=FXPacker::ID_LAST,
00086     ID_DIRLIST,
00087     ID_HOME,
00088     ID_WORK,
00089     ID_DIRECTORY_UP,
00090     ID_BOOKMARK,
00091     ID_VISIT,
00092     ID_NEW,
00093     ID_REMOVE,
00094     ID_MOVE,
00095     ID_COPY,
00096     ID_LINK,
00097     ID_LAST
00098     };
00099 public:
00100 
00102   FXDirSelector(FXComposite *p,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=0,FXint x=0,FXint y=0,FXint w=0,FXint h=0);
00103 
00105   FXButton *acceptButton() const { return accept; }
00106 
00108   FXButton *cancelButton() const { return cancel; }
00109 
00111   void setDirectory(const FXString& path);
00112 
00114   FXString getDirectory() const;
00115 
00117   FXbool showFiles() const;
00118 
00120   void showFiles(FXbool showing);
00121 
00123   FXbool showHiddenFiles() const;
00124 
00126   void showHiddenFiles(FXbool showing);
00127 
00129   FXuint getMatchMode() const;
00130 
00132   void setMatchMode(FXuint mode);
00133 
00135   void setDirBoxStyle(FXuint style);
00136 
00138   FXuint getDirBoxStyle() const;
00139 
00141   void setAssociations(FXFileDict* assoc,FXbool owned=false);
00142 
00144   FXFileDict* getAssociations() const;
00145 
00147   virtual void save(FXStream& store) const;
00148 
00150   virtual void load(FXStream& store);
00151 
00153   virtual ~FXDirSelector();
00154   };
00155 
00156 }
00157 
00158 #endif

Copyright © 1997-2011 Jeroen van der Zijp