3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Lars Gullik Bjønnes
8 * Full author contact details are available in file CREDITS.
12 #include "insetindex.h"
14 #include "dispatchresult.h"
15 #include "funcrequest.h"
17 #include "LaTeXFeatures.h"
18 #include "metricsinfo.h"
21 #include "support/std_ostream.h"
24 using lyx::odocstream;
30 InsetIndex::InsetIndex(InsetCommandParams const & p)
31 : InsetCommand(p, "index")
35 // InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
36 // : InsetCommand(p, false)
40 docstring const InsetIndex::getScreenLabel(Buffer const &) const
46 int InsetIndex::docbook(Buffer const &, odocstream & os,
47 OutputParams const &) const
50 os << "<indexterm><primary>"
51 << lyx::from_ascii(sgml::escapeString(getContents()))
52 << "</primary></indexterm>";
57 InsetBase::Code InsetIndex::lyxCode() const
59 return InsetBase::INDEX_CODE;
64 InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
65 : InsetCommand(p, string())
69 // InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
70 // : InsetCommand(p, false)
74 docstring const InsetPrintIndex::getScreenLabel(Buffer const &) const
80 void InsetPrintIndex::validate(LaTeXFeatures & features) const
82 features.require("makeidx");
86 InsetBase::Code InsetPrintIndex::lyxCode() const
88 return InsetBase::INDEX_PRINT_CODE;