-#include <config.h>
+/**
+ * \file math_tabularinset.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_tabularinset.h"
-#include "math_parser.h"
+#include "math_data.h"
#include "math_mathmlstream.h"
-#include "metricsinfo.h"
#include "math_streamstr.h"
-#include "Lsstream.h"
+
+#include "support/lstrings.h"
+#include "support/std_ostream.h"
#include <iterator>
-using std::vector;
-using std::istringstream;
-using std::getline;
-using std::istream_iterator;
+
+using std::string;
+using std::auto_ptr;
MathTabularInset::MathTabularInset(string const & name, int m, int n)
{}
-MathInset * MathTabularInset::clone() const
+auto_ptr<InsetBase> MathTabularInset::doClone() const
{
- return new MathTabularInset(*this);
+ return auto_ptr<InsetBase>(new MathTabularInset(*this));
}
void MathTabularInset::metrics(MetricsInfo & mi, Dimension & dim) const
{
FontSetChanger dummy(mi.base, "textnormal");
- return MathGridInset::metrics(mi);
+ MathGridInset::metrics(mi, dim);
+ dim.wid += 6;
+ dim_ = dim;
}
void MathTabularInset::draw(PainterInfo & pi, int x, int y) const
{
FontSetChanger dummy(pi.base, "textnormal");
- MathGridInset::draw(pi, x, y);
+ MathGridInset::drawWithMargin(pi, x, y, 4, 2);
}
}
+void MathTabularInset::infoize(std::ostream & os) const
+{
+ string name = name_;
+ name[0] = lyx::support::uppercase(name[0]);
+ os << name << ' ';
+}
+
+
void MathTabularInset::normalize(NormalStream & os) const
{
os << '[' << name_ << ' ';