]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_fracinset.h
make \newcommand{\bb}[1]{\mathbf{#1}} work for read/write/display.
[lyx.git] / src / mathed / math_fracinset.h
index d4e1af923cadbf778fc57135c05a1a72a762419d..386a95eda72dc5993725b5903e50cea769c0b7a3 100644 (file)
@@ -2,78 +2,39 @@
 #ifndef MATH_FRACINSET_H
 #define MATH_FRACINSET_H
 
-#include "math_parinset.h"
+#include "math_fracbase.h"
 
 #ifdef __GNUG__
 #pragma interface
 #endif
 
-/** Fraction like objects (frac, stackrel, binom)
+/** Fraction like objects (frac, binom)
     \author Alejandro Aguilar Sierra
  */
-class MathFracInset : public MathParInset {
+class MathFracInset : public MathFracbaseInset {
 public:
        ///
-       MathFracInset(short ot = LM_OT_FRAC);
+       explicit MathFracInset(bool atop = false);
        ///
-       MathedInset * Clone();
+       MathInset * clone() const;
        ///
-       void draw(Painter &, int x, int baseline);
+       void metrics(MathMetricsInfo const & st) const;
        ///
-       void Write(std::ostream &, bool fragile);
+       void draw(Painter &, int x, int y) 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 &);
-       ///
-       void setData(MathedArray const &);
-       ///
-       void GetXY(int & x, int & y) const;
-       ///
-       void SetFocus(int, int);
-       ///
-       bool Inside(int, int);
-       ///
-       MathedArray & GetData();
-       ///
-       MathedArray const & GetData() const;
-       ///
-       bool setArgumentIdx(int i); // was bool Up/down(void);
-       ///
-       int getArgumentIdx() const;
-       ///
-       int getMaxArgumentIdx() const;
-       ///
-       void  SetStyle(short);
-private:
-       ///
-       int idx_;
+       MathFracInset * asFracInset();
+
        ///
-       MathParInset den_;
+       void write(WriteStream & os) const;
        ///
-       int w0_;
+       void normalize(NormalStream &) const;
        ///
-       int w1_;
+       void maplize(MapleStream &) const;
        ///
-       int des0_;
+       void mathmlize(MathMLStream &) const;
+public:
        ///
-       int dh_;
+       const bool atop_;
 };
 
-
-inline
-int MathFracInset::getArgumentIdx() const
-{
-  return idx_;
-}
-
-
-inline
-int MathFracInset::getMaxArgumentIdx() const
-{
-  return 1;
-}
 #endif