using std::ostream;
using std::max;
+using std::auto_ptr;
InsetSpace::InsetSpace()
}
-void InsetSpace::dimension(BufferView *, LyXFont const & font,
- Dimension & dim) const
+void InsetSpace::metrics(MetricsInfo & mi, Dimension & dim) const
{
+ LyXFont & font = mi.base.font;
dim.asc = font_metrics::maxAscent(font);
dim.des = font_metrics::maxDescent(font);
dim.wid = 10;
break;
}
+ dim_ = dim;
}
void InsetSpace::draw(PainterInfo & pi, int x, int y) const
{
- int const w = width(pi.base.bv, pi.base.font);
+ int const w = width();
int const h = font_metrics::ascent('x', pi.base.font);
int xp[4], yp[4];
int InsetSpace::linuxdoc(Buffer const *, ostream & os) const
{
switch (kind_) {
- // fixme: correct?
case NORMAL:
case QUAD:
case QQUAD:
int InsetSpace::docbook(Buffer const *, ostream & os, bool) const
{
switch (kind_) {
- // fixme: correct?
case NORMAL:
case QUAD:
case QQUAD:
}
-Inset * InsetSpace::clone(Buffer const &) const
+auto_ptr<InsetBase> InsetSpace::clone() const
{
- return new InsetSpace(kind_);
+ return auto_ptr<InsetBase>(new InsetSpace(kind_));
}
-// Inset * InsetSpace::clone(Buffer const &, bool) const
-// {
-// return new InsetSpace(kind_);
-// }
-
-
bool InsetSpace::isChar() const
{
return true;