]> git.lyx.org Git - lyx.git/blob - src/insets/InsetERT.h
Uniformize Inset construction (passing Buffer * everywhere). Lots of cleanup to do...
[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 collapsable 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         ~InsetERT();
38         ///
39         static CollapseStatus string2params(std::string const &);
40         ///
41         static std::string params2string(CollapseStatus);
42 private:
43         ///
44         InsetCode lyxCode() const { return ERT_CODE; }
45         ///
46         docstring name() const { return from_ascii("ERT"); }
47         ///
48         void write(std::ostream & os) const;
49         ///
50         int plaintext(odocstream &, OutputParams const &) const;
51         ///
52         int docbook(odocstream &, OutputParams const &) const;
53         ///
54         docstring xhtml(odocstream &, OutputParams const &) const;
55         ///
56         void validate(LaTeXFeatures &) const {}
57         ///
58         bool showInsetDialog(BufferView *) 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