]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_decorationinset.h
remove symbol_def.h
[lyx.git] / src / mathed / math_decorationinset.h
index ea8c70957a046d71215b50c5b786359ad6f81491..58f74cca21a1e6721c02466496778ebfac5f4fcd 100644 (file)
@@ -1,29 +1,44 @@
+// -*- C++ -*-
 #ifndef MATH_DECORATIONINSET_H
 #define MATH_DECORATIONINSET_H
 
-#include "math_parinset.h"
+#include "math_nestinset.h"
+#include "LString.h"
 
-/// Decorations over (below) a math object
-class MathDecorationInset: public MathParInset {
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+/** Decorations and accents over (below) a math object
+    \author Alejandro Aguilar Sierra
+ */
+
+class MathDecorationInset : public MathNestInset {
 public:
        ///
-       MathDecorationInset(int, short st = LM_ST_TEXT);
+       explicit MathDecorationInset(string const & name);
        ///
-       MathedInset * Clone();
+       MathInset * clone() const;
        ///
-       void draw(Painter &, int, int);
+       void draw(Painter &, int x, int y) const;
        ///
-       void Write(std::ostream &, bool fragile);
+       void write(std::ostream &, bool fragile) const;
        ///
-       void Metrics();
+       void metrics(MathStyles st) const;
        ///
-       inline bool GetLimits() const;
-protected:
+       void writeNormal(std::ostream & os) const;
+
+private:
        ///
-       int deco;
+       bool upper() const;
        ///
-       bool upper;
+       bool protect() const;
+
        ///
-       int dw, dh, dy;
+       string const name_;
+       /// height cache of deco
+       mutable int dh_;
+       /// vertical offset cache of deco
+       mutable int dy_;
 };
 #endif