]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathBoldSymbol.h
Give inset codes to all the math insets, so we get more information when
[lyx.git] / src / mathed / InsetMathBoldSymbol.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathBoldSymbol.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_BOLDSYMBOLINSET_H
13 #define MATH_BOLDSYMBOLINSET_H
14
15 #include "InsetMathNest.h"
16
17
18 namespace lyx {
19
20
21 /// Inset for AMSTeX's \boldsymbol
22 class InsetMathBoldSymbol : public InsetMathNest {
23 public:
24         enum Kind {
25                 AMS_BOLD,
26                 BM_BOLD,
27                 BM_HEAVY
28         };
29         ///
30         InsetMathBoldSymbol(Kind kind = AMS_BOLD);
31         ///
32         docstring name() const;
33         ///
34         void metrics(MetricsInfo & mi, Dimension & dim) const;
35         ///
36         void draw(PainterInfo & pi, int x, int y) const;
37         ///
38         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
39         ///
40         void drawT(TextPainter & pi, int x, int y) const;
41         ///
42         void validate(LaTeXFeatures & features) const;
43         ///
44         void write(WriteStream & os) const;
45         ///
46         void infoize(odocstream & os) const;
47         ///
48         InsetCode lyxCode() const { return MATH_BOLDSYMBOL_CODE; }
49         ///
50         Kind kind_;
51 private:
52         virtual Inset * clone() const;
53 };
54
55
56 } // namespace lyx
57
58 #endif