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"
16 #include "FuncStatus.h"
18 #include "LaTeXFeatures.h"
19 #include "MetricsInfo.h"
22 #include "support/std_ostream.h"
31 InsetIndex::InsetIndex(BufferParams const & bp)
32 : InsetCollapsable(bp)
38 InsetIndex::InsetIndex(InsetIndex const & in)
39 : InsetCollapsable(in)
43 int InsetIndex::docbook(Buffer const & buf, odocstream & os,
44 OutputParams const & runparams) const
46 os << "<indexterm><primary>";
47 int const i = InsetText::docbook(buf, os, runparams);
48 os << "</primary></indexterm>";
53 Inset * InsetIndex::clone() const
55 return new InsetIndex(*this);
59 void InsetIndex::write(Buffer const & buf, std::ostream & os) const
61 os << to_utf8(name()) << "\n";
62 InsetCollapsable::write(buf, os);
66 InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
67 : InsetCommand(p, string())
71 CommandInfo const * InsetPrintIndex::findInfo(std::string const & /* cmdName */)
73 static const char * const paramnames[] = {"name", ""};
74 static const bool isoptional[] = {false};
75 static const CommandInfo info = {1, paramnames, isoptional};
80 docstring const InsetPrintIndex::getScreenLabel(Buffer const &) const
86 void InsetPrintIndex::validate(LaTeXFeatures & features) const
88 features.require("makeidx");
92 InsetCode InsetPrintIndex::lyxCode() const
94 return INDEX_PRINT_CODE;