2 * \file InsetMathDots.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alejandro Aguilar Sierra
9 * Full author contact details are available in file CREDITS.
14 #include "InsetMathDots.h"
15 #include "MathStream.h"
16 #include "MathSupport.h"
17 #include "MathParser.h"
27 InsetMathDots::InsetMathDots(latexkeys const * key)
32 auto_ptr<InsetBase> InsetMathDots::doClone() const
34 return auto_ptr<InsetBase>(new InsetMathDots(*this));
38 void InsetMathDots::metrics(MetricsInfo & mi, Dimension & dim) const
40 mathed_char_dim(mi.base.font, 'M', dim);
42 if (key_->name == "cdots" || key_->name == "dotsb"
43 || key_->name == "dotsm" || key_->name == "dotsi")
45 else if (key_->name == "dotsc")
47 else if (key_->name == "vdots") {
48 dim.wid = (dim.wid / 2) + 1;
51 else if (key_->name == "ddots")
57 void InsetMathDots::draw(PainterInfo & pain, int x, int y) const
59 mathed_draw_deco(pain, x + 2, y - dh_, dim_.width() - 2, dim_.ascent(),
61 if (key_->name == "vdots" || key_->name == "ddots")
63 if (key_->name != "vdots")
65 mathed_draw_deco(pain, x + 2, y - dh_, dim_.width() - 2, dim_.ascent(),
67 setPosCache(pain, x, y);
71 docstring InsetMathDots::name() const