]> git.lyx.org Git - lyx.git/blob - src/insets/InsetIndex.h
s/cellstruct/CellData/g
[lyx.git] / src / insets / InsetIndex.h
1 // -*- C++ -*-
2 /**
3  * \file InsetIndex.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_INDEX_H
13 #define INSET_INDEX_H
14
15
16 #include "InsetCollapsable.h"
17 #include "InsetCommand.h"
18
19
20 namespace lyx {
21
22 class LaTeXFeatures;
23
24 /** Used to insert index labels
25   */
26 class InsetIndex : public InsetCollapsable {
27 public:
28         ///
29         InsetIndex(BufferParams const &);
30         ///
31         InsetIndex(InsetIndex const &);
32         ///
33         EDITABLE editable() const { return IS_EDITABLE; }
34         ///
35         InsetCode lyxCode() const { return INDEX_CODE; }
36         ///
37         docstring name() const { return from_ascii("Index"); }
38         ///
39         void write(std::ostream & os) const;
40         ///
41         int docbook(odocstream &, OutputParams const &) const;
42         /// should paragraph indendation be omitted in any case?
43         bool neverIndent() const { return true; }
44         ///
45         void addToToc(ParConstIterator const &) const;
46 private:
47         ///
48         Inset * clone() const;
49 };
50
51
52 class InsetPrintIndex : public InsetCommand {
53 public:
54         ///
55         InsetPrintIndex(InsetCommandParams const &);
56         /// Updates needed features for this inset.
57         void validate(LaTeXFeatures & features) const;
58         ///
59         EDITABLE editable() const { return NOT_EDITABLE; }
60         ///
61         InsetCode lyxCode() const;
62         ///
63         DisplayType display() const { return AlignCenter; }
64         ///
65         docstring screenLabel() const;
66         ///
67         static ParamInfo const & findInfo(std::string const &);
68         ///
69         static std::string defaultCommand() { return "printindex"; };
70         ///
71         static bool isCompatibleCommand(std::string const & s) 
72                 { return s == "printindex"; }
73 private:
74         Inset * clone() const { return new InsetPrintIndex(params()); }
75 };
76
77
78 } // namespace lyx
79
80 #endif