}
-bool MathScriptInset::covers(int x, int y) const
-{
- for (idx_type i = 0; i < 2; ++i)
- if (has(i) && xcell(i).covers(x, y))
- return true;
- return false;
-}
-
-
int MathScriptInset::dy0(MathInset const * nuc) const
{
int nd = ndes(nuc);
int MathScriptInset::dx0(MathInset const * nuc) const
{
lyx::Assert(hasDown());
- return hasLimits(nuc) ? (width(nuc) - down().width()) / 2 : nwid(nuc);
+ return hasLimits(nuc) ? (width2(nuc) - down().width()) / 2 : nwid(nuc);
}
int MathScriptInset::dx1(MathInset const * nuc) const
{
lyx::Assert(hasUp());
- return hasLimits(nuc) ? (width(nuc) - up().width()) / 2 : nwid(nuc);
+ return hasLimits(nuc) ? (width2(nuc) - up().width()) / 2 : nwid(nuc);
}
int MathScriptInset::dxx(MathInset const * nuc) const
{
//lyx::Assert(nuc());
- return hasLimits(nuc) ? (width(nuc) - nwid(nuc)) / 2 : 0;
+ return hasLimits(nuc) ? (width2(nuc) - nwid(nuc)) / 2 : 0;
}
-int MathScriptInset::ascent(MathInset const * nuc) const
+int MathScriptInset::ascent2(MathInset const * nuc) const
{
return dy1(nuc) + (hasUp() ? up().ascent() : 0);
}
-int MathScriptInset::descent(MathInset const * nuc) const
+int MathScriptInset::descent2(MathInset const * nuc) const
{
return dy0(nuc) + (hasDown() ? down().descent() : 0);
}
-int MathScriptInset::width(MathInset const * nuc) const
+int MathScriptInset::width2(MathInset const * nuc) const
{
int wid = 0;
if (hasLimits(nuc)) {
MathNestInset::metrics(mi);
if (nuc)
nuc->metrics(mi);
-
- ascent_ = ascent(nuc);
- descent_ = descent(nuc);
- width_ = width(nuc);
+ ascent_ = ascent2(nuc);
+ descent_ = descent2(nuc);
+ width_ = width2(nuc);
}
}
-bool MathScriptInset::idxFirstUp(idx_type & idx, pos_type & pos) const
-{
- if (!hasUp())
- return false;
- idx = 1;
- pos = 0;
- return true;
-}
-
-
-bool MathScriptInset::idxFirstDown(idx_type & idx, pos_type & pos) const
-{
- if (!hasDown())
- return false;
- idx = 0;
- pos = 0;
- return true;
-}
-
-
-bool MathScriptInset::idxLastUp(idx_type & idx, pos_type & pos) const
-{
- if (!hasUp())
- return false;
- idx = 1;
- pos = up().data_.size();
- return true;
-}
-
-
-bool MathScriptInset::idxLastDown(idx_type & idx, pos_type & pos) const
-{
- if (!hasDown())
- return false;
- idx = 0;
- pos = down().data_.size();
- return true;
-}
-
-
void MathScriptInset::write(WriteStream & os) const
{
//lyxerr << "unexpected call to MathScriptInset::write()\n";
os << "\\limits ";
}
} else
- if (os.firstitem)
+ if (os.firstitem())
lyxerr << "suppressing {} \n";
else
os << "{}";