]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_parboxinset.C
Compile fix gcc 2.95 + stlport
[lyx.git] / src / mathed / math_parboxinset.C
index 6875a9c84c64d77fed7390f47d5cdd66d735728d..176d34988f1253a80b6768f86be010162fcff17f 100644 (file)
@@ -1,24 +1,37 @@
-#ifdef __GNUG__
-#pragma implementation
-#endif
+/**
+ * \file math_parboxinset.C
+ * 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.
+ */
+
+#include <config.h>
 
 #include "math_parboxinset.h"
+#include "math_data.h"
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
-#include "lyxlength.h"
 #include "debug.h"
 
 
+using std::string;
+using std::auto_ptr;
+using std::endl;
+
+
 MathParboxInset::MathParboxInset()
        : lyx_width_(0), tex_width_("0mm"), position_('c')
 {
-       lyxerr << "constructing MathParboxInset\n";
+       lyxerr << "constructing MathParboxInset" << endl;
 }
 
 
-MathInset * MathParboxInset::clone() const
+auto_ptr<InsetBase> MathParboxInset::clone() const
 {
-       return new MathParboxInset(*this);
+       return auto_ptr<InsetBase>(new MathParboxInset(*this));
 }
 
 
@@ -32,24 +45,25 @@ void MathParboxInset::setWidth(string const & w)
 {
        tex_width_ = w;
        lyx_width_ = LyXLength(w).inBP();
-       lyxerr << "setting " << w << " to " << lyx_width_ << " pixel\n";
+       lyxerr << "setting " << w << " to " << lyx_width_ << " pixel" << endl;
 }
 
 
-void MathParboxInset::metrics(MathMetricsInfo & mi) const
+void MathParboxInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       MathFontSetChanger dummy1(mi.base, "textnormal");
-       MathWidthChanger dummy2(mi.base, lyx_width_);
-       MathTextInset::metrics(mi);
-       metricsMarkers2();
+       FontSetChanger dummy1(mi.base, "textnormal");
+       WidthChanger dummy2(mi.base, lyx_width_);
+       MathTextInset::metrics(mi, dim);
+       metricsMarkers(dim);
+       dim_ = dim;
 }
 
 
-void MathParboxInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathParboxInset::draw(PainterInfo & pi, int x, int y) const
 {
-       MathFontSetChanger dummy(pi.base, "textnormal");
+       FontSetChanger dummy(pi.base, "textnormal");
        MathTextInset::draw(pi, x + 1, y);
-       drawMarkers2(pi, x, y);
+       drawMarkers(pi, x, y);
 }