]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathTextsize.h
g-brief loads babel internally. So don't load it ourselves.
[lyx.git] / src / mathed / InsetMathTextsize.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathTextsize.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Enrico Forestieri
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_TEXTSIZEINSET_H
13 #define MATH_TEXTSIZEINSET_H
14
15 #include "InsetMathNest.h"
16
17
18 namespace lyx {
19
20
21 class latexkeys;
22
23 /// text-in-math font size changes
24 class InsetMathTextsize : public InsetMathNest {
25 public:
26         ///
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; }
32         ///
33         void metrics(MetricsInfo & mi, Dimension & dim) const override;
34         ///
35         void draw(PainterInfo & pi, int x, int y) const override;
36         ///
37         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override;
38         ///
39         void drawT(TextPainter & pi, int x, int y) const override;
40         ///
41         void write(TeXMathStream & os) const override;
42         ///
43         void normalize(NormalStream &) const override;
44         ///
45         void infoize(odocstream & os) const override;
46         ///
47         int kerning(BufferView const * bv) const override { return cell(0).kerning(bv); }
48         ///
49         InsetCode lyxCode() const override { return MATH_TEXTSIZE_CODE; }
50
51 private:
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_;
57 };
58
59
60 } // namespace lyx
61 #endif