]> git.lyx.org Git - features.git/blob - src/mathed/InsetMathDecoration.h
22c9f9bed35379aa4671860ae7cc195e90fe8cfe
[features.git] / src / mathed / InsetMathDecoration.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathDecoration.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author André Pönitz
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef MATH_DECORATIONINSET_H
14 #define MATH_DECORATIONINSET_H
15
16 #include "InsetMathNest.h"
17
18
19 namespace lyx {
20
21 class latexkeys;
22
23 /// Decorations and accents over (below) a math object
24 class InsetMathDecoration : public InsetMathNest {
25 public:
26         ///
27         explicit InsetMathDecoration(Buffer * buf, latexkeys const * key);
28         ///
29         void draw(PainterInfo &, int x, int y) const;
30         ///
31         void write(WriteStream & os) const;
32         ///
33         void metrics(MetricsInfo & mi, Dimension & dim) const;
34         ///
35         void normalize(NormalStream & os) const;
36         ///
37         void infoize(odocstream & os) const;
38         ///
39         bool isScriptable() const;
40         ///
41         void validate(LaTeXFeatures & features) const;
42         ///
43         InsetCode lyxCode() const { return MATH_DECORATION_CODE; }
44         ///
45         void mathmlize(MathStream &) const;
46
47 private:
48         virtual Inset * clone() const;
49         ///
50         bool upper() const;
51         ///
52         bool protect() const;
53         /// is it a wide decoration?
54         bool wide() const;
55
56         ///
57         latexkeys const * key_;
58         /// height cache of deco
59         mutable int dh_;
60         /// vertical offset cache of deco
61         mutable int dy_;
62         /// width for non-wide deco
63         mutable int dw_;
64 };
65
66 } // namespace lyx
67
68 #endif