]> git.lyx.org Git - lyx.git/blob - src/insets/InsetERT.h
Collapsable -> Collapsible (part 1)
[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 "InsetCollapsable.h"
17
18
19 namespace lyx {
20
21 /** A collapsible text inset for LaTeX insertions.
22
23   To write full ert (including styles and other insets) in a given
24   space.
25
26   Note that collapsed_ encompasses both the inline and collapsed button
27   versions of this inset.
28 */
29
30 class Language;
31
32 class InsetERT : public InsetCollapsable {
33 public:
34         ///
35         InsetERT(Buffer *, CollapseStatus status = Open);
36         ///
37         static CollapseStatus string2params(std::string const &);
38         ///
39         static std::string params2string(CollapseStatus);
40
41         std::string contextMenuName() const
42                 { return "context-ert"; }
43 private:
44         ///
45         InsetCode lyxCode() const { return ERT_CODE; }
46         ///
47         docstring layoutName() const { return from_ascii("ERT"); }
48         ///
49         void write(std::ostream & os) const;
50         ///
51         int plaintext(odocstringstream & ods, OutputParams const & op,
52                       size_t max_length = INT_MAX) const;
53         ///
54         int docbook(odocstream &, OutputParams const &) const;
55         ///
56         docstring xhtml(XHTMLStream &, OutputParams const &) const;
57         ///
58         void validate(LaTeXFeatures &) const {}
59         /// should paragraph indendation be omitted in any case?
60         bool neverIndent() const { return true; }
61         ///
62         void doDispatch(Cursor & cur, FuncRequest & cmd);
63         ///
64         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
65         ///
66         Inset * clone() const { return new InsetERT(*this); }
67         ///
68         docstring const buttonLabel(BufferView const & bv) const;
69         ///
70         bool allowSpellCheck() const { return false; }
71 };
72
73
74 } // namespace lyx
75
76 #endif