3 * \file InsetMathDecoration.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
10 * Full author contact details are available in file CREDITS.
13 #ifndef MATH_DECORATIONINSET_H
14 #define MATH_DECORATIONINSET_H
16 #include "InsetMathNest.h"
23 /// Decorations and accents over (below) a math object
24 class InsetMathDecoration : public InsetMathNest {
27 explicit InsetMathDecoration(Buffer * buf, latexkeys const * key);
29 mode_type currentMode() const override;
31 void draw(PainterInfo &, int x, int y) const override;
33 void write(TeXMathStream & os) const override;
35 void metrics(MetricsInfo & mi, Dimension & dim) const override;
37 void normalize(NormalStream & os) const override;
39 void infoize(odocstream & os) const override;
41 MathClass mathClass() const override;
42 /// The default limits value in \c display style
43 Limits defaultLimits(bool display) const override;
44 /// whether the inset has limit-like sub/superscript
45 Limits limits() const override { return limits_; }
46 /// sets types of sub/superscripts
47 void limits(Limits lim) override { limits_ = lim; }
49 void validate(LaTeXFeatures & features) const override;
51 InsetCode lyxCode() const override { return MATH_DECORATION_CODE; }
53 void mathmlize(MathMLStream &) const override;
55 void htmlize(HtmlStream &) const override;
57 Inset * clone() const override;
62 /// is it a wide decoration?
66 latexkeys const * key_;
68 Limits limits_ = AUTO_LIMITS;
69 // FIXME: this should depend on BufferView
70 /// height cache of deco
72 /// vertical offset cache of deco
74 /// width for non-wide deco