2 * \file math_dotsinset.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 "math_dotsinset.h"
15 #include "math_mathmlstream.h"
16 #include "math_support.h"
17 #include "math_parser.h"
24 InsetMathDots::InsetMathDots(latexkeys const * key)
29 auto_ptr<InsetBase> InsetMathDots::doClone() const
31 return auto_ptr<InsetBase>(new InsetMathDots(*this));
35 void InsetMathDots::metrics(MetricsInfo & mi, Dimension & dim) const
37 mathed_char_dim(mi.base.font, 'M', dim);
39 if (key_->name == "cdots" || key_->name == "dotsb"
40 || key_->name == "dotsm" || key_->name == "dotsi")
42 else if (key_->name == "dotsc")
44 else if (key_->name == "vdots") {
45 dim.wid = (dim.wid / 2) + 1;
48 else if (key_->name == "ddots")
54 void InsetMathDots::draw(PainterInfo & pain, int x, int y) const
56 mathed_draw_deco(pain, x + 2, y - dh_, dim_.width() - 2, dim_.ascent(),
58 if (key_->name == "vdots" || key_->name == "ddots")
60 if (key_->name != "vdots")
62 mathed_draw_deco(pain, x + 2, y - dh_, dim_.width() - 2, dim_.ascent(),
64 setPosCache(pain, x, y);
68 string InsetMathDots::name() const