+#include <config.h>
+
#ifdef __GNUG__
#pragma implementation
#endif
#include "math_sizeinset.h"
#include "math_parser.h"
-#include "support/LOstream.h"
+#include "math_mathmlstream.h"
+#include "math_streamstr.h"
+#include "math_support.h"
MathSizeInset::MathSizeInset(latexkeys const * l)
void MathSizeInset::draw(Painter & pain, int x, int y) const
{
- xo(x);
- yo(y);
- xcell(0).draw(pain, x, y);
+ xcell(0).draw(pain, x + 1, y);
+ mathed_draw_framebox(pain, x, y, this);
}
-void MathSizeInset::metrics(MathMetricsInfo const & st) const
+void MathSizeInset::metrics(MathMetricsInfo const & mi) const
{
- size_ = st;
- size_.style = MathStyles(key_->id);
- xcell(0).metrics(size_);
- ascent_ = xcell(0).ascent_;
- descent_ = xcell(0).descent_;
- width_ = xcell(0).width_;
+ MathMetricsInfo m = mi;
+ m.style = MathStyles(key_->id);
+ xcell(0).metrics(m);
+ ascent_ = xcell(0).ascent_ + 1;
+ descent_ = xcell(0).descent_ + 1;
+ width_ = xcell(0).width_ + 2;
}
-void MathSizeInset::write(MathWriteInfo & os) const
+void MathSizeInset::write(WriteStream & os) const
{
os << "{\\" << key_->name << ' ' << cell(0) << '}';
}
-void MathSizeInset::writeNormal(std::ostream & os) const
+void MathSizeInset::normalize(NormalStream & os) const
{
- os << "[" << key_->name << " ";
- cell(0).writeNormal(os);
- os << "]";
+ os << "[" << key_->name << ' ' << cell(0) << ']';
}