+// -*- 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 {
+
+/** Fraction like objects (frac, binom)
+ * \author Alejandro Aguilar Sierra
+ *
+ * Full author contact details are available in file CREDITS
+ */
+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);
+ explicit MathFracInset(bool atop = false);
///
- void Metrics();
-
- /** This does the same that SetData(MathedArray*) but for both
- numerator and denominator at once.
- */
- void SetData(MathedArray *, MathedArray *);
+ virtual std::auto_ptr<InsetBase> clone() const;
///
- void SetData(MathedArray *);
+ void metrics(MetricsInfo & mi, Dimension & dim) const;
///
- void GetXY(int & x, int & y) const;
+ void draw(PainterInfo &, int x, int y) const;
///
- void SetFocus(int, int);
+ void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
///
- bool Inside(int, int);
+ void drawT(TextPainter &, int x, int y) const;
+ /// identifies FracInsets
+ MathFracInset * asFracInset();
+ /// identifies FracInsets
+ MathFracInset const * asFracInset() const;
///
- MathedArray * GetData();
- ///
- bool setArgumentIdx(int i); // was bool Up/down(void);
+ string name() const;
+
///
- int getArgumentIdx() const { return idx; }
+ void write(WriteStream & os) const;
///
- int getMaxArgumentIdx() const { return 1; }
+ void maple(MapleStream &) const;
///
- void SetStyle(short);
-protected:
+ void mathematica(MathematicaStream &) const;
///
- int idx;
+ void octave(OctaveStream &) const;
///
- MathParInset * den;
+ void mathmlize(MathMLStream &) const;
+public:
///
- int w0, w1, des0, dh;
+ const bool atop_;
};
+
#endif