3 #include "support/LOstream.h"
9 #include "math_scriptinset.h"
12 MathScriptInset::MathScriptInset(bool up)
13 : MathNestInset(1), up_(up)
17 MathInset * MathScriptInset::clone() const
19 return new MathScriptInset(*this);
23 MathScriptInset const * MathScriptInset::asScriptInset() const
28 void MathScriptInset::write(std::ostream & os, bool fragile) const
30 cell(0).write(os, fragile);
34 void MathScriptInset::metrics(MathStyles st) const
38 width_ = xcell(0).width();
39 ascent_ = xcell(0).ascent();
40 descent_ = xcell(0).descent();
41 //lyxerr << "MathScriptInset::metrics: w: " << width_ << " a: " << ascent_
42 // << " d: " << descent_ << "\n";
46 void MathScriptInset::draw(Painter & pain, int x, int y) const
50 xcell(0).draw(pain, x, y);