3 * \file InsetArgument.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Martin Vermeer
9 * Full author contact details are available in file CREDITS.
12 #ifndef INSETARGUMENT_H
13 #define INSETARGUMENT_H
16 #include "InsetCollapsable.h"
23 * InsetArgument. Used to insert a short version of sectioning header etc.
24 * automatically, or other optional LaTeX arguments
26 class InsetArgument : public InsetCollapsable
30 InsetArgument(Buffer *, std::string const &);
32 /// Outputting the parameter of a LaTeX command
33 void latexArgument(otexstream &, OutputParams const &,
34 docstring const&, docstring const &) const;
36 std::string name() const { return name_; }
38 /// \name Public functions inherited from Inset class
41 bool hasSettings() const { return false; }
43 InsetCode lyxCode() const { return ARG_CODE; }
45 docstring layoutName() const { return from_ascii("Argument"); }
46 /// Update the label string of this inset
47 void updateBuffer(ParIterator const &, UpdateType);
49 void latex(otexstream &, OutputParams const &) const { }
51 int plaintext(odocstream &, OutputParams const &) const { return 0; }
53 int docbook(odocstream &, OutputParams const &) const { return 0; }
55 docstring xhtml(XHTMLStream &, OutputParams const &) const
56 { return docstring(); }
58 void write(std::ostream & os) const;
60 void read(Lexer & lex);
62 bool neverIndent() const { return true; }
64 /// \name Public functions inherited from InsetCollapsable class
67 void setButtonLabel();
72 docstring toolTip(BufferView const & bv, int, int) const;
76 docstring labelstring_;
81 /// \name Protected functions inherited from Inset class
84 Inset * clone() const { return new InsetArgument(*this); }
91 #endif // INSETARGUMENT_H