]> 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 49f350cef2d85f5fd7c69820c0d71601f66ce873..386a95eda72dc5993725b5903e50cea769c0b7a3 100644 (file)
@@ -2,45 +2,39 @@
 #ifndef MATH_FRACINSET_H
 #define MATH_FRACINSET_H
 
-#include "math_nestinset.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 MathNestInset {
+class MathFracInset : public MathFracbaseInset {
 public:
        ///
-       explicit MathFracInset(const string & name);
+       explicit MathFracInset(bool atop = false);
        ///
        MathInset * clone() const;
        ///
-       void write(std::ostream &, bool fragile) const;
-       ///
-       void writeNormal(std::ostream &) const;
-       ///
-       void metrics(MathStyles st) const;
+       void metrics(MathMetricsInfo const & st) const;
        ///
        void draw(Painter &, int x, int y) const;
        ///
-       bool idxUp(int &, int &) const;
-       ///
-       bool idxDown(int &, int &) const;
-       ///
-       bool idxLeft(int &, int &) const;
+       MathFracInset * asFracInset();
+
        ///
-       bool idxRight(int &, int &) const;
+       void write(WriteStream & os) const;
        ///
-       bool idxFirstUp(int & idx, int & pos) const;
+       void normalize(NormalStream &) const;
        ///
-       bool idxFirstDown(int & idx, int & pos) const;
+       void maplize(MapleStream &) const;
        ///
-       bool idxLastUp(int & idx, int & pos) const;
+       void mathmlize(MathMLStream &) const;
+public:
        ///
-       bool idxLastDown(int & idx, int & pos) const;
+       const bool atop_;
 };
 
 #endif