4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS
16 #include "lyxtextclass.h"
17 #include "paragraph_funcs.h"
18 #include "lyxlayout.h"
19 #include "bufferparams.h"
20 #include "support/LOstream.h"
28 InsetEnvironment::InsetEnvironment
29 (BufferParams const & bp, string const & name)
30 : InsetText(bp), layout_(bp.getLyXTextClass()[name])
38 InsetEnvironment::InsetEnvironment(InsetEnvironment const & in)
39 : InsetText(in), layout_(in.layout_)
43 InsetBase * InsetEnvironment::clone() const
45 return new InsetEnvironment(*this);
49 void InsetEnvironment::write(Buffer const * buf, ostream & os) const
51 os << "Environment " << getInsetName() << "\n";
52 InsetText::write(buf, os);
56 void InsetEnvironment::read(Buffer const * buf, LyXLex & lex)
58 InsetText::read(buf, lex);
62 string const InsetEnvironment::editMessage() const
64 return _("Opened Environment Inset: ") + getInsetName();
68 int InsetEnvironment::latex(Buffer const * buf, ostream & os,
69 LatexRunParams const & runparams) const
71 os << layout_->latexheader;
73 latexParagraphs(buf, paragraphs, os, texrow, runparams,
74 layout_->latexparagraph);
75 os << layout_->latexfooter;
80 LyXLayout_ptr const & InsetEnvironment::layout() const