]> git.lyx.org Git - lyx.git/blob - src/insets/insetindex.C
Remove a whole heap of redundant functions from classes derived from
[lyx.git] / src / insets / insetindex.C
1 /**
2  * \file insetindex.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10 #include <config.h>
11
12 #include "insetindex.h"
13
14 #include "dispatchresult.h"
15 #include "funcrequest.h"
16 #include "gettext.h"
17 #include "LaTeXFeatures.h"
18 #include "metricsinfo.h"
19
20 #include "support/std_ostream.h"
21
22 using std::string;
23 using std::ostream;
24
25
26 InsetIndex::InsetIndex(InsetCommandParams const & p)
27         : InsetCommand(p, "index")
28 {}
29
30
31 // InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
32 //      : InsetCommand(p, false)
33 // {}
34
35
36 string const InsetIndex::getScreenLabel(Buffer const &) const
37 {
38         return _("Idx");
39 }
40
41
42 int InsetIndex::docbook(Buffer const &, ostream & os,
43                         OutputParams const &) const
44 {
45         os << "<indexterm><primary>" << getContents()
46            << "</primary></indexterm>";
47         return 0;
48 }
49
50
51 InsetOld::Code InsetIndex::lyxCode() const
52 {
53         return InsetOld::INDEX_CODE;
54 }
55
56
57
58 InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
59         : InsetCommand(p, string())
60 {}
61
62
63 // InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
64 //      : InsetCommand(p, false)
65 // {}
66
67
68 string const InsetPrintIndex::getScreenLabel(Buffer const &) const
69 {
70         return _("Index");
71 }
72
73
74 void InsetPrintIndex::validate(LaTeXFeatures & features) const
75 {
76         features.require("makeidx");
77 }
78
79
80 InsetOld::Code InsetPrintIndex::lyxCode() const
81 {
82         return InsetOld::INDEX_PRINT_CODE;
83 }