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 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 class FXFileDict;
00036
00037
00038 enum {
00039 DRIVEBOX_NO_OWN_ASSOC = 0x00020000
00040 };
00041
00042
00043
00044 class FXAPI FXDriveBox : public FXListBox {
00045 FXDECLARE(FXDriveBox)
00046 protected:
00047 FXFileDict *associations;
00048 FXIcon *foldericon;
00049 FXIcon *cdromicon;
00050 FXIcon *harddiskicon;
00051 FXIcon *netdriveicon;
00052 FXIcon *floppyicon;
00053 FXIcon *nethoodicon;
00054 FXIcon *zipdiskicon;
00055 protected:
00056 FXDriveBox(){}
00057 void listDrives();
00058 private:
00059 FXDriveBox(const FXDriveBox&);
00060 FXDriveBox &operator=(const FXDriveBox&);
00061 public:
00062 long onListChanged(FXObject*,FXSelector,void*);
00063 long onListClicked(FXObject*,FXSelector,void*);
00064 long onCmdSetValue(FXObject*,FXSelector,void*);
00065 long onCmdSetStringValue(FXObject*,FXSelector,void*);
00066 long onCmdGetStringValue(FXObject*,FXSelector,void*);
00067 public:
00068
00069
00070 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);
00071
00072
00073 virtual void create();
00074
00075
00076 virtual void detach();
00077
00078
00079 virtual void destroy();
00080
00081
00082 virtual void save(FXStream& store) const;
00083
00084
00085 virtual void load(FXStream& store);
00086
00087
00088 FXbool setDrive(const FXString& drive);
00089
00090
00091 FXString getDrive() const;
00092
00093
00094 void setAssociations(FXFileDict* assoc);
00095
00096
00097 FXFileDict* getAssociations() const { return associations; }
00098
00099
00100 virtual ~FXDriveBox();
00101 };
00102
00103 }
00104
00105 #endif