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