X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_parboxinset.h;h=6800cadf2150361013facfcfda7e5366bc68afbe;hb=7338f3b980d4dc5793ff80be814b7a74e1c72274;hp=389fe158b0bdca4359354273b961603d87d09a53;hpb=baf8d2da9f597105e9f698fe54fcf61574b8665e;p=lyx.git diff --git a/src/mathed/math_parboxinset.h b/src/mathed/math_parboxinset.h index 389fe158b0..6800cadf21 100644 --- a/src/mathed/math_parboxinset.h +++ b/src/mathed/math_parboxinset.h @@ -1,22 +1,36 @@ +// -*- C++ -*- +/** + * \file math_parboxinset.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author André Pönitz + * + * Full author contact details are available in file CREDITS. + */ + #ifndef MATH_PARBOXINSET_H #define MATH_PARBOXINSET_H -#include "math_nestinset.h" -class MathParboxInset : public MathNestInset { +#include "math_textinset.h" + +// implements support for \parbox + +class MathParboxInset : public MathTextInset { public: /// MathParboxInset(); /// MathParboxInset * asParboxInset() { return this; } /// - MathInset * clone() const; - /// get cursor position - void getPos(idx_type idx, pos_type pos, int & x, int & y) const; + virtual std::auto_ptr clone() const; + /// + mode_type currentMode() const { return TEXT_MODE; } /// - void metrics(MathMetricsInfo & mi) const; + void metrics(MetricsInfo & mi, Dimension & dim) const; /// - void draw(MathPainterInfo &, int x, int y) const; + void draw(PainterInfo &, int x, int y) const; /// void infoize(std::ostream & os) const; /// @@ -26,16 +40,12 @@ public: /// void setPosition(string const & pos); private: - /// row corresponding to given position - int pos2row(pos_type pos) const; /// width on screen int lyx_width_; /// width for TeX string tex_width_; - /// htb + /// one of htb char position_; - /// cached metrics - mutable std::vector rows_; }; #endif