]> git.lyx.org Git - lyx.git/blob - src/insets/InsetERT.h
Wrap rotated cells with linebreaks in varwidth
[lyx.git] / src / insets / InsetERT.h
1 // -*- C++ -*-
2 /**
3  * \file InsetERT.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Jürgen Vigna
8  * \author Lars Gullik Bjønnes
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef INSETERT_H
14 #define INSETERT_H
15
16 #include "InsetCollapsible.h"
17
18 namespace lyx {
19
20 /** A collapsible text inset for LaTeX insertions.
21
22   To write full ert (including styles and other insets) in a given
23   space.
24
25   Note that collapsed_ encompasses both the inline and collapsed button
26   versions of this inset.
27 */
28
29 class Language;
30
31 namespace support {
32         class TempFile;
33 }
34
35 class InsetERT : public InsetCollapsible {
36 public:
37         ///
38         InsetERT(Buffer *, CollapseStatus status = Open);
39         ///
40         InsetERT(InsetERT const &);
41         ///
42         InsetERT & operator=(InsetERT const &);
43         ///
44         static CollapseStatus string2params(std::string const &);
45         ///
46         static std::string params2string(CollapseStatus);
47
48         std::string contextMenuName() const
49                 { return "context-ert"; }
50 private:
51         ///
52         InsetCode lyxCode() const { return ERT_CODE; }
53         ///
54         docstring layoutName() const { return from_ascii("ERT"); }
55         ///
56         void write(std::ostream & os) const;
57         ///
58         int plaintext(odocstringstream & ods, OutputParams const & op,
59                       size_t max_length = INT_MAX) const;
60         ///
61         int docbook(odocstream &, OutputParams const &) const;
62         ///
63         docstring xhtml(XHTMLStream &, OutputParams const &) const;
64         ///
65         void validate(LaTeXFeatures &) const {}
66         /// should paragraph indendation be omitted in any case?
67         bool neverIndent() const { return true; }
68         ///
69         void doDispatch(Cursor & cur, FuncRequest & cmd);
70         ///
71         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
72         ///
73         bool editable() const;
74         ///
75         bool descendable(BufferView const &) const;
76         ///
77         Inset * clone() const { return new InsetERT(*this); }
78         ///
79         docstring const buttonLabel(BufferView const & bv) const;
80         ///
81         bool allowSpellCheck() const { return false; }
82         ///
83         unique_ptr<support::TempFile> tempfile_;
84 };
85
86
87 } // namespace lyx
88
89 #endif