+// -*- 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 *);
- ///
- void SetData(MathedArray *);
+ explicit MathFracInset(bool atop = false);
///
- void GetXY(int & x, int & y) const;
+ MathInset * clone() const;
///
- void SetFocus(int, int);
+ void write(std::ostream &, bool fragile) const;
///
- bool Inside(int, int);
+ void writeNormal(std::ostream &) const;
///
- MathedArray * GetData();
+ void metrics(MathStyles st) const;
///
- bool setArgumentIdx(int i); // was bool Up/down(void);
- ///
- int getArgumentIdx() const { return idx; }
- ///
- int getMaxArgumentIdx() const { return 1; }
- ///
- void SetStyle(short);
-protected:
- ///
- int idx;
- ///
- MathParInset * den;
+ void draw(Painter &, int x, int y) const;
+public:
///
- int w0, w1, des0, dh;
+ const bool atop_;
};
+
#endif