]> git.lyx.org Git - lyx.git/blob - src/insets/InsetEnvironment.h
Fix GRAPHICS_EDIT of InsetGraphics
[lyx.git] / src / insets / InsetEnvironment.h
1 // -*- C++ -*-
2 /**
3  * \file InsetEnvironment.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSETENVIRONMENT_H
13 #define INSETENVIRONMENT_H
14
15 #include "InsetText.h"
16
17 namespace lyx {
18
19 class Layout;
20         
21 class InsetEnvironment : public InsetText {
22 public:
23         ///
24         InsetEnvironment(Buffer const &, docstring const & name);
25         ///
26         docstring name() const { return name_; }
27         ///
28         void write(std::ostream & os) const;
29         ///
30         void read(Lexer & lex);
31         ///
32         InsetCode lyxCode() const { return ENVIRONMENT_CODE; }
33         ///
34         int latex(odocstream &, OutputParams const &) const;
35         ///
36         int plaintext(odocstream &, OutputParams const &) const;
37         ///
38         docstring editMessage() const;
39         ///
40         Inset::EDITABLE editable() const { return HIGHLY_EDITABLE; }
41         ///
42         Layout const & layout() const;
43         /** returns true if, when outputing LaTeX, font changes should
44             be closed before generating this inset. This is needed for
45             insets that may contain several paragraphs */
46         bool noFontChange() const { return true; }
47 private:
48         ///
49         Inset * clone() const { return new InsetEnvironment(*this); }
50         /// the layout
51         Layout const & layout_;
52         ///
53         docstring name_;
54 };
55
56
57 } // namespace lyx
58
59 #endif