mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Remove remnant of the past.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20481 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4b649e746a
commit
fb6af9a08a
@ -74,12 +74,15 @@ void InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const
|
|||||||
dim.wid = 10;
|
dim.wid = 10;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// Cache the inset dimension.
|
||||||
|
setDimCache(mi, dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetSpace::draw(PainterInfo & pi, int x, int y) const
|
void InsetSpace::draw(PainterInfo & pi, int x, int y) const
|
||||||
{
|
{
|
||||||
int const w = dim_.wid;
|
Dimension const dim = dimension(*pi.base.bv);
|
||||||
|
int const w = dim.wid;
|
||||||
int const h = theFontMetrics(pi.base.font)
|
int const h = theFontMetrics(pi.base.font)
|
||||||
.ascent('x');
|
.ascent('x');
|
||||||
int xp[4], yp[4];
|
int xp[4], yp[4];
|
||||||
|
@ -58,8 +58,6 @@ public:
|
|||||||
///
|
///
|
||||||
void metrics(MetricsInfo &, Dimension &) const;
|
void metrics(MetricsInfo &, Dimension &) const;
|
||||||
///
|
///
|
||||||
Dimension const dimension(BufferView const &) const { return dim_; };
|
|
||||||
///
|
|
||||||
void draw(PainterInfo & pi, int x, int y) const;
|
void draw(PainterInfo & pi, int x, int y) const;
|
||||||
///
|
///
|
||||||
void write(Buffer const &, std::ostream &) const;
|
void write(Buffer const &, std::ostream &) const;
|
||||||
@ -94,8 +92,6 @@ private:
|
|||||||
|
|
||||||
/// And which kind is this?
|
/// And which kind is this?
|
||||||
Kind kind_;
|
Kind kind_;
|
||||||
///
|
|
||||||
mutable Dimension dim_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -138,16 +138,17 @@ void InsetVSpace::metrics(MetricsInfo & mi, Dimension & dim) const
|
|||||||
dim.asc = height / 2 + (a - d) / 2; // align cursor with the
|
dim.asc = height / 2 + (a - d) / 2; // align cursor with the
|
||||||
dim.des = height - dim.asc; // label text
|
dim.des = height - dim.asc; // label text
|
||||||
dim.wid = ADD_TO_VSPACE_WIDTH + 2 * arrow_size + 5 + w;
|
dim.wid = ADD_TO_VSPACE_WIDTH + 2 * arrow_size + 5 + w;
|
||||||
dim_ = dim;
|
// Cache the inset dimension.
|
||||||
|
setDimCache(mi, dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
|
void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
|
||||||
{
|
{
|
||||||
|
Dimension const dim = dimension(*pi.base.bv);
|
||||||
x += ADD_TO_VSPACE_WIDTH;
|
x += ADD_TO_VSPACE_WIDTH;
|
||||||
|
int const start = y - dim.asc;
|
||||||
int const start = y - dim_.asc;
|
int const end = y + dim.des;
|
||||||
int const end = y + dim_.des;
|
|
||||||
|
|
||||||
// y-values for top arrow
|
// y-values for top arrow
|
||||||
int ty1, ty2;
|
int ty1, ty2;
|
||||||
|
@ -31,8 +31,6 @@ public:
|
|||||||
///
|
///
|
||||||
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
void metrics(MetricsInfo & mi, Dimension & dim) const;
|
||||||
///
|
///
|
||||||
Dimension const dimension(BufferView const &) const { return dim_; };
|
|
||||||
///
|
|
||||||
void draw(PainterInfo & pi, int x, int y) const;
|
void draw(PainterInfo & pi, int x, int y) const;
|
||||||
///
|
///
|
||||||
int latex(Buffer const &, odocstream &,
|
int latex(Buffer const &, odocstream &,
|
||||||
@ -63,8 +61,6 @@ private:
|
|||||||
|
|
||||||
///
|
///
|
||||||
VSpace space_;
|
VSpace space_;
|
||||||
///
|
|
||||||
mutable Dimension dim_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -67,19 +67,21 @@ void InsetMathBig::metrics(MetricsInfo & mi, Dimension & dim) const
|
|||||||
dim.wid = 6;
|
dim.wid = 6;
|
||||||
dim.asc = int(h + f * h);
|
dim.asc = int(h + f * h);
|
||||||
dim.des = int(f * h);
|
dim.des = int(f * h);
|
||||||
dim_ = dim;
|
// Cache the inset dimension.
|
||||||
|
setDimCache(mi, dim);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void InsetMathBig::draw(PainterInfo & pi, int x, int y) const
|
void InsetMathBig::draw(PainterInfo & pi, int x, int y) const
|
||||||
{
|
{
|
||||||
|
Dimension const dim = dimension(*pi.base.bv);
|
||||||
// mathed_draw_deco does not use the leading backslash, so remove it
|
// mathed_draw_deco does not use the leading backslash, so remove it
|
||||||
// (but don't use ltrim if this is the backslash delimiter).
|
// (but don't use ltrim if this is the backslash delimiter).
|
||||||
// Replace \| by \Vert (equivalent in LaTeX), since mathed_draw_deco
|
// Replace \| by \Vert (equivalent in LaTeX), since mathed_draw_deco
|
||||||
// would treat it as |.
|
// would treat it as |.
|
||||||
docstring const delim = (delim_ == "\\|") ? from_ascii("Vert") :
|
docstring const delim = (delim_ == "\\|") ? from_ascii("Vert") :
|
||||||
(delim_ == "\\\\") ? from_ascii("\\") : support::ltrim(delim_, "\\");
|
(delim_ == "\\\\") ? from_ascii("\\") : support::ltrim(delim_, "\\");
|
||||||
mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 4, dim_.height(),
|
mathed_draw_deco(pi, x + 1, y - dim.ascent(), 4, dim.height(),
|
||||||
delim);
|
delim);
|
||||||
setPosCache(pi, x, y);
|
setPosCache(pi, x, y);
|
||||||
}
|
}
|
||||||
|
@ -50,8 +50,6 @@ private:
|
|||||||
docstring const name_;
|
docstring const name_;
|
||||||
/// ( or [ or \\Vert...
|
/// ( or [ or \\Vert...
|
||||||
docstring const delim_;
|
docstring const delim_;
|
||||||
///
|
|
||||||
mutable Dimension dim_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -55,8 +55,6 @@ private:
|
|||||||
char_type char_;
|
char_type char_;
|
||||||
/// cached kerning for superscript
|
/// cached kerning for superscript
|
||||||
mutable int kerning_;
|
mutable int kerning_;
|
||||||
/// FIXME: move this out to BufferView
|
|
||||||
mutable Dimension dim_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
Loading…
Reference in New Issue
Block a user