A bit more re-organization.
[lyx.git] / src / mathed / InsetMathFontOld.h
blobc27bfa6658b7a39b9c13407324f9454f46df7de5
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.
7 * \author André Pönitz
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_FONTOLDINSET_H
13 #define MATH_FONTOLDINSET_H
15 #include "InsetMathNest.h"
18 namespace lyx {
21 class latexkeys;
23 /// Old-style font changes
24 class InsetMathFontOld : public InsetMathNest {
25 public:
26 ///
27 explicit InsetMathFontOld(Buffer * buf, 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 InsetCode lyxCode() const { return MATH_FONTOLD_CODE; }
51 private:
52 virtual Inset * clone() const;
53 /// the font to be used on screen
54 latexkeys const * key_;
58 } // namespace lyx
59 #endif