mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
*** empty log message ***
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8621 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7d4c0027d8
commit
75ba515b18
@ -51,6 +51,7 @@ void CommandInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
void CommandInset::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
button_.draw(pi, x, y);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -85,6 +85,7 @@ void MathAMSArrayInset::draw(PainterInfo & pi, int x, int y) const
|
||||
int const yy = y - dim_.ascent();
|
||||
mathed_draw_deco(pi, x + 1, yy, 5, dim_.height(), name_left());
|
||||
mathed_draw_deco(pi, x + dim_.width() - 6, yy, 5, dim_.height(), name_right());
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -84,6 +84,7 @@ void MathArrayInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
|
||||
void MathArrayInset::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
setPosCache(pi, x, y);
|
||||
ArrayChanger dummy(pi.base);
|
||||
MathGridInset::draw(pi, x + 1, y);
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ void MathBinaryOpInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void MathBinaryOpInset::draw(PainterInfo & pain, int x, int y) const
|
||||
{
|
||||
cell(0).draw(pain, x, y);
|
||||
|
@ -47,10 +47,11 @@ void MathBinomInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
ScriptChanger dummy(mi.base);
|
||||
cell(0).metrics(mi);
|
||||
cell(1).metrics(mi);
|
||||
dim_.asc = cell(0).height() + 4 + 5;
|
||||
dim_.des = cell(1).height() + 4 - 5;
|
||||
dim_.wid = max(cell(0).width(), cell(1).width()) + 2 * dw() + 4;
|
||||
dim = dim_;
|
||||
dim.asc = cell(0).height() + 4 + 5;
|
||||
dim.des = cell(1).height() + 4 - 5;
|
||||
dim.wid = max(cell(0).width(), cell(1).width()) + 2 * dw() + 4;
|
||||
metricsMarkers2(dim);
|
||||
dim_ = dim;
|
||||
}
|
||||
|
||||
|
||||
@ -63,6 +64,7 @@ void MathBinomInset::draw(PainterInfo & pi, int x, int y) const
|
||||
mathed_draw_deco(pi, x, y - dim_.ascent(), dw(), dim_.height(), "(");
|
||||
mathed_draw_deco(pi, x + dim_.width() - dw(), y - dim_.ascent(),
|
||||
dw(), dim_.height(), ")");
|
||||
drawMarkers2(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,11 +44,12 @@ void MathBraceInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
cell(0).metrics(mi);
|
||||
Dimension t;
|
||||
mathed_char_dim(mi.base.font, '{', t);
|
||||
wid_ = t.wid;
|
||||
dim_.asc = max(cell(0).ascent(), t.asc);
|
||||
dim_.des = max(cell(0).descent(), t.des);
|
||||
dim_.wid = cell(0).width() + 2 * wid_;
|
||||
dim = dim_;
|
||||
dim.wid = t.wid;
|
||||
dim.asc = max(cell(0).ascent(), t.asc);
|
||||
dim.des = max(cell(0).descent(), t.des);
|
||||
dim.wid = cell(0).width() + 2 * dim.wid;
|
||||
metricsMarkers(dim);
|
||||
dim_ = dim;
|
||||
}
|
||||
|
||||
|
||||
@ -59,6 +60,7 @@ void MathBraceInset::draw(PainterInfo & pi, int x, int y) const
|
||||
drawChar(pi, font, x, y, '{');
|
||||
cell(0).draw(pi, x + wid_, y);
|
||||
drawChar(pi, font, x + dim_.width() - wid_, y, '}');
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -39,10 +39,11 @@ void MathCasesInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
}
|
||||
|
||||
|
||||
void MathCasesInset::draw(PainterInfo & pain, int x, int y) const
|
||||
void MathCasesInset::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
mathed_draw_deco(pain, x + 1, y - dim_.ascent(), 6, dim_.height(), "{");
|
||||
MathGridInset::draw(pain, x + 8, y);
|
||||
mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 6, dim_.height(), "{");
|
||||
MathGridInset::draw(pi, x + 8, y);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@ public:
|
||||
///
|
||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||
///
|
||||
void draw(PainterInfo & pain, int x, int y) const;
|
||||
void draw(PainterInfo & pi, int x, int y) const;
|
||||
|
||||
///
|
||||
void infoize(std::ostream & os) const;
|
||||
|
@ -68,6 +68,7 @@ void MathColorInset::draw(PainterInfo & pi, int x, int y) const
|
||||
pi.base.font.setColor(lcolor.getFromGUIName(asString(cell(0))));
|
||||
cell(1).draw(pi, x, y);
|
||||
pi.base.font.setColor(origcol);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,6 +51,7 @@ void MathDfracInset::draw(PainterInfo & pi, int x, int y) const
|
||||
cell(0).draw(pi, m - cell(0).width() / 2, y - cell(0).descent() - 2 - 5);
|
||||
cell(1).draw(pi, m - cell(1).width() / 2, y + cell(1).ascent() + 2 - 5);
|
||||
pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, LColor::math);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -63,6 +63,7 @@ void MathFboxInset::draw(PainterInfo & pi, int x, int y) const
|
||||
} else {
|
||||
cell(0).draw(pi, x + 5, y);
|
||||
}
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -52,10 +52,11 @@ void MathFracInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
FracChanger dummy(mi.base);
|
||||
cell(0).metrics(mi);
|
||||
cell(1).metrics(mi);
|
||||
dim_.wid = max(cell(0).width(), cell(1).width()) + 2;
|
||||
dim_.asc = cell(0).height() + 2 + 5;
|
||||
dim_.des = cell(1).height() + 2 - 5;
|
||||
dim = dim_;
|
||||
dim.wid = max(cell(0).width(), cell(1).width()) + 2;
|
||||
dim.asc = cell(0).height() + 2 + 5;
|
||||
dim.des = cell(1).height() + 2 - 5;
|
||||
metricsMarkers(dim);
|
||||
dim_ = dim;
|
||||
}
|
||||
|
||||
|
||||
@ -68,6 +69,7 @@ void MathFracInset::draw(PainterInfo & pi, int x, int y) const
|
||||
cell(1).draw(pi, m - cell(1).width() / 2, y + cell(1).ascent() + 2 - 5);
|
||||
if (!atop_)
|
||||
pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, LColor::math);
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -66,6 +66,7 @@ void MathFrameboxInset::draw(PainterInfo & pi, int x, int y) const
|
||||
x += w_ + 4;
|
||||
|
||||
cell(2).draw(pi, x, y);
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -242,6 +242,7 @@ void MathHullInset::draw(PainterInfo & pi, int x, int y) const
|
||||
drawStr(pi, pi.base.font, xx, yy, nicelabel(row));
|
||||
}
|
||||
}
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -140,6 +140,7 @@ void MathMacro::draw(PainterInfo & pi, int x, int y) const
|
||||
}
|
||||
|
||||
expanded_.draw(pi, x, y);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,6 +62,7 @@ void MathMacroArgument::draw(PainterInfo & pi, int x, int y) const
|
||||
cell(0).draw(pi, x, y);
|
||||
else
|
||||
drawStrRed(pi, x, y, str_);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -101,6 +101,7 @@ void MathMacroTemplate::draw(PainterInfo & pi, int x, int y) const
|
||||
cell(1).draw(pi, x + 8 + w0, y + 1);
|
||||
pi.pain.rectangle(x + w0 + 6 , y - dim_.ascent() + 1, w1 + 4,
|
||||
dim_.height(), LColor::mathline);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,6 +65,7 @@ void MathMakeboxInset::draw(PainterInfo & pi, int x, int y) const
|
||||
x += w_ + 2;
|
||||
|
||||
cell(2).draw(pi, x, y);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,6 +54,7 @@ void MathMBoxInset::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
text_.draw(pi, x + 1, y);
|
||||
drawMarkers(pi, x, y);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -181,14 +181,14 @@ void MathNestInset::dump() const
|
||||
}
|
||||
|
||||
|
||||
//void MathNestInset::draw(PainterInfo & pi, int x, int y) const
|
||||
void MathNestInset::draw(PainterInfo &, int, int) const
|
||||
void MathNestInset::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
#if 0
|
||||
if (lock_)
|
||||
pi.pain.fillRectangle(x, y - ascent(), width(), height(),
|
||||
LColor::mathlockbg);
|
||||
#endif
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -44,6 +44,7 @@ void MathOversetInset::draw(PainterInfo & pi, int x, int y) const
|
||||
cell(1).draw(pi, m - cell(1).width() / 2, y);
|
||||
FracChanger dummy(pi.base);
|
||||
cell(0).draw(pi, m - cell(0).width() / 2, yo);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -184,6 +184,7 @@ void MathTextInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
void MathTextInset::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
cache_.draw(pi, x + 1, y);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,10 +31,11 @@ void MathUndersetInset::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
cell(1).metrics(mi);
|
||||
FracChanger dummy(mi.base);
|
||||
cell(0).metrics(mi);
|
||||
dim_.wid = max(cell(0).width(), cell(1).width()) + 4;
|
||||
dim_.asc = cell(1).ascent();
|
||||
dim_.des = cell(1).descent() + cell(0).height() + 4;
|
||||
dim = dim_;
|
||||
dim.wid = max(cell(0).width(), cell(1).width()) + 4;
|
||||
dim.asc = cell(1).ascent();
|
||||
dim.des = cell(1).descent() + cell(0).height() + 4;
|
||||
metricsMarkers(dim);
|
||||
dim_ = dim;
|
||||
}
|
||||
|
||||
|
||||
@ -45,6 +46,7 @@ void MathUndersetInset::draw(PainterInfo & pi, int x, int y) const
|
||||
cell(1).draw(pi, m - cell(1).width() / 2, y);
|
||||
FracChanger dummy(pi.base);
|
||||
cell(0).draw(pi, m - cell(0).width() / 2, yo);
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user