+/**
+ * \file math_deliminset.C
+ * 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.
+ */
+
#include <config.h>
#include "math_deliminset.h"
-#include "math_parser.h"
-#include "math_support.h"
+#include "math_data.h"
#include "math_mathmlstream.h"
#include "math_streamstr.h"
-#include "math_extern.h"
+#include "math_support.h"
+using std::string;
using std::max;
+using std::auto_ptr;
namespace {
}
-MathInset * MathDelimInset::clone() const
+auto_ptr<InsetBase> MathDelimInset::doClone() const
{
- return new MathDelimInset(*this);
+ return auto_ptr<InsetBase>(new MathDelimInset(*this));
}
}
-Dimension MathDelimInset::metrics(MetricsInfo & mi) const
+void MathDelimInset::metrics(MetricsInfo & mi, Dimension & dim) const
{
cell(0).metrics(mi);
Dimension t;
dim_.wid = cell(0).width() + 2 * dw_ + 8;
dim_.asc = max(a0, d0) + h0;
dim_.des = max(a0, d0) - h0;
- return dim_;
+ dim = dim_;
}
mathed_draw_deco(pi, x + 4, b, dw_, dim_.height(), left_);
mathed_draw_deco(pi, x + dim_.width() - dw_ - 4,
b, dw_, dim_.height(), right_);
+ setPosCache(pi, x, y);
}
-bool MathDelimInset::isParanthesis() const
+bool MathDelimInset::isParenthesis() const
{
return left_ == "(" && right_ == ")";
}