![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
00001 /******************************************************************************** 00002 * * 00003 * D r i v e 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: FXDriveBox.h,v 1.9 2002/02/05 03:59:27 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXDRIVEBOX_H 00025 #define FXDRIVEBOX_H 00026 00027 #ifndef FXLISTBOX_H 00028 #include "FXListBox.h" 00029 #endif 00030 00031 00032 00033 class FXIcon; 00034 00035 00036 /// Directory Box 00037 class FXAPI FXDriveBox : public FXListBox { 00038 FXDECLARE(FXDriveBox) 00039 protected: 00040 FXIcon *foldericon; // Folder icons 00041 FXIcon *cdromicon; 00042 FXIcon *desktopicon; 00043 FXIcon *harddiskicon; 00044 FXIcon *networkicon; 00045 FXIcon *floppyicon; 00046 FXIcon *computericon; 00047 FXIcon *nethoodicon; 00048 FXIcon *zipdiskicon; 00049 protected: 00050 FXDriveBox(){} 00051 void listDrives(); 00052 private: 00053 FXDriveBox(const FXDriveBox&); 00054 FXDriveBox &operator=(const FXDriveBox&); 00055 public: 00056 long onListChanged(FXObject*,FXSelector,void*); 00057 long onListClicked(FXObject*,FXSelector,void*); 00058 long onCmdSetValue(FXObject*,FXSelector,void*); 00059 long onCmdSetStringValue(FXObject*,FXSelector,void*); 00060 long onCmdGetStringValue(FXObject*,FXSelector,void*); 00061 public: 00062 00063 /// Constructor 00064 FXDriveBox(FXComposite *p,FXint nvis,FXObject* tgt=NULL,FXSelector sel=0,FXuint opts=FRAME_SUNKEN|FRAME_THICK|LISTBOX_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); 00065 00066 /// Create server-side resources 00067 virtual void create(); 00068 00069 /// Detach server-side resources 00070 virtual void detach(); 00071 00072 /// Destroy server-side resources 00073 virtual void destroy(); 00074 00075 /// Save to stream 00076 virtual void save(FXStream& store) const; 00077 00078 /// Load from stream 00079 virtual void load(FXStream& store); 00080 00081 /// Set current drive 00082 FXbool setDrive(const FXString& drive); 00083 00084 /// Return current drive 00085 FXString getDrive() const; 00086 00087 /// Destructor 00088 virtual ~FXDriveBox(); 00089 }; 00090 00091 00092 #endif