00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __UT_IconManager__
00021 #define __UT_IconManager__
00022
00023 #include "UT_API.h"
00024 class UT_PathSearch;
00025
00026 #define UT_ICON_MAXSIZE 64
00027
00028 enum
00029 UT_IconType
00030 {
00031 UT_ICON_SGI,
00032 UT_ICON_IMG,
00033 UT_ICON_SVG
00034 };
00035
00036 class UT_API UT_IconManager
00037 {
00038 public:
00039 UT_IconManager();
00040 ~UT_IconManager();
00041
00042
00043
00044
00045
00046
00047 bool getFirstIconFile(const char *iconroot,
00048 UT_String &iconpath,
00049 UT_IconType *type = NULL);
00050
00051
00052 bool getFirstImageFile(const char *imageroot,
00053 UT_String &imagepath);
00054
00055
00056 bool getFirstSVGFile(const char *svgroot,
00057 UT_String &svgpath);
00058
00059
00060
00061 static const char **getValidExts();
00062
00063
00064
00065 static bool hasValidExt(const UT_String &filename);
00066
00067 private:
00068 bool getFirstFile(const char *iconroot, UT_String &iconpath,
00069 UT_IconType *type, bool doimages, bool doicons,
00070 bool dosvg);
00071
00072 const UT_PathSearch *myIconPaths;
00073
00074 static const char *theValidExts[];
00075 static const UT_IconType theExtTypes[];
00076 };
00077
00078 UT_API UT_IconManager *UTgetIconManager();
00079
00080 #endif
00081