00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef FX_DISABLEFILEDIRDIALOGS
00025
00026 #ifndef FXDRIVEBOX_H
00027 #define FXDRIVEBOX_H
00028
00029 #ifndef FXLISTBOX_H
00030 #include "FXListBox.h"
00031 #endif
00032
00033 namespace FX {
00034
00035
00036 class FXIcon;
00037 class FXFileDict;
00038
00040 enum {
00041 DRIVEBOX_NO_OWN_ASSOC = 0x00020000
00042 };
00043
00044
00046 class FXAPI FXDriveBox : public FXListBox {
00047 FXDECLARE(FXDriveBox)
00048 protected:
00049 FXFileDict *associations;
00050 FXIcon *foldericon;
00051 FXIcon *cdromicon;
00052 FXIcon *harddiskicon;
00053 FXIcon *netdriveicon;
00054 FXIcon *floppyicon;
00055 FXIcon *nethoodicon;
00056 FXIcon *zipdiskicon;
00057 protected:
00058 FXDriveBox(){}
00059 void listDrives();
00060 private:
00061 FXDriveBox(const FXDriveBox&);
00062 FXDriveBox &operator=(const FXDriveBox&);
00063 public:
00064 long onListChanged(FXObject*,FXSelector,void*);
00065 long onListClicked(FXObject*,FXSelector,void*);
00066 long onCmdSetValue(FXObject*,FXSelector,void*);
00067 long onCmdSetStringValue(FXObject*,FXSelector,void*);
00068 long onCmdGetStringValue(FXObject*,FXSelector,void*);
00069 public:
00070
00072 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);
00073
00075 virtual void create();
00076
00078 virtual void detach();
00079
00081 virtual void destroy();
00082
00084 virtual void save(FXStream& store) const;
00085
00087 virtual void load(FXStream& store);
00088
00090 FXbool setDrive(const FXString& drive);
00091
00093 FXString getDrive() const;
00094
00096 void setAssociations(FXFileDict* assoc);
00097
00099 FXFileDict* getAssociations() const { return associations; }
00100
00102 virtual ~FXDriveBox();
00103 };
00104
00105 }
00106
00107 #endif
00108 #endif