#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();
- ///
- 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