7 #include "math_boxinset.h"
8 #include "support/LOstream.h"
11 #include "math_cursor.h"
12 #include "math_mathmlstream.h"
13 #include "math_streamstr.h"
15 MathBoxInset::MathBoxInset(string const & name)
16 : MathGridInset(1, 1), name_(name)
20 MathInset * MathBoxInset::clone() const
22 return new MathBoxInset(*this);
26 void MathBoxInset::write(WriteStream & os) const
28 os << "\\" << name_ << "{" << cell(0) << "}";
32 void MathBoxInset::normalize(NormalStream & os) const
34 os << '[' << name_ << ' ';
35 //text_->write(buffer(), os);
40 void MathBoxInset::rebreak()
42 //lyxerr << "trying to rebreak...\n";
46 void MathBoxInset::draw(Painter & pain, int x, int y) const
48 MathGridInset::draw(pain, x, y);
49 if (mathcursor && mathcursor->isInside(this)) {
50 pain.rectangle(x - 1, y - ascent() - 1, width(), height(),