![]() |
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.11 2002/03/12 00:49:49 fox Exp $ * 00023 ********************************************************************************/ 00024 #ifndef FXDRIVEBOX_H 00025 #define FXDRIVEBOX_H 00026 00027 #ifndef FXLISTBOX_H 00028 #include "FXListBox.h" 00029 #endif 00030 00031 namespace FX { 00032 00033 00034 class FXIcon; 00035 00036 00037 /// Directory Box 00038 class FXAPI FXDriveBox : public FXListBox { 00039 FXDECLARE(FXDriveBox) 00040 protected: 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 FXDriveBox(){} 00052 void listDrives(); 00053 private: 00054 FXDriveBox(const FXDriveBox&); 00055 FXDriveBox &operator=(const FXDriveBox&); 00056 public: 00057 long onListChanged(FXObject*,FXSelector,void*); 00058 long onListClicked(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 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); 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 drive 00083 FXbool setDrive(const FXString& drive); 00084 00085 /// Return current drive 00086 FXString getDrive() const; 00087 00088 /// Destructor 00089 virtual ~FXDriveBox(); 00090 }; 00091 00092 } 00093 00094 #endif