]> git.lyx.org Git - lyx.git/blob - src/insets/InsetArgument.h
listerrors.lyx : Update a link.
[lyx.git] / src / insets / InsetArgument.h
1 // -*- C++ -*-
2 /**
3  * \file InsetArgument.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 namespace lyx {
20
21
22 /**
23  * InsetArgument. Used to insert a short version of sectioning header etc.
24  * automatically, or other optional LaTeX arguments
25  */
26 class InsetArgument : public InsetCollapsable
27 {
28 public:
29         ///
30         InsetArgument(Buffer *);
31
32         /// Outputting the parameter of a LaTeX command
33         void latexArgument(otexstream &, OutputParams const &,
34                         bool optional) const;
35
36         /// \name Public functions inherited from Inset class
37         //@{
38         ///
39         bool hasSettings() const { return false; }
40         ///
41         InsetCode lyxCode() const { return ARG_CODE; }
42         ///
43         docstring layoutName() const { return from_ascii("Argument"); }
44         ///
45         void latex(otexstream &, OutputParams const &) const { }
46         ///
47         int plaintext(odocstream &, OutputParams const &) const { return 0; }
48         ///
49         int docbook(odocstream &, OutputParams const &) const { return 0; }
50         ///
51         docstring xhtml(XHTMLStream &, OutputParams const &) const 
52                 { return docstring(); };
53         ///
54         void write(std::ostream & os) const;
55         ///
56         bool neverIndent() const { return true; }
57         //@}
58
59 protected:
60         /// \name Protected functions inherited from Inset class
61         //@{
62         ///
63         Inset * clone() const { return new InsetArgument(*this); }
64         //@}
65 };
66
67
68 } // namespace lyx
69
70 #endif // INSETOPTARG_H