]> git.lyx.org Git - lyx.git/blob - src/mathed/math_decorationinset.h
small up/down tweaking
[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  * Full author contact details are available in file CREDITS
16  */
17
18 class latexkeys;
19
20 class MathDecorationInset : public MathNestInset {
21 public:
22         ///
23         explicit MathDecorationInset(latexkeys const * key);
24         ///
25         MathInset * clone() const;
26         ///
27         void draw(MathPainterInfo &, int x, int y) const;
28         ///
29         void write(WriteStream & os) const;
30         ///
31         void metrics(MathMetricsInfo & mi) const;
32         ///
33         void normalize(NormalStream & os) const;
34         ///
35         void infoize(std::ostream & os) const;
36         ///
37         bool isScriptable() const;
38
39 private:
40         ///
41         bool upper() const;
42         ///
43         bool protect() const;
44         /// is it a wide decoration?
45         bool wide() const;
46
47         ///
48         latexkeys const * key_;
49         /// height cache of deco
50         mutable int dh_;
51         /// vertical offset cache of deco
52         mutable int dy_;
53         /// width for non-wide deco
54         mutable int dw_;
55 };
56 #endif