]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathFontOld.h
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / src / mathed / InsetMathFontOld.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathFontOld.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_FONTOLDINSET_H
13 #define MATH_FONTOLDINSET_H
14
15 #include "InsetMathNest.h"
16
17
18 namespace lyx {
19
20
21 class latexkeys;
22
23 /// Old-style font changes
24 class InsetMathFontOld : public InsetMathNest {
25 public:
26         ///
27         explicit InsetMathFontOld(Buffer * buf, latexkeys const * key);
28         /// we inherit the mode
29         mode_type currentMode() const { return current_mode_; }
30         /// we write extra braces in any case...
31         bool extraBraces() const { return true; }
32         ///
33         void metrics(MetricsInfo & mi, Dimension & dim) const;
34         ///
35         void draw(PainterInfo & pi, int x, int y) const;
36         ///
37         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
38         ///
39         void drawT(TextPainter & pi, int x, int y) const;
40         ///
41         void write(WriteStream & os) const;
42         ///
43         void normalize(NormalStream &) const;
44         ///
45         void infoize(odocstream & os) const;
46         ///
47         int kerning(BufferView const * bv) const { return cell(0).kerning(bv); }
48         ///
49         InsetCode lyxCode() const { return MATH_FONTOLD_CODE; }
50
51 private:
52         virtual Inset * clone() const;
53         /// the font 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