1 #pragma once 2 3 #ifndef STRINGTABLE_INCLUDED 4 #define STRINGTABLE_INCLUDED 5 6 #include "tcommon.h" 7 8 #undef DVAPI 9 #undef DVVAR 10 #ifdef TNZBASE_EXPORTS 11 #define DVAPI DV_EXPORT_API 12 #define DVVAR DV_EXPORT_VAR 13 #else 14 #define DVAPI DV_IMPORT_API 15 #define DVVAR DV_IMPORT_VAR 16 #endif 17 18 class TFilePath; 19 20 class DVAPI TStringTable { 21 public: 22 static const TStringTable *instance(); 23 static std::wstring translate(std::string); 24 25 class Item { 26 public: 27 std::wstring m_name, m_help, m_tip; Item()28 Item() : m_name(), m_help(), m_tip(){}; 29 }; 30 31 virtual const Item *getItem(std::string name) const = 0; 32 33 virtual std::pair<std::string, int> getDefaultFontNameAndSize() const = 0; 34 35 virtual std::string getDefaultMacFontName() const = 0; 36 37 protected: 38 TStringTable(); 39 virtual ~TStringTable(); 40 41 private: 42 // not implemented 43 TStringTable(const TStringTable &); 44 TStringTable &operator=(const TStringTable &); 45 }; 46 47 #endif 48