A bit more re-organization.
[lyx.git] / src / mathed / InsetMathEnv.cpp
bloba7fb33c69d408ac0e7aa704b879dd3d19698f5dd
1 /**
2 * \file InsetMathEnv.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author André Pönitz
8 * Full author contact details are available in file CREDITS.
9 */
11 #include <config.h>
13 #include "InsetMathEnv.h"
15 #include "MathData.h"
16 #include "MathStream.h"
17 #include "MathStream.h"
19 #include <ostream>
22 namespace lyx {
24 InsetMathEnv::InsetMathEnv(Buffer * buf, docstring const & name)
25 : InsetMathNest(buf, 1), name_(name)
29 Inset * InsetMathEnv::clone() const
31 return new InsetMathEnv(*this);
35 void InsetMathEnv::metrics(MetricsInfo & mi, Dimension & dim) const
37 cell(0).metrics(mi, dim);
38 metricsMarkers(dim);
42 void InsetMathEnv::draw(PainterInfo & pi, int x, int y) const
44 cell(0).draw(pi, x + 1, y);
45 drawMarkers(pi, x, y);
49 void InsetMathEnv::write(WriteStream & os) const
51 MathEnsurer ensurer(os);
52 os << "\\begin{" << name_ << '}' << cell(0) << "\\end{" << name_ << '}';
56 void InsetMathEnv::normalize(NormalStream & os) const
58 os << "[env " << name_ << ' ' << cell(0) << ']';
62 void InsetMathEnv::infoize(odocstream & os) const
64 os << "Env: " << name_;
68 } // namespace lyx