]> git.lyx.org Git - lyx.git/blob - src/insets/insetoptarg.h
remove commented same_id functions, and also remove some const_casts
[lyx.git] / src / insets / insetoptarg.h
1 // -*- C++ -*-
2 /**
3  * \file insetoptarg.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Martin Vermeer
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef INSETOPTARG_H
13 #define INSETOPTARG_H
14
15
16 #include "insettext.h"
17 #include "insetcollapsable.h"
18
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 &);
29         /// make a duplicate of this inset
30         Inset * clone(Buffer const &) const;
31         /// this inset is editable
32         EDITABLE editable() const { return IS_EDITABLE; }
33         /// code of the inset
34         Inset::Code lyxCode() const { return Inset::OPTARG_CODE; }
35         /// return an message upon editing
36         string const editMessage() const;
37
38         /// Standard LaTeX output -- short-circuited
39         int latex(Buffer const *, std::ostream &,
40                   LatexRunParams const &) const;
41         /// Outputting the optional parameter of a LaTeX command
42         int latexOptional(Buffer const *, std::ostream &,
43                           LatexRunParams const &) const;
44         /// Write out tothe .lyx file
45         void write(Buffer const * buf, std::ostream & os) const;
46 };
47
48 #endif // INSETOPTARG_H