#include "BufferView.h"
#include "CoordCache.h"
#include "Cursor.h"
-#include "debug.h"
#include "Dimension.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
-#include "gettext.h"
#include "Text.h"
#include "TextClass.h"
#include "MetricsInfo.h"
#include "frontends/Application.h"
#include "support/convert.h"
-
-#include <boost/current_function.hpp>
+#include "support/debug.h"
+#include "support/gettext.h"
#include <map>
-#include <typeinfo>
+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()
InsetName("newpage", NEWPAGE_CODE),
};
- std::size_t const insetnames_size =
+ size_t const insetnames_size =
sizeof(insetnames) / sizeof(insetnames[0]);
- std::map<std::string, InsetCode> data;
- for (std::size_t i = 0; i != insetnames_size; ++i) {
+ 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();
}
void Inset::edit(Cursor &, bool)
{
- LYXERR(Debug::INSETS, BOOST_CURRENT_FUNCTION << ": edit left/right");
+ LYXERR(Debug::INSETS, "edit left/right");
}
Inset * Inset::editXY(Cursor &, int x, int y)
{
- LYXERR(Debug::INSETS, BOOST_CURRENT_FUNCTION << ": x=" << x << " y= " << y);
+ LYXERR(Debug::INSETS, "x: " << x << " y: " << y);
return this;
}
Inset::idx_type Inset::index(row_type row, col_type col) const
{
if (row != 0)
- lyxerr << BOOST_CURRENT_FUNCTION
- << ": illegal row: " << row << std::endl;
+ LYXERR0("illegal row: " << row);
if (col != 0)
- lyxerr << BOOST_CURRENT_FUNCTION
- << ": illegal col: " << col << std::endl;
+ LYXERR0("illegal col: " << col);
return 0;
}
void Inset::cursorPos(BufferView const & /*bv*/, CursorSlice const &,
bool, int & x, int & y) const
{
- lyxerr << "Inset::cursorPos called directly" << std::endl;
+ LYXERR0("Inset::cursorPos called directly");
x = 100;
y = 100;
}
}
-bool Inset::editing(BufferView * bv) const
+bool Inset::editing(BufferView const * bv) const
{
return bv->cursor().isInside(this);
}
void Inset::setPosCache(PainterInfo const & pi, int x, int y) const
{
- //lyxerr << "Inset:: position cache to " << x << " " << y << std::endl;
+ //LYXERR("Inset: set position cache to " << x << " " << y);
pi.base.bv->coordCache().insets().add(this, x, y);
}