4 * Copyright 2002 the LyX Team
5 * Read the file COPYING
7 * \author Martin Vermeer <martin.vermeer@hut.fi>
17 #include "insettext.h"
18 #include "insetcollapsable.h"
22 * InsetOptArg. Used to insert a short version of sectioning header etc.
23 * automatically, or other optional LaTeX arguments
25 class InsetOptArg : public InsetCollapsable {
27 InsetOptArg(BufferParams const &);
29 InsetOptArg(InsetOptArg const &, bool same_id = false);
31 /// make a duplicate of this inset
32 Inset * clone(Buffer const &, bool same_id = false) const;
34 /// this inset is editable
35 EDITABLE editable() const { return IS_EDITABLE; }
37 Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
38 /// return an message upon editing
39 string const editMessage() const;
41 /// Standard LaTeX output -- short-circuited
42 int latex(Buffer const *, std::ostream &,
43 bool fragile, bool fp) const;
44 /// Outputting the optional parameter of a LaTeX command
45 int latexOptional(Buffer const *, std::ostream &,
46 bool fragile, bool fp) const;
47 /// Write out tothe .lyx file
48 void write(Buffer const * buf, std::ostream & os) const;
51 #endif // INSETOPTARG_H