X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_fracinset.h;h=90ea9c9fd755026bb7c5d378b6861ff1e3c6353b;hb=3e93baac3cd18e27db3eb2a1fcaf90b25e0918a6;hp=071176b4373a920c72f234dcb5def9b6decc3463;hpb=9a3176581dc3e9aee62d908faf8d48ddb43d4cc3;p=lyx.git diff --git a/src/mathed/math_fracinset.h b/src/mathed/math_fracinset.h index 071176b437..90ea9c9fd7 100644 --- a/src/mathed/math_fracinset.h +++ b/src/mathed/math_fracinset.h @@ -1,75 +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" -/** 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); - /// - ~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 *); + explicit MathFracInset(bool atop = false); /// - void setData(MathedArray *); + virtual std::auto_ptr clone() const; /// - void GetXY(int & x, int & y) const; + void metrics(MetricsInfo & mi, Dimension & dim) const; /// - void SetFocus(int, int); + void draw(PainterInfo &, int x, int y) const; /// - bool Inside(int, int); + void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; /// - MathedArray * GetData(); + void drawT(TextPainter &, int x, int y) const; + /// identifies FracInsets + MathFracInset * asFracInset(); + /// identifies FracInsets + MathFracInset const * asFracInset() const; /// - bool setArgumentIdx(int i); // was bool Up/down(void); - /// - int getArgumentIdx() const; - /// - int getMaxArgumentIdx() const; - /// - void SetStyle(short); -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_; }; - -inline -int MathFracInset::getArgumentIdx() const -{ - return idx_; -} - - -inline -int MathFracInset::getMaxArgumentIdx() const -{ - return 1; -} #endif