]> git.lyx.org Git - lyx.git/blob - src/insets/insetoptarg.h
the optional argument patch from martin
[lyx.git] / src / insets / insetoptarg.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ======================================================
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 1995 Matthias Ettrich
8  *           Copyright 1995-2001 The LyX Team
9  *
10  * ====================================================== */
11
12 #ifndef INSETOPTARG_H
13 #define INSETOPTARG_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "insettext.h"
20 #include "insetcollapsable.h"
21
22 class InsetOptArg : public InsetCollapsable {
23 public:
24         InsetOptArg(BufferParams const &);
25         ///
26         InsetOptArg(InsetOptArg const &, bool same_id = false);
27
28         Inset * clone(Buffer const &, bool same_id = false) const;
29         ///
30         EDITABLE editable() const { return IS_EDITABLE; }
31         ///
32         Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
33         ///
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;
41         ///
42         void write(Buffer const * buf, ostream & os) const;
43 };
44
45 #endif