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"
17 #include "support/gettext.h"
18 #include "LaTeXFeatures.h"
19 #include "MetricsInfo.h"
29 InsetIndex::InsetIndex(BufferParams const & bp)
30 : InsetCollapsable(bp)
34 InsetIndex::InsetIndex(InsetIndex const & in)
35 : InsetCollapsable(in)
39 int InsetIndex::docbook(Buffer const & buf, odocstream & os,
40 OutputParams const & runparams) const
42 os << "<indexterm><primary>";
43 int const i = InsetText::docbook(buf, os, runparams);
44 os << "</primary></indexterm>";
49 Inset * InsetIndex::clone() const
51 return new InsetIndex(*this);
55 void InsetIndex::write(Buffer const & buf, ostream & os) const
57 os << to_utf8(name()) << "\n";
58 InsetCollapsable::write(buf, os);
62 InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
63 : InsetCommand(p, string())
67 CommandInfo const * InsetPrintIndex::findInfo(string const & /* cmdName */)
69 static const char * const paramnames[] = {"name", ""};
70 static const bool isoptional[] = {false};
71 static const CommandInfo info = {1, paramnames, isoptional};
76 docstring const InsetPrintIndex::getScreenLabel(Buffer const &) const
82 void InsetPrintIndex::validate(LaTeXFeatures & features) const
84 features.require("makeidx");
88 InsetCode InsetPrintIndex::lyxCode() const
90 return INDEX_PRINT_CODE;