]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathFontOld.h
Coding style
[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(latexkeys const * key);
28         /// we are in text mode.
29         mode_type currentMode() const { return TEXT_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 private:
50         virtual Inset * clone() const;
51         /// the font to be used on screen
52         latexkeys const * key_;
53 };
54
55
56 } // namespace lyx
57 #endif