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 FXICONDICT_H
00025 #define FXICONDICT_H
00026
00027 #ifndef FXDICT_H
00028 #include "FXDict.h"
00029 #endif
00030
00031 namespace FX {
00032
00033
00034 class FXIconSource;
00035
00036
00050 class FXAPI FXIconDict : public FXDict {
00051 FXDECLARE(FXIconDict)
00052 private:
00053 FXIconSource *source;
00054 FXString path;
00055 protected:
00056 FXIconDict():source(NULL){}
00057 virtual void *createData(const void*);
00058 virtual void deleteData(void*);
00059 private:
00060 FXIconDict(const FXIconDict&);
00061 FXIconDict &operator=(const FXIconDict&);
00062 public:
00063
00065 static const FXchar defaultIconPath[];
00066
00067 public:
00068
00073 FXIconDict(FXApp* app,const FXString& p=defaultIconPath);
00074
00076 void setIconSource(FXIconSource *src){ source=src; }
00077
00079 FXIconSource* getIconSource() const { return source; }
00080
00082 void setIconPath(const FXString& p){ path=p; }
00083
00085 const FXString& getIconPath() const { return path; }
00086
00088 FXIcon* insert(const FXchar* name){ return (FXIcon*)FXDict::insert(name,name); }
00089
00091 FXIcon* remove(const FXchar* name){ return (FXIcon*)FXDict::remove(name); }
00092
00094 FXIcon* find(const FXchar* name){ return (FXIcon*)FXDict::find(name); }
00095
00097 virtual void save(FXStream& store) const;
00098
00100 virtual void load(FXStream& store);
00101
00103 virtual ~FXIconDict();
00104 };
00105
00106
00107 }
00108
00109 #endif