]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_scriptinset.h
further code uglification to make Jean-Marc's compiler happy
[lyx.git] / src / mathed / math_scriptinset.h
index 359db5ee3452d317125d2ea83b2769a652e6850c..491d5a0e90cbad0c3a2dea8da5d2c2b31673814a 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef MATH_SCRIPTINSET_H
 #define MATH_SCRIPTINSET_H
 
-#include "math_inset.h"
+#include "math_nestinset.h"
 
 #ifdef __GNUG__
 #pragma interface
     \author André Pönitz
  */
 
-
-class MathScriptInset : public MathInset {
+class MathScriptInset : public MathNestInset {
 public:
        ///
-       MathScriptInset();
-       ///
-       MathScriptInset(bool up, bool down, MathInset * = 0);
-       ///
-       MathScriptInset(MathScriptInset const &);
-       ///
-       ~MathScriptInset();
+       explicit MathScriptInset(bool up);
        ///
        MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile) const;
-       ///
-       void WriteNormal(std::ostream &) const;
-       ///
-       void Metrics(MathStyles st);
-       ///
-       void draw(Painter &, int x, int baseline);
-
-       ///
-       bool idxUp(int & idx, int & pos) const;
-       ///
-       bool idxDown(int & idx, int & pos) const;
-       ///
-       bool idxLeft(int & idx, int & pos) const;
-       ///
-       bool idxRight(int & idx, int & pos) const;
-       ///
-       bool idxFirst(int & idx, int & pos) const;
-       ///
-       bool idxFirstUp(int & idx, int & pos) const;
-       ///
-       bool idxFirstDown(int & idx, int & pos) const;
+       void write(std::ostream &, bool fragile) const;
        ///
-       bool idxLast(int & idx, int & pos) const;
+       void metrics(MathStyles st) const;
        ///
-       bool idxLastUp(int & idx, int & pos) const;
+       void draw(Painter &, int x, int y) const;
        ///
-       bool idxLastDown(int & idx, int & pos) const;
+       MathScriptInset const * asScriptInset() const;
        ///
-       void idxDelete(int & idx, bool & popit, bool & deleteit);
-
-       ///
-       bool up() const;
-       ///
-       bool down() const;
-       ///
-       void up(bool);
-       ///
-       void down(bool);
-       ///
-       void limits(int);
-       ///
-       int limits() const;
-       ///
-       bool isActive() const { return false; }
-       /// Identifies ScriptInsets
-       bool isScriptInset() const { return true; }
+       bool up() const { return up_; }
        ///
-       int xoffset() const { return dxx_; }
+       bool down() const { return !up_; }
 private:
-       ///
-       bool hasLimits() const;
        ///
        bool up_;
-       ///
-       bool down_;
-       ///
-       string ssym_;
-       /// 1: \limits, -1: \nolimits, 0: use default
-       int limits_;
-       /// x offset for drawing the superscript
-       int dx0_;
-       /// x offset for drawing the subscript
-       int dx1_;
-       /// x offset for drawing the inner symbol
-       int dxx_;
-       ///
-       int dy0_;
-       ///
-       int dy1_;
-       ///
-       MathInset * symbol_;
 };
 
 #endif
+