]> git.lyx.org Git - lyx.git/blob - src/insets/insetoptarg.h
compile fixes
[lyx.git] / src / insets / insetoptarg.h
1 // -*- C++ -*-
2 /**
3  * \file insetoptarg.h
4  * Copyright 2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Martin Vermeer  <martin.vermeer@hut.fi>
8  */
9
10 #ifndef INSETOPTARG_H
11 #define INSETOPTARG_H
12
13 #ifdef __GNUG__
14 #pragma interface
15 #endif
16
17 #include "insettext.h"
18 #include "insetcollapsable.h"
19
20
21 /**
22  * InsetOptArg. Used to insert a short version of sectioning header etc.
23  * automatically, or other optional LaTeX arguments
24  */
25 class InsetOptArg : public InsetCollapsable {
26 public:
27         InsetOptArg(BufferParams const &);
28
29         InsetOptArg(InsetOptArg const &, bool same_id = false);
30
31         /// make a duplicate of this inset
32         Inset * clone(Buffer const &, bool same_id = false) const;
33
34         /// this inset is editable
35         EDITABLE editable() const { return IS_EDITABLE; }
36         /// code of the inset
37         Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
38         /// return an message upon editing
39         string const editMessage() const;
40
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;
49 };
50
51 #endif // INSETOPTARG_H