]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_fracinset.h
fix pullArg when pressing <Delete> at the end of an cell
[lyx.git] / src / mathed / math_fracinset.h
index 409703d21d8cd682667430e310bde5886e3d4f31..10da11aae86e044150701de50ae86a8a893a9848 100644 (file)
@@ -1,52 +1,46 @@
+// -*- C++ -*-
 #ifndef MATH_FRACINSET_H
 #define MATH_FRACINSET_H
 
-#include "math_parinset.h"
+#include "math_inset.h"
 
-/// Fraction like objects (frac, stackrel, binom) 
-class MathFracInset: public MathParInset {
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+/** Fraction like objects (frac, stackrel, binom)
+    \author Alejandro Aguilar Sierra
+ */
+class MathFracInset : public MathInset {
 public:
        ///
-       MathFracInset(short ot = LM_OT_FRAC);
-       ///
-       ~MathFracInset();
-       ///
-       MathedInset * Clone();
+       explicit MathFracInset(const string & name);
        ///
-       void draw(Painter &, int x, int baseline);
+       virtual MathInset * clone() const;
        ///
-       void Write(std::ostream &, bool fragile);
+       virtual void Write(std::ostream &, bool fragile) const;
        ///
-       void Metrics();
-       
-       /** This does the same that SetData(MathedArray*) but for both
-           numerator and denominator at once.
-       */
-       void SetData(MathedArray *, MathedArray *);
+       virtual void WriteNormal(std::ostream &) const;
        ///
-       void SetData(MathedArray *);
+       virtual void Metrics(MathStyles st, int asc = 0, int des = 0);
        ///
-       void GetXY(int & x, int & y) const;
+       virtual void draw(Painter &, int x, int baseline);
        ///
-       void SetFocus(int, int);
+       virtual bool idxUp(int &, int &) const;
        ///
-       bool Inside(int, int);
+       virtual bool idxDown(int &, int &) const;
        ///
-       MathedArray * GetData();
+       virtual bool idxLeft(int &, int &) const;
        ///
-       bool setArgumentIdx(int i); // was bool Up/down(void);
+       virtual bool idxRight(int &, int &) const;
        ///
-       int getArgumentIdx() const { return idx; }
+       virtual bool idxFirstUp(int & idx, int & pos) const;
        ///
-       int getMaxArgumentIdx() const { return 1; }
+       virtual bool idxFirstDown(int & idx, int & pos) const;
        ///
-       void  SetStyle(short);
-protected:
+       virtual bool idxLastUp(int & idx, int & pos) const;
        ///
-       int idx;
-       ///
-       MathParInset * den;
-       ///
-       int w0, w1, des0, dh;
+       virtual bool idxLastDown(int & idx, int & pos) const;
 };
+
 #endif