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)
36 InsetIndex::InsetIndex(InsetIndex const & in)
37 : InsetCollapsable(in)
41 int InsetIndex::docbook(Buffer const & buf, odocstream & os,
42 OutputParams const & runparams) const
44 os << "<indexterm><primary>";
45 int const i = InsetText::docbook(buf, os, runparams);
46 os << "</primary></indexterm>";
51 Inset * InsetIndex::clone() const
53 return new InsetIndex(*this);
57 void InsetIndex::write(Buffer const & buf, std::ostream & os) const
59 os << to_utf8(name()) << "\n";
60 InsetCollapsable::write(buf, os);
64 InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
65 : InsetCommand(p, string())
69 CommandInfo const * InsetPrintIndex::findInfo(std::string const & /* cmdName */)
71 static const char * const paramnames[] = {"name", ""};
72 static const bool isoptional[] = {false};
73 static const CommandInfo info = {1, paramnames, isoptional};
78 docstring const InsetPrintIndex::getScreenLabel(Buffer const &) const
84 void InsetPrintIndex::validate(LaTeXFeatures & features) const
86 features.require("makeidx");
90 InsetCode InsetPrintIndex::lyxCode() const
92 return INDEX_PRINT_CODE;