]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathDecoration.h
Merge branch 'master' of git.lyx.org:lyx
[lyx.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         mode_type currentMode() const;
30         ///
31         void draw(PainterInfo &, int x, int y) const;
32         ///
33         void write(WriteStream & os) const;
34         ///
35         void metrics(MetricsInfo & mi, Dimension & dim) const;
36         ///
37         void normalize(NormalStream & os) const;
38         ///
39         void infoize(odocstream & os) const;
40         ///
41         bool isScriptable() const;
42         ///
43         void validate(LaTeXFeatures & features) const;
44         ///
45         InsetCode lyxCode() const { return MATH_DECORATION_CODE; }
46         ///
47         void mathmlize(MathStream &) const;
48         ///
49         void htmlize(HtmlStream &) const;
50 private:
51         virtual Inset * clone() const;
52         ///
53         bool upper() const;
54         ///
55         bool protect() const;
56         /// is it a wide decoration?
57         bool wide() const;
58
59         ///
60         latexkeys const * key_;
61         /// height cache of deco
62         mutable int dh_;
63         /// vertical offset cache of deco
64         mutable int dy_;
65         /// width for non-wide deco
66         mutable int dw_;
67 };
68
69 } // namespace lyx
70
71 #endif