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 "insettext.h"
17 #include "insetcollapsable.h"
21 * InsetOptArg. Used to insert a short version of sectioning header etc.
22 * automatically, or other optional LaTeX arguments
24 class InsetOptArg : public InsetCollapsable {
26 InsetOptArg(BufferParams const &);
28 InsetOptArg(InsetOptArg const &);
29 //InsetOptArg(InsetOptArg const &, bool same_id);
31 /// make a duplicate of this inset
32 Inset * clone(Buffer const &) const;
33 /// make a duplicate of this inset
34 //Inset * clone(Buffer const &, bool same_id) const;
36 /// this inset is editable
37 EDITABLE editable() const { return IS_EDITABLE; }
39 Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
40 /// return an message upon editing
41 string const editMessage() const;
43 /// Standard LaTeX output -- short-circuited
44 int latex(Buffer const *, std::ostream &,
45 LatexRunParams const &) const;
46 /// Outputting the optional parameter of a LaTeX command
47 int latexOptional(Buffer const *, std::ostream &,
48 LatexRunParams const &) const;
49 /// Write out tothe .lyx file
50 void write(Buffer const * buf, std::ostream & os) const;
53 #endif // INSETOPTARG_H