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 "paragraph_funcs.h"
25 InsetEnvironment::InsetEnvironment
26 (BufferParams const & bp, string const & name)
27 : InsetText(bp), layout_(bp.getLyXTextClass()[name])
35 InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
36 : InsetText(in), layout_(in.layout_)
40 auto_ptr<InsetBase> InsetEnvironment::clone() const
42 return auto_ptr<InsetBase>(new InsetEnvironment(*this));
46 void InsetEnvironment::write(Buffer const & buf, ostream & os) const
48 os << "Environment " << getInsetName() << "\n";
49 InsetText::write(buf, os);
53 void InsetEnvironment::read(Buffer const & buf, LyXLex & lex)
55 InsetText::read(buf, lex);
59 string const InsetEnvironment::editMessage() const
61 return _("Opened Environment Inset: ") + getInsetName();
65 int InsetEnvironment::latex(Buffer const & buf, ostream & os,
66 LatexRunParams const & runparams) const
68 os << layout_->latexheader;
70 latexParagraphs(buf, paragraphs, os, texrow, runparams,
71 layout_->latexparagraph);
72 os << layout_->latexfooter;
77 LyXLayout_ptr const & InsetEnvironment::layout() const