4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Martin Vermeer
9 * Full author contact details are available in file CREDITS.
16 #include "InsetCollapsable.h"
23 * InsetOptArg. Used to insert a short version of sectioning header etc.
24 * automatically, or other optional LaTeX arguments
26 class InsetOptArg : public InsetCollapsable {
28 InsetOptArg(BufferParams const &);
31 Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
32 /// return an message upon editing
33 virtual docstring const editMessage() const;
35 /// Standard LaTeX output -- short-circuited
36 int latex(Buffer const &, odocstream &,
37 OutputParams const &) const;
38 /// Standard plain text output -- short-circuited
39 int plaintext(Buffer const &, odocstream &,
40 OutputParams const &) const;
41 /// Standard DocBook output -- short-circuited
42 int docbook(Buffer const &, odocstream &,
43 OutputParams const &) const;
45 /// Outputting the optional parameter of a LaTeX command
46 int latexOptional(Buffer const &, odocstream &,
47 OutputParams const &) const;
48 /// Write out to the .lyx file
49 void write(Buffer const & buf, std::ostream & os) const;
51 /// should paragraph indendation be ommitted in any case?
52 virtual bool neverIndent(Buffer const &) const { return true; }
54 InsetOptArg(InsetOptArg const &);
56 virtual Inset * clone() const;
62 #endif // INSETOPTARG_H