![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * D i r e c t o r y B o x W i d g e t * 00004 * * 00005 ********************************************************************************* 00006 * Copyright (C) 1999,2002 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: FXDirBox.h,v 1.13 2002/01/18 22:42:52 jeroen Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXDIRBOX_H 00025 #define FXDIRBOX_H 00026 00027 #ifndef FXTREELISTBOX_H 00028 #include "FXTreeListBox.h" 00029 #endif 00030 00031 00032 00033 class FXIcon; 00034 00035 00036 /// Directory Box 00037 class FXAPI FXDirBox : public FXTreeListBox { 00038 FXDECLARE(FXDirBox) 00039 protected: 00040 FXString directory; // Current directory 00041 FXIcon *foldericon; // Folder icons 00042 FXIcon *cdromicon; 00043 FXIcon *desktopicon; 00044 FXIcon *harddiskicon; 00045 FXIcon *networkicon; 00046 FXIcon *floppyicon; 00047 FXIcon *computericon; 00048 FXIcon *nethoodicon; 00049 FXIcon *zipdiskicon; 00050 protected: 00051 FXDirBox(){} 00052 FXString itempath(FXTreeItem *item); 00053 private: 00054 FXDirBox(const FXDirBox&); 00055 FXDirBox &operator=(const FXDirBox&); 00056 public: 00057 long onChanged(FXObject*,FXSelector,void*); 00058 long onCommand(FXObject*,FXSelector,void*); 00059 long onCmdSetValue(FXObject*,FXSelector,void*); 00060 long onCmdSetStringValue(FXObject*,FXSelector,void*); 00061 long onCmdGetStringValue(FXObject*,FXSelector,void*); 00062 public: 00063 00064 /// Constructor 00065 FXDirBox(FXComposite *p,FXint nvis,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=FRAME_SUNKEN|FRAME_THICK|TREELISTBOX_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_PAD,FXint pr=DEFAULT_PAD,FXint pt=DEFAULT_PAD,FXint pb=DEFAULT_PAD); 00066 00067 /// Create server-side resources 00068 virtual void create(); 00069 00070 /// Detach server-side resources 00071 virtual void detach(); 00072 00073 /// Destroy server-side resources 00074 virtual void destroy(); 00075 00076 /// Save to stream 00077 virtual void save(FXStream& store) const; 00078 00079 /// Load from stream 00080 virtual void load(FXStream& store); 00081 00082 /// Set current directory 00083 void setDirectory(const FXString& pathname); 00084 00085 /// Return current directory 00086 FXString getDirectory() const { return directory; } 00087 00088 /// Destructor 00089 virtual ~FXDirBox(); 00090 }; 00091 00092 00093 #endif