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 const &, CollapseStatus status = Open);
39 static CollapseStatus string2params(std::string const &);
41 static std::string params2string(CollapseStatus);
44 InsetCode lyxCode() const { return ERT_CODE; }
46 docstring name() const { return from_ascii("ERT"); }
48 void write(std::ostream & os) const;
50 int plaintext(odocstream &, OutputParams const &) const;
52 int docbook(odocstream &, OutputParams const &) const;
54 docstring xhtml(odocstream &, OutputParams const &) const;
56 void validate(LaTeXFeatures &) const {}
58 bool showInsetDialog(BufferView *) const;
59 /// should paragraph indendation be omitted in any case?
60 bool neverIndent() const { return true; }
62 void doDispatch(Cursor & cur, FuncRequest & cmd);
64 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
66 Inset * clone() const { return new InsetERT(*this); }
68 docstring const buttonLabel(BufferView const & bv) const;
70 bool allowSpellCheck() const { return false; }