]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathFont.h
a55c1f77b16ca7910ef503ea18c45e2529d62ee0
[lyx.git] / src / mathed / InsetMathFont.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathFont.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_FONTINSET_H
13 #define MATH_FONTINSET_H
14
15 #include "InsetMathNest.h"
16
17
18 namespace lyx {
19
20
21 class latexkeys;
22
23 /// Inset for font changes
24 class InsetMathFont : public InsetMathNest {
25 public:
26         ///
27         explicit InsetMathFont(latexkeys const * key);
28         ///
29         InsetMathFont * asFontInset() { return this; }
30         ///
31         InsetMathFont const * asFontInset() const { return this; }
32         /// are we in math mode, text mode, or unsure?
33         mode_type currentMode() const;
34         ///
35         docstring name() const;
36         ///
37         void metrics(MetricsInfo & mi, Dimension & dim) const;
38         ///
39         void draw(PainterInfo & pi, int x, int y) const;
40         ///
41         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
42         ///
43         void drawT(TextPainter & pi, int x, int y) const;
44         ///
45         void validate(LaTeXFeatures & features) const;
46         ///
47         void infoize(odocstream & os) const;
48         ///
49         int kerning(BufferView const * bv) const { return cell(0).kerning(bv); }
50
51 private:
52         virtual Inset * clone() const;
53         /// the font to be used on screen
54         latexkeys const * key_;
55 };
56
57
58 } // namespace lyx
59 #endif