]> git.lyx.org Git - lyx.git/blob - src/insets/insetoptarg.h
pedantic cleanup
[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  * InsetOptArg. Used to insert a short version of sectioning header etc.
22  * automatically, or other optional LaTeX arguments
23  */
24 class InsetOptArg : public InsetCollapsable {
25 public:
26         InsetOptArg(BufferParams const &);
27
28         InsetOptArg(InsetOptArg const &, bool same_id = false);
29
30         /// make a duplicate of this inset
31         Inset * clone(Buffer const &, bool same_id = false) const;
32  
33         /// this inset is editable
34         EDITABLE editable() const { return IS_EDITABLE; }
35         /// code of the inset
36         Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
37         /// return an message upon editing
38         string const editMessage() const;
39  
40         /// Standard LaTeX output -- short-circuited
41         int latex(Buffer const *, std::ostream &,
42                                         bool fragile, bool fp) const;
43         /// Outputting the optional parameter of a LaTeX command
44         int latexOptional(Buffer const *, std::ostream &,
45                                         bool fragile, bool fp) const;
46         /// Write out tothe .lyx file
47         void write(Buffer const * buf, ostream & os) const;
48 };
49
50 #endif // INSETOPTARG_H