-#include <config.h>
-
#ifdef __GNUG__
#pragma implementation
#endif
#include "math_sqrtinset.h"
#include "LColor.h"
#include "Painter.h"
-#include "support.h"
#include "support/LOstream.h"
MathSqrtInset::MathSqrtInset()
- : MathInset("sqrt", LM_OT_SQRT, 1)
+ : MathNestInset(1)
{}
-MathInset * MathSqrtInset::Clone() const
+MathInset * MathSqrtInset::clone() const
{
return new MathSqrtInset(*this);
}
-void MathSqrtInset::Metrics(MathStyles st)
+void MathSqrtInset::metrics(MathMetricsInfo const & st) const
{
- xcell(0).Metrics(st);
+ xcell(0).metrics(st);
size_ = st;
ascent_ = xcell(0).ascent() + 4;
descent_ = xcell(0).descent() + 2;
}
-void MathSqrtInset::draw(Painter & pain, int x, int y)
+void MathSqrtInset::draw(Painter & pain, int x, int y) const
{
xo(x);
yo(y);
}
-void MathSqrtInset::Write(std::ostream & os, bool fragile) const
+void MathSqrtInset::write(MathWriteInfo & os) const
{
- os << '\\' << name_ << '{';
- cell(0).Write(os, fragile);
- os << '}';
+ os << "\\sqrt{" << cell(0) << '}';
}
-void MathSqrtInset::WriteNormal(std::ostream & os) const
+void MathSqrtInset::writeNormal(std::ostream & os) const
{
os << "[sqrt ";
- cell(0).WriteNormal(os);
+ cell(0).writeNormal(os);
os << "] ";
}