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