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

/home/jeroen/FOX/fox/fox-1.7.33/include/FXDriveBox.h
00001 /********************************************************************************
00002 *                                                                               *
00003 *                        D r i v e   B o x   W i d g e t                        *
00004 *                                                                               *
00005 *********************************************************************************
00006 * Copyright (C) 1999,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 FXDRIVEBOX_H
00022 #define FXDRIVEBOX_H
00023 
00024 #ifndef FXLISTBOX_H
00025 #include "FXListBox.h"
00026 #endif
00027 
00028 namespace FX {
00029 
00030 
00031 class FXIcon;
00032 class FXFileDict;
00033 
00035 enum {
00036   DRIVEBOX_NO_OWN_ASSOC = 0x00020000    
00037   };
00038 
00039 
00041 class FXAPI FXDriveBox : public FXListBox {
00042   FXDECLARE(FXDriveBox)
00043 protected:
00044   FXFileDict *associations;     // Association table
00045   FXIcon     *foldericon;       // Folder icons
00046   FXIcon     *cdromicon;        // CDROM icon
00047   FXIcon     *harddiskicon;     // Hard disk icon
00048   FXIcon     *netdriveicon;     // Networked drive icon
00049   FXIcon     *floppyicon;       // Floppy icon
00050   FXIcon     *nethoodicon;      // Network neighborhood icon
00051   FXIcon     *zipdiskicon;      // Zip drive icon
00052 protected:
00053   FXDriveBox(){}
00054   void listDrives();
00055 private:
00056   FXDriveBox(const FXDriveBox&);
00057   FXDriveBox &operator=(const FXDriveBox&);
00058 public:
00059   long onListChanged(FXObject*,FXSelector,void*);
00060   long onListClicked(FXObject*,FXSelector,void*);
00061   long onCmdSetValue(FXObject*,FXSelector,void*);
00062   long onCmdSetStringValue(FXObject*,FXSelector,void*);
00063   long onCmdGetStringValue(FXObject*,FXSelector,void*);
00064 public:
00065 
00067   FXDriveBox(FXComposite *p,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);
00068 
00070   virtual void create();
00071 
00073   virtual void detach();
00074 
00076   virtual void destroy();
00077 
00079   virtual void save(FXStream& store) const;
00080 
00082   virtual void load(FXStream& store);
00083 
00085   FXbool setDrive(const FXString& drive);
00086 
00088   FXString getDrive() const;
00089 
00091   void setAssociations(FXFileDict* assoc);
00092 
00094   FXFileDict* getAssociations() const { return associations; }
00095 
00097   virtual ~FXDriveBox();
00098   };
00099 
00100 }
00101 
00102 #endif

Copyright © 1997-2011 Jeroen van der Zijp