#include <map>
+using namespace std;
namespace lyx {
class InsetName {
public:
- InsetName(std::string const & n, InsetCode c) : name(n), code(c) {}
- std::string name;
+ InsetName(string const & n, InsetCode c) : name(n), code(c) {}
+ string name;
InsetCode code;
};
-typedef std::map<std::string, InsetCode> TranslatorMap;
+typedef map<string, InsetCode> TranslatorMap;
static TranslatorMap const build_translator()
size_t const insetnames_size =
sizeof(insetnames) / sizeof(insetnames[0]);
- std::map<std::string, InsetCode> data;
+ map<string, InsetCode> data;
for (size_t i = 0; i != insetnames_size; ++i) {
InsetName const & var = insetnames[i];
data[var.name] = var.code;
}
+docstring Inset::toolTip(BufferView const &, int, int) const
+{
+ return docstring();
+}
+
+
+docstring Inset::contextMenu(BufferView const &, int, int) const
+{
+ return docstring();
+}
+
+
Dimension const Inset::dimension(BufferView const & bv) const
{
return bv.coordCache().getInsets().dim(this);
}
-InsetCode insetCode(std::string const & name)
+InsetCode insetCode(string const & name)
{
static TranslatorMap const translator = build_translator();
}
-std::string insetName(InsetCode c)
+string insetName(InsetCode c)
{
static TranslatorMap const translator = build_translator();
if (it->second == c)
return it->first;
}
- return std::string();
+ return string();
}
}
-bool Inset::editing(BufferView * bv) const
+bool Inset::editing(BufferView const * bv) const
{
return bv->cursor().isInside(this);
}