]> 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 409703d21d8cd682667430e310bde5886e3d4f31..386a95eda72dc5993725b5903e50cea769c0b7a3 100644 (file)
@@ -1,52 +1,40 @@
+// -*- C++ -*-
 #ifndef MATH_FRACINSET_H
 #define MATH_FRACINSET_H
 
-#include "math_parinset.h"
+#include "math_fracbase.h"
 
-/// Fraction like objects (frac, stackrel, binom) 
-class MathFracInset: public MathParInset {
+#ifdef __GNUG__
+#pragma interface
+#endif
+
+/** Fraction like objects (frac, binom)
+    \author Alejandro Aguilar Sierra
+ */
+class MathFracInset : public MathFracbaseInset {
 public:
        ///
-       MathFracInset(short ot = LM_OT_FRAC);
-       ///
-       ~MathFracInset();
-       ///
-       MathedInset * Clone();
-       ///
-       void draw(Painter &, int x, int baseline);
-       ///
-       void Write(std::ostream &, bool fragile);
-       ///
-       void Metrics();
-       
-       /** This does the same that SetData(MathedArray*) but for both
-           numerator and denominator at once.
-       */
-       void SetData(MathedArray *, MathedArray *);
+       explicit MathFracInset(bool atop = false);
        ///
-       void SetData(MathedArray *);
+       MathInset * clone() const;
        ///
-       void GetXY(int & x, int & y) const;
+       void metrics(MathMetricsInfo const & st) const;
        ///
-       void SetFocus(int, int);
+       void draw(Painter &, int x, int y) const;
        ///
-       bool Inside(int, int);
-       ///
-       MathedArray * GetData();
-       ///
-       bool setArgumentIdx(int i); // was bool Up/down(void);
-       ///
-       int getArgumentIdx() const { return idx; }
+       MathFracInset * asFracInset();
+
        ///
-       int getMaxArgumentIdx() const { return 1; }
+       void write(WriteStream & os) const;
        ///
-       void  SetStyle(short);
-protected:
+       void normalize(NormalStream &) const;
        ///
-       int idx;
+       void maplize(MapleStream &) const;
        ///
-       MathParInset * den;
+       void mathmlize(MathMLStream &) const;
+public:
        ///
-       int w0, w1, des0, dh;
+       const bool atop_;
 };
+
 #endif