3 * \file InsetMathTextsize.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Enrico Forestieri
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_TEXTSIZEINSET_H
13 #define MATH_TEXTSIZEINSET_H
15 #include "InsetMathNest.h"
23 /// text-in-math font size changes
24 class InsetMathTextsize : public InsetMathNest {
27 explicit InsetMathTextsize(Buffer * buf, latexkeys const * key);
28 /// we inherit the mode
29 mode_type currentMode() const override { return current_mode_; }
30 /// we write extra braces in any case...
31 bool extraBraces() const override { return true; }
33 void metrics(MetricsInfo & mi, Dimension & dim) const override;
35 void draw(PainterInfo & pi, int x, int y) const override;
37 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override;
39 void drawT(TextPainter & pi, int x, int y) const override;
41 void write(TeXMathStream & os) const override;
43 void normalize(NormalStream &) const override;
45 void infoize(odocstream & os) const override;
47 int kerning(BufferView const * bv) const override { return cell(0).kerning(bv); }
49 InsetCode lyxCode() const override { return MATH_TEXTSIZE_CODE; }
52 Inset * clone() const override;
53 /// the text-in-math font size to be used on screen
54 latexkeys const * key_;
55 /// the inherited mode
56 mutable mode_type current_mode_;