#include <config.h>
-#include "Lsstream.h"
+#include "formulabase.h"
+#include "support/std_sstream.h"
#include "support/LAssert.h"
#include "formula.h"
#include "formulamacro.h"
-#include "lyxrc.h"
#include "funcrequest.h"
#include "BufferView.h"
#include "lyxtext.h"
#include "gettext.h"
-#include "LaTeXFeatures.h"
#include "debug.h"
#include "math_support.h"
-#include "metricsinfo.h"
-#include "math_data.h"
#include "support/lstrings.h"
#include "support/lyxlib.h"
#include "frontends/LyXView.h"
-#include "frontends/font_metrics.h"
-#include "frontends/mouse_state.h"
#include "math_arrayinset.h"
-#include "math_charinset.h"
#include "math_deliminset.h"
#include "math_cursor.h"
#include "math_factory.h"
-#include "math_fontinset.h"
#include "math_hullinset.h"
-#include "math_iterator.h"
-#include "math_macrotable.h"
#include "math_parser.h"
-#include "math_pos.h"
#include "math_spaceinset.h"
#include "undo_funcs.h"
-#include "textpainter.h"
#include "frontends/Dialogs.h"
-#include "intl.h"
#include "ref_inset.h"
-#include <fstream>
using namespace lyx::support;
InsetFormulaBase::InsetFormulaBase()
- : xo_(0), yo_(0)
+ : view_(0), xo_(0), yo_(0)
{
// This is needed as long the math parser is not re-entrant
initMath();
if (mathcursor) {
if (mathcursor->inMacroMode()) {
mathcursor->macroModeClose();
- bv->updateInset();
+ bv->updateInset(this);
}
releaseMathCursor(bv);
}
generatePreview();
- bv->updateInset();
+ bv->updateInset(this);
}
void InsetFormulaBase::toggleInsetSelection(BufferView * bv)
{
if (mathcursor)
- bv->updateInset();
+ bv->updateInset(this);
}
return UNDISPATCHED;
BufferView * bv = cmd.view();
- bv->updateInset();
+ bv->updateInset(this);
//lyxerr << "lfunMouseRelease: buttons: " << cmd.button() << endl;
if (cmd.button() == mouse_button::button3) {
mathcursor->selClear();
mathcursor->setPos(cmd.x + xo_, cmd.y + yo_);
mathcursor->insert(ar);
- bv->updateInset();
+ bv->updateInset(this);
return DISPATCHED;
}
return DISPATCHED;
}
- bv->updateInset();
+ bv->updateInset(this);
return DISPATCHED;
}
BufferView * bv = cmd.view();
mathcursor->setPos(cmd.x + xo_, cmd.y + yo_);
- bv->updateInset();
+ bv->updateInset(this);
return DISPATCHED;
}
}
// if that is removed, we won't get the magenta box when entering an
// inset for the first time
- bv->updateInset();
+ bv->updateInset(this);
return DISPATCHED;
case LFUN_MOUSE_PRESS:
}
if (result == DISPATCHED)
- bv->updateInset();
+ bv->updateInset(this);
mathcursor->normalize();
mathcursor->touch();
mathcursor->setSelection(it, ar.size());
current = it;
it.jump(ar.size());
- bv->updateInset();
+ bv->updateInset(this);
return true;
}
}
// sel = "";
//else
- string sel = bv->getLyXText()->selectionAsString(bv->buffer(), false);
+ string sel = bv->getLyXText()->selectionAsString(*bv->buffer(), false);
if (sel.empty()) {
InsetFormula * f = new InsetFormula(bv);