4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
15 #include "InsetCommand.h"
21 /// Used to insert table of contents and similar lists
22 /// at present, supports only \tableofcontents and \listoflistings.
23 /// Other such commands, such as \listoffigures, are supported
24 /// by InsetFloatList.
25 class InsetTOC : public InsetCommand {
28 InsetTOC(Buffer * buf, InsetCommandParams const &);
30 /// \name Public functions inherited from Inset class
33 InsetCode lyxCode() const { return TOC_CODE; }
35 docstring layoutName() const;
37 DisplayType display() const { return AlignCenter; }
39 virtual void validate(LaTeXFeatures &) const;
41 int plaintext(odocstream &, OutputParams const &) const;
43 int docbook(odocstream &, OutputParams const &) const;
45 docstring xhtml(XHTMLStream & xs, OutputParams const &) const;
47 void doDispatch(Cursor & cur, FuncRequest & cmd);
49 bool clickable(int, int) const { return true; }
52 /// \name Static public methods obligated for InsetCommand derived classes
55 static ParamInfo const & findInfo(std::string const &);
57 static std::string defaultCommand() { return "tableofcontents"; }
59 static bool isCompatibleCommand(std::string const & cmd);
63 /// \name Private functions inherited from Inset class
66 Inset * clone() const { return new InsetTOC(*this); }
69 /// \name Private functions inherited from InsetCommand class
72 docstring screenLabel() const;