]> git.lyx.org Git - lyx.git/blob - src/insets/InsetERT.h
more latin1..utf8 schanges. all of src/* should be utf8 now
[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 const &, 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         docstring editMessage() const;
51         ///
52         bool insetAllowed(InsetCode code) const;
53         ///
54         int latex(odocstream &, OutputParams const &) const;
55         ///
56         int plaintext(odocstream &, OutputParams const &) const;
57         ///
58         int docbook(odocstream &, OutputParams const &) const;
59         ///
60         void validate(LaTeXFeatures &) const {}
61         ///
62         bool showInsetDialog(BufferView *) const;
63         ///
64         virtual bool forcePlainLayout(idx_type = 0) const { return true; }
65         ///
66         virtual bool allowParagraphCustomization(idx_type = 0) const { return false; }
67         /// should paragraph indendation be omitted in any case?
68         bool neverIndent() const { return true; }
69         ///
70         void doDispatch(Cursor & cur, FuncRequest & cmd);
71         ///
72         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
73         ///
74         Inset * clone() const { return new InsetERT(*this); }
75         ///
76         void setButtonLabel();
77         ///
78         bool allowSpellCheck() const { return false; }
79 };
80
81
82 } // namespace lyx
83
84 #endif