]> git.lyx.org Git - lyx.git/blob - src/mathed/math_decorationinset.h
oh well
[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 MathDecorationInset : public MathNestInset {
17 public:
18         ///
19         explicit MathDecorationInset(string const & name);
20         ///
21         MathInset * clone() const;
22         ///
23         void draw(Painter &, int x, int y) const;
24         ///
25         void write(WriteStream & os) const;
26         ///
27         void metrics(MathMetricsInfo const & st) const;
28         ///
29         void normalize(NormalStream & os) const;
30         ///
31         bool isScriptable() const;
32
33 private:
34         ///
35         bool upper() const;
36         ///
37         bool protect() const;
38         /// is it a wide decoration?
39         bool wide() const;
40
41         ///
42         string const name_;
43         /// height cache of deco
44         mutable int dh_;
45         /// vertical offset cache of deco
46         mutable int dy_;
47         /// width for non-wide deco
48         mutable int dw_;
49 };
50 #endif