00001
00056 #ifndef INC_MI32_TEXTRES_H
00057 #define INC_MI32_TEXTRES_H
00058
00059 #ifndef INC_MI32_STDDEFNS_H
00060 #include <mi32/stddefns.h>
00061 #endif
00062
00063 #ifndef GENERATING_DOXYGEN_OUTPUT
00064 class MISTRING;
00065 class FILEPATH;
00066 struct CHECKEXE;
00067 #ifndef NODLLLINKAGE
00068 class XMLNODE;
00069 #endif
00070 #endif // GENERATING_DOXYGEN_OUTPUT
00071
00072 #ifdef MISYSTEMDLL
00073 #define CLASSLIBEXPORT MI_DLLCLASSEXPORT
00074 #else
00075 #define CLASSLIBEXPORT MI_DLLCLASSIMPORT
00076 #endif
00077
00078
00080 enum TEXTRES_NAMESET {
00081 TEXTRES_NAMESET_General = 0,
00082 TEXTRES_NAMESET_Label = 1,
00083 TEXTRES_NAMESET_Title = 2,
00084 TEXTRES_NAMESET_Help = 3,
00085 TEXTRES_NAMESET_COUNT,
00086 TEXTRES_NAMESET_NoLookup = TEXTRES_NAMESET_COUNT
00087 };
00088
00089
00091 class CLASSLIBEXPORT TEXTRES {
00092 public:
00093
00094 #ifndef NODLLLINKAGE
00096 // Not supported in static library.
00097 static ERRVALUE AddFile (
00098 const FILEPATH& filepath
00099 );
00100 #endif
00101
00106 static MISTRING GetString (
00107 int num
00108 );
00109
00112 static MISTRING GetString (
00113 const char *name,
00114 TEXTRES_NAMESET nameset = TEXTRES_NAMESET_General
00115 );
00116
00119 static MISTRING GetString (
00120 const char *name,
00121 TEXTRES_NAMESET nameset,
00122 bool UseNameIfNotFound
00123 );
00124
00127 static bool HasEntry (
00128 const char *name,
00129 TEXTRES_NAMESET nameset = TEXTRES_NAMESET_General
00130 );
00131
00132 #ifdef MISYSTEMDLL
00137 static bool Initialize (
00138 );
00139 #endif
00140
00145 static bool Initialize (
00146 bool AllowReplace = false
00147 );
00148
00150 static ERRVALUE LoadX (
00151 void (*PutResFunc)(void*,const char*),
00152 void *PutResData
00153 );
00154
00157 static void Terminate (
00158 );
00159
00160 #ifndef NODLLLINKAGE
00162 // Not supported in static library.
00163 static ERRVALUE ValidateFile (
00164 const FILEPATH& filepath
00165 );
00166 #endif
00167
00168 #ifndef GENERATING_DOXYGEN_OUTPUT
00169 static const CHECKEXE& GetChk ();
00170 #endif
00171
00172 };
00173
00174
00175 #undef CLASSLIBEXPORT
00176
00177 #endif // INC_MI32_TEXTRES_H