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"
20 * InsetOptArg. Used to insert a short version of sectioning header etc.
21 * automatically, or other optional LaTeX arguments
23 class InsetOptArg : public InsetCollapsable {
25 InsetOptArg(BufferParams const &);
28 InsetBase::Code lyxCode() const { return InsetBase::OPTARG_CODE; }
29 /// return an message upon editing
30 virtual lyx::docstring const editMessage() const;
32 /// Standard LaTeX output -- short-circuited
33 int latex(Buffer const &, std::ostream &,
34 OutputParams const &) const;
35 /// Standard DocBook output -- short-circuited
36 int docbook(Buffer const &, std::ostream &,
37 OutputParams const &) const;
39 /// Standard plain text output -- short-circuited
40 int plaintext(Buffer const &, std::ostream &,
41 OutputParams const &) const;
43 /// Outputting the optional parameter of a LaTeX command
44 int latexOptional(Buffer const &, std::ostream &,
45 OutputParams const &) const;
46 /// Write out tothe .lyx file
47 void write(Buffer const & buf, std::ostream & os) const;
49 /// should paragraph indendation be ommitted in any case?
50 virtual bool neverIndent() const { return true; }
52 InsetOptArg(InsetOptArg const &);
54 virtual std::auto_ptr<InsetBase> doClone() const;
57 #endif // INSETOPTARG_H