#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)
- \author Alejandro Aguilar Sierra
+/** Fraction like objects (frac, binom)
+ * \author Alejandro Aguilar Sierra
+ *
+ * Full author contact details are available in file CREDITS
*/
-class MathFracInset : public MathParInset {
+class MathFracInset : public MathFracbaseInset {
public:
///
- MathFracInset(short ot = LM_OT_FRAC);
- ///
- MathedInset * Clone();
- ///
- void draw(Painter &, int x, int baseline);
- ///
- void Write(std::ostream &, bool fragile);
- ///
- 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;
+ explicit MathFracInset(bool atop = false);
///
- void SetFocus(int, int);
+ virtual std::auto_ptr<InsetBase> clone() const;
///
- bool Inside(int, int);
+ void metrics(MetricsInfo & mi, Dimension & dim) const;
///
- MathedArray & GetData();
+ void draw(PainterInfo &, int x, int y) const;
///
- bool setArgumentIdx(int i); // was bool Up/down(void);
+ void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
///
- int getArgumentIdx() const;
+ void drawT(TextPainter &, int x, int y) const;
+ /// identifies FracInsets
+ MathFracInset * asFracInset();
+ /// identifies FracInsets
+ MathFracInset const * asFracInset() const;
///
- int getMaxArgumentIdx() const;
- ///
- void SetStyle(short);
-private:
+ string name() const;
+
///
- int idx_;
+ void write(WriteStream & os) const;
///
- MathParInset den_;
+ void maple(MapleStream &) const;
///
- int w0_;
+ void mathematica(MathematicaStream &) const;
///
- int w1_;
+ void octave(OctaveStream &) 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