]> git.lyx.org Git - lyx.git/blob - src/insets/InsetOptArg.h
remove all trace of editMessage
[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 namespace lyx {
20
21
22 /**
23  * InsetOptArg. Used to insert a short version of sectioning header etc.
24  * automatically, or other optional LaTeX arguments
25  */
26 class InsetOptArg : public InsetCollapsable
27 {
28 public:
29         ///
30         InsetOptArg(Buffer const &);
31
32         /// Outputting the optional parameter of a LaTeX command
33         int latexOptional(odocstream &, OutputParams const &) const;
34         ///
35         bool hasSettings() const { return false; }
36
37 private:
38         /// code of the inset
39         InsetCode lyxCode() const { return OPTARG_CODE; }
40         ///
41         docstring name() const { return from_ascii("OptArg"); }
42         /// Standard LaTeX output -- short-circuited
43         int latex(odocstream &, OutputParams const &) const;
44         /// Standard plain text output -- short-circuited
45         int plaintext(odocstream &, OutputParams const &) const;
46         /// Standard DocBook output -- short-circuited
47         int docbook(odocstream &, OutputParams const &) const;
48         /// Standard XHTML output -- short-circuited
49         docstring xhtml(odocstream &, OutputParams const &) const;
50         /// Write out to the .lyx file
51         void write(std::ostream & os) const;
52         /// should paragraph indendation be ommitted in any case?
53         bool neverIndent() const { return true; }
54         ///
55         Inset * clone() const { return new InsetOptArg(*this); }
56 };
57
58
59 } // namespace lyx
60
61 #endif // INSETOPTARG_H