4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS.
16 #include "InsetCollapsable.h"
21 /** A collapsable text inset for LaTeX insertions.
23 To write full ert (including styles and other insets) in a given
26 Note that collapsed_ encompasses both the inline and collapsed button
27 versions of this inset.
32 class InsetERT : public InsetCollapsable {
35 InsetERT(Buffer *, CollapseStatus status = Open);
37 static CollapseStatus string2params(std::string const &);
39 static std::string params2string(CollapseStatus);
41 docstring contextMenu(BufferView const &, int, int) const
42 { return from_ascii("context-ert"); }
45 InsetCode lyxCode() const { return ERT_CODE; }
47 docstring name() const { return from_ascii("ERT"); }
49 void write(std::ostream & os) const;
51 int plaintext(odocstream &, OutputParams const &) const;
53 int docbook(odocstream &, OutputParams const &) const;
55 docstring xhtml(XHTMLStream &, OutputParams const &) const;
57 void validate(LaTeXFeatures &) const {}
58 /// should paragraph indendation be omitted in any case?
59 bool neverIndent() const { return true; }
61 void doDispatch(Cursor & cur, FuncRequest & cmd);
63 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
65 Inset * clone() const { return new InsetERT(*this); }
67 docstring const buttonLabel(BufferView const & bv) const;
69 bool allowSpellCheck() const { return false; }