]> git.lyx.org Git - lyx.git/blob - src/insets/InsetTOC.h
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetTOC.h
1 // -*- C++ -*-
2 /**
3  * \file InsetTOC.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef INSET_TOC_H
13 #define INSET_TOC_H
14
15 #include "InsetCommand.h"
16
17
18 namespace lyx {
19
20
21 /// Used to insert table of contents and similar lists
22 class InsetTOC : public InsetCommand {
23 public:
24         ///
25         explicit InsetTOC(InsetCommandParams const &);
26         ///
27         docstring const getScreenLabel(Buffer const &) const;
28         ///
29         EDITABLE editable() const { return IS_EDITABLE; }
30         ///
31         InsetCode lyxCode() const { return TOC_CODE; }
32         ///
33         DisplayType display() const { return AlignCenter; }
34         ///
35         int plaintext(Buffer const &, odocstream &,
36                       OutputParams const &) const;
37         ///
38         int docbook(Buffer const &, odocstream &,
39                     OutputParams const &) const;
40         ///
41         static CommandInfo const * findInfo(std::string const &);
42         ///
43         static std::string defaultCommand() { return "tableofcontents"; };
44         ///
45         static bool isCompatibleCommand(std::string const & cmd)
46                 {return cmd == defaultCommand(); }
47 private:
48         virtual Inset * clone() const;
49 };
50
51
52 } // namespace lyx
53
54 #endif