tahoma2d/toonz/sources/include/tw/stringtable.h

48 lines
907 B
C
Raw Normal View History

2016-05-17 03:04:11 +12:00
#pragma once
2016-03-19 06:57:51 +13:00
#ifndef STRINGTABLE_INCLUDED
#define STRINGTABLE_INCLUDED
#include "tcommon.h"
#undef DVAPI
#undef DVVAR
#ifdef TNZBASE_EXPORTS
#define DVAPI DV_EXPORT_API
#define DVVAR DV_EXPORT_VAR
#else
#define DVAPI DV_IMPORT_API
#define DVVAR DV_IMPORT_VAR
#endif
class TFilePath;
2016-06-15 18:43:10 +12:00
class DVAPI TStringTable {
2016-03-19 06:57:51 +13:00
public:
2016-06-15 18:43:10 +12:00
static const TStringTable *instance();
static std::wstring translate(std::string);
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
class Item {
public:
std::wstring m_name, m_help, m_tip;
Item() : m_name(), m_help(), m_tip(){};
};
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
virtual const Item *getItem(std::string name) const = 0;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
virtual std::pair<std::string, int> getDefaultFontNameAndSize() const = 0;
2016-03-19 06:57:51 +13:00
2016-06-15 18:43:10 +12:00
virtual std::string getDefaultMacFontName() const = 0;
2016-03-19 06:57:51 +13:00
protected:
2016-06-15 18:43:10 +12:00
TStringTable();
virtual ~TStringTable();
2016-03-19 06:57:51 +13:00
private:
2016-06-15 18:43:10 +12:00
// not implemented
TStringTable(const TStringTable &);
TStringTable &operator=(const TStringTable &);
2016-03-19 06:57:51 +13:00
};
#endif