3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
15 #include "bufferparams.h"
17 #include "paragraph.h"
18 #include "output_latex.h"
29 InsetEnvironment::InsetEnvironment
30 (BufferParams const & bp, string const & name)
31 : InsetText(bp), layout_(bp.getLyXTextClass()[name])
34 setAutoBreakRows(true);
39 InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
40 : InsetText(in), layout_(in.layout_)
44 auto_ptr<InsetBase> InsetEnvironment::doClone() const
46 return auto_ptr<InsetBase>(new InsetEnvironment(*this));
50 void InsetEnvironment::write(Buffer const & buf, ostream & os) const
52 os << "Environment " << getInsetName() << "\n";
53 InsetText::write(buf, os);
57 void InsetEnvironment::read(Buffer const & buf, LyXLex & lex)
59 InsetText::read(buf, lex);
63 docstring const InsetEnvironment::editMessage() const
66 return _("Opened Environment Inset: ") + from_utf8(getInsetName());
70 int InsetEnvironment::latex(Buffer const & buf, odocstream & os,
71 OutputParams const & runparams) const
74 os << from_utf8(layout_->latexheader);
76 latexParagraphs(buf, paragraphs(), os, texrow, runparams,
77 layout_->latexparagraph);
79 os << from_utf8(layout_->latexfooter);
84 LyXLayout_ptr const & InsetEnvironment::layout() const