]> 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 83011783f25cff0c137612e57b20ca075c9d33fa..10da11aae86e044150701de50ae86a8a893a9848 100644 (file)
@@ -2,7 +2,7 @@
 #ifndef MATH_FRACINSET_H
 #define MATH_FRACINSET_H
 
-#include "math_parinset.h"
+#include "math_inset.h"
 
 #ifdef __GNUG__
 #pragma interface
 /** Fraction like objects (frac, stackrel, binom)
     \author Alejandro Aguilar Sierra
  */
-class MathFracInset : public MathParInset {
+class MathFracInset : public MathInset {
 public:
        ///
-       MathFracInset(short ot = LM_OT_FRAC);
+       explicit MathFracInset(const string & name);
        ///
-       MathedInset * Clone();
+       virtual MathInset * clone() const;
        ///
-       void draw(Painter &, int x, int baseline);
+       virtual void Write(std::ostream &, bool fragile) const;
        ///
-       void Write(std::ostream &, bool fragile);
+       virtual void WriteNormal(std::ostream &) const;
        ///
-       void Metrics();
-       
-       /** This does the same that SetData(MathedArray const &) but for both
-           numerator and denominator at once.
-       */
-       void SetData(MathedArray const &, MathedArray const &);
+       virtual void Metrics(MathStyles st, int asc = 0, int des = 0);
        ///
-       void setData(MathedArray const &);
+       virtual void draw(Painter &, int x, int baseline);
        ///
-       void GetXY(int & x, int & y) const;
+       virtual bool idxUp(int &, int &) const;
        ///
-       void SetFocus(int, int);
+       virtual bool idxDown(int &, int &) const;
        ///
-       bool Inside(int, int);
+       virtual bool idxLeft(int &, int &) const;
        ///
-       MathedArray & GetData();
+       virtual bool idxRight(int &, int &) const;
        ///
-       bool setArgumentIdx(int i); // was bool Up/down(void);
+       virtual bool idxFirstUp(int & idx, int & pos) const;
        ///
-       int getArgumentIdx() const;
+       virtual bool idxFirstDown(int & idx, int & pos) const;
        ///
-       int getMaxArgumentIdx() const;
+       virtual bool idxLastUp(int & idx, int & pos) const;
        ///
-       void  SetStyle(short);
-private:
-       ///
-       int idx_;
-       ///
-       MathParInset den_;
-       ///
-       int w0_;
-       ///
-       int w1_;
-       ///
-       int des0_;
-       ///
-       int dh_;
+       virtual bool idxLastDown(int & idx, int & pos) const;
 };
 
-
-inline
-int MathFracInset::getArgumentIdx() const
-{
-  return idx_;
-}
-
-
-inline
-int MathFracInset::getMaxArgumentIdx() const
-{
-  return 1;
-}
 #endif