]> git.lyx.org Git - lyx.git/blob - src/mathed/math_decorationinset.h
fixes for \xxalignat and old style font changes
[lyx.git] / src / mathed / math_decorationinset.h
1 // -*- C++ -*-
2 #ifndef MATH_DECORATIONINSET_H
3 #define MATH_DECORATIONINSET_H
4
5 #include "math_nestinset.h"
6 #include "LString.h"
7
8 #ifdef __GNUG__
9 #pragma interface
10 #endif
11
12 /** Decorations and accents over (below) a math object
13     \author Alejandro Aguilar Sierra
14  */
15
16 class latexkeys;
17
18 class MathDecorationInset : public MathNestInset {
19 public:
20         ///
21         explicit MathDecorationInset(latexkeys const * key);
22         ///
23         MathInset * clone() const;
24         ///
25         void draw(MathPainterInfo &, int x, int y) const;
26         ///
27         void write(WriteStream & os) const;
28         ///
29         void metrics(MathMetricsInfo & mi) const;
30         ///
31         void normalize(NormalStream & os) const;
32         ///
33         void infoize(std::ostream & os) const;
34         ///
35         bool isScriptable() const;
36
37 private:
38         ///
39         bool upper() const;
40         ///
41         bool protect() const;
42         /// is it a wide decoration?
43         bool wide() const;
44
45         ///
46         latexkeys const * key_;
47         /// height cache of deco
48         mutable int dh_;
49         /// vertical offset cache of deco
50         mutable int dy_;
51         /// width for non-wide deco
52         mutable int dw_;
53 };
54 #endif