2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team
10 * ====================================================== */
19 #include "insettext.h"
20 #include "insetcollapsable.h"
22 class InsetOptArg : public InsetCollapsable {
24 InsetOptArg(BufferParams const &);
26 InsetOptArg(InsetOptArg const &, bool same_id = false);
28 Inset * clone(Buffer const &, bool same_id = false) const;
30 EDITABLE editable() const { return IS_EDITABLE; }
32 Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
34 string const editMessage() const;
35 /// Standard LaTeX output -- short-circuited
36 int latex(Buffer const *, std::ostream &,
37 bool fragile, bool fp) const;
38 /// Outputting the optional parameter of a LaTeX command
39 int latexOptional(Buffer const *, std::ostream &,
40 bool fragile, bool fp) const;
42 void write(Buffer const * buf, ostream & os) const;