#include <config.h>
+#include "InsetMathSideset.h"
+
+#include "InsetMathSymbol.h"
+#include "MathData.h"
+#include "MathStream.h"
+#include "MathSupport.h"
+
#include "BufferView.h"
#include "Cursor.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
-#include "InsetMathSideset.h"
-#include "InsetMathSymbol.h"
#include "LaTeXFeatures.h"
-#include "MathData.h"
-#include "MathStream.h"
-#include "MathSupport.h"
+#include "MetricsInfo.h"
#include "support/debug.h"
-
#include "support/lassert.h"
namespace {
/// x spacing between the nucleus and the scripts
int const dx = 2;
-}
+} // namespace
namespace lyx {
}
-bool InsetMathSideset::idxFirst(Cursor & cur) const
-{
- cur.idx() = 0;
- cur.pos() = 0;
- return true;
-}
-
-
-bool InsetMathSideset::idxLast(Cursor & cur) const
-{
- cur.idx() = 0;
- cur.pos() = nuc().size();
- return true;
-}
-
-
int InsetMathSideset::dybt(BufferView const & bv, int asc, int des, bool top) const
{
bool isCharBox = nuc().empty() ? false : isAlphaSymbol(nuc().back());
void InsetMathSideset::metrics(MetricsInfo & mi, Dimension & dim) const
{
+ Changer dummy2 = mi.base.changeEnsureMath();
Dimension dimn;
Dimension dimbl;
Dimension dimtl;
int nd = ndes(bv);
int des = dyb(bv) + max(dimbl.descent(), dimbr.descent());
dim.des = max(nd, des);
- metricsMarkers(dim);
}
void InsetMathSideset::draw(PainterInfo & pi, int x, int y) const
{
+ Changer dummy2 = pi.base.changeEnsureMath();
BufferView & bv = *pi.base.bv;
nuc().draw(pi, x + dxn(bv), y);
if (!scriptl_)
br().draw(pi, x + dxr(bv), y + dyb(bv));
tr().draw(pi, x + dxr(bv), y - dyt(bv));
}
- drawMarkers(pi, x, y);
}