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"
21 #include "support/std_ostream.h"
31 InsetEnvironment::InsetEnvironment
32 (BufferParams const & bp, string const & name)
33 : InsetText(bp), layout_(bp.getLyXTextClass()[name])
36 setAutoBreakRows(true);
41 InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
42 : InsetText(in), layout_(in.layout_)
46 auto_ptr<InsetBase> InsetEnvironment::doClone() const
48 return auto_ptr<InsetBase>(new InsetEnvironment(*this));
52 void InsetEnvironment::write(Buffer const & buf, ostream & os) const
54 os << "Environment " << getInsetName() << "\n";
55 InsetText::write(buf, os);
59 void InsetEnvironment::read(Buffer const & buf, LyXLex & lex)
61 InsetText::read(buf, lex);
65 docstring const InsetEnvironment::editMessage() const
68 return _("Opened Environment Inset: ") + lyx::from_utf8(getInsetName());
72 int InsetEnvironment::latex(Buffer const & buf, ostream & os,
73 OutputParams const & runparams) const
75 os << layout_->latexheader;
77 latexParagraphs(buf, paragraphs(), os, texrow, runparams,
78 layout_->latexparagraph);
79 os << layout_->latexfooter;
84 LyXLayout_ptr const & InsetEnvironment::layout() const