]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_biginset.C
architectural changes to tex2lyx
[lyx.git] / src / mathed / math_biginset.C
index 7cae97e3921011d5ca1dbd0020e0aa2905583232..95df7ff00e92768ed6962de1824fe715ae980bdc 100644 (file)
@@ -1,24 +1,22 @@
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "math_biginset.h"
 #include "math_support.h"
 #include "math_parser.h"
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
 
+using std::auto_ptr;
+
 
 MathBigInset::MathBigInset(string const & name, string const & delim)
        : name_(name), delim_(delim)
 {}
 
 
-MathInset * MathBigInset::clone() const
+auto_ptr<InsetBase> MathBigInset::clone() const
 {
-       return new MathBigInset(*this);
+       return auto_ptr<InsetBase>(new MathBigInset(*this));
 }
 
 
@@ -36,23 +34,23 @@ double MathBigInset::increase() const
                case 3:  return 0.7;
                default: return 0.0;
        }
-       return 0.0;
 }
 
 
-void MathBigInset::metrics(MathMetricsInfo & mi) const
+void MathBigInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        double const h = mathed_char_ascent(mi.base.font, 'I');
        double const f = increase();
-       dim_.w = 6;
-       dim_.a = int(h + f * h);
-       dim_.d = int(f * h);
+       dim_.wid = 6;
+       dim_.asc = int(h + f * h);
+       dim_.des = int(f * h);
+       dim = dim_;
 }
 
 
-void MathBigInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathBigInset::draw(PainterInfo & pi, int x, int y) const
 {
-       mathed_draw_deco(pi, x + 1, y - ascent(), 4, height(), delim_);
+       mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 4, dim_.height(), delim_);
 }