]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_fracinset.h
tfracinset files is missing so all usage of tfrac is commented out
[lyx.git] / src / mathed / math_fracinset.h
index c26021774424c82316da3d6a82a97d89428fa44e..90ea9c9fd755026bb7c5d378b6861ff1e3c6353b 100644 (file)
@@ -1,70 +1,56 @@
 // -*- C++ -*-
+/**
+ * \file math_fracinset.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #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
- */
-class MathFracInset : public MathParInset {
+/// Fraction like objects (frac, binom)
+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 WriteNormal(std::ostream &);
+       explicit MathFracInset(bool atop = false);
        ///
-       void Metrics();
-       
-       /** This does the same that SetData(MathedArray const &) but for both
-           numerator and denominator at once.
-       */
-       void SetData(MathedArray const &, MathedArray const &);
+       virtual std::auto_ptr<InsetBase> clone() const;
        ///
-       void setData(MathedArray const &);
+       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();
-       ///
-       MathedArray const & GetData() const;
-       ///
-       bool setArgumentIdx(int i); // was bool Up/down(void);
-       ///
-       int getArgumentIdx() const;
-       ///
-       int getMaxArgumentIdx() const;
-       ///
-       void  SetStyle(short);
-       ///
-       MathParInset * denom(); 
-private:
+       std::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_;
 };
 
 #endif