]> git.lyx.org Git - lyx.git/blob - src/mathed/math_decorationinset.h
54024c14d8a20f7ba488804da587cdb1d5c248a2
[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
7 #ifdef __GNUG__
8 #pragma interface
9 #endif
10
11 /** Decorations and accents over (below) a math object
12     \author Alejandro Aguilar Sierra
13  */
14
15 struct latexkeys;
16
17 class MathDecorationInset : public MathNestInset {
18 public:
19         ///
20         explicit MathDecorationInset(latexkeys const *);
21         ///
22         MathInset * clone() const;
23         ///
24         void draw(Painter &, int x, int y) const;
25         ///
26         void write(std::ostream &, bool fragile) const;
27         ///
28         void metrics(MathStyles st) const;
29         ///
30         void writeNormal(std::ostream & os) const;
31
32 private:
33         ///
34         bool upper() const;
35         ///
36         bool protect() const;
37
38         ///
39         latexkeys const * key_;
40         /// height cache of deco
41         mutable int dh_;
42         /// vertical offset cache of deco
43         mutable int dy_;
44 };
45 #endif