#include "frontends/Painter.h"
+#include <boost/current_function.hpp>
+
#include <map>
+#include <typeinfo>
namespace {
{}
+std::auto_ptr<InsetBase> InsetBase::clone() const
+{
+ std::auto_ptr<InsetBase> b = doClone();
+ BOOST_ASSERT(typeid(*b) == typeid(*this));
+ return b;
+}
+
+
InsetBase::Code InsetBase::translate(std::string const & name)
{
static TranslatorMap const translator = build_translator();
void InsetBase::edit(LCursor &, bool)
{
- lyxerr << "InsetBase: edit left/right" << std::endl;
+ lyxerr[Debug::INSETS] << BOOST_CURRENT_FUNCTION
+ << ": edit left/right" << std::endl;
}
InsetBase * InsetBase::editXY(LCursor &, int x, int y)
{
- lyxerr << "InsetBase: editXY x:" << x << " y: " << y << std::endl;
+ lyxerr[Debug::INSETS] << BOOST_CURRENT_FUNCTION
+ << ": x=" << x << " y= " << y
+ << std::endl;
return this;
}
InsetBase::idx_type InsetBase::index(row_type row, col_type col) const
{
if (row != 0)
- lyxerr << "illegal row: " << row << std::endl;
+ lyxerr << BOOST_CURRENT_FUNCTION
+ << ": illegal row: " << row << std::endl;
if (col != 0)
- lyxerr << "illegal col: " << col << std::endl;
+ lyxerr << BOOST_CURRENT_FUNCTION
+ << ": illegal col: " << col << std::endl;
return 0;
}
}
-void InsetBase::markErased()
+void InsetBase::markErased(bool)
{}
-void InsetBase::getCursorPos(CursorSlice const &, int & x, int & y) const
+void InsetBase::cursorPos(CursorSlice const &, bool, int & x, int & y) const
{
- lyxerr << "InsetBase::getCursorPos called directly" << std::endl;
+ lyxerr << "InsetBase::cursorPos called directly" << std::endl;
x = 100;
y = 100;
}