3 * \file InsetEnvironment.h
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.
12 #ifndef INSETENVIRONMENT_H
13 #define INSETENVIRONMENT_H
15 #include "InsetText.h"
16 #include "lyxlayout_ptr_fwd.h"
21 class InsetEnvironment : public InsetText {
24 InsetEnvironment(BufferParams const &, docstring const & name);
26 docstring name() const { return name_; }
28 void write(Buffer const & buf, std::ostream & os) const;
30 void read(Buffer const & buf, Lexer & lex);
32 Inset::Code lyxCode() const { return Inset::ENVIRONMENT_CODE; }
34 int latex(Buffer const &, odocstream &,
35 OutputParams const &) const;
37 int plaintext(Buffer const &, odocstream &,
38 OutputParams const &) const;
40 virtual docstring const editMessage() const;
42 Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
44 LayoutPtr const & layout() const;
45 /** returns true if, when outputing LaTeX, font changes should
46 be closed before generating this inset. This is needed for
47 insets that may contain several paragraphs */
48 bool noFontChange() const { return true; }
50 InsetEnvironment(InsetEnvironment const &);
52 virtual std::auto_ptr<Inset> doClone() const;