4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
9 * Full author contact details are available in file CREDITS.
16 #include "InsetCollapsable.h"
17 #include "InsetCommand.h"
22 /** Used to insert index labels
24 class InsetIndex : public InsetCollapsable {
27 InsetIndex(Buffer const &);
30 EDITABLE editable() const { return IS_EDITABLE; }
32 InsetCode lyxCode() const { return INDEX_CODE; }
34 docstring name() const { return from_ascii("Index"); }
36 void write(std::ostream & os) const;
38 int docbook(odocstream &, OutputParams const &) const;
39 /// should paragraph indendation be omitted in any case?
40 bool neverIndent() const { return true; }
42 void addToToc(ParConstIterator const &) const;
44 Inset * clone() const { return new InsetIndex(*this); }
48 class InsetPrintIndex : public InsetCommand {
51 InsetPrintIndex(InsetCommandParams const &);
54 static ParamInfo const & findInfo(std::string const &);
56 static std::string defaultCommand() { return "printindex"; };
58 static bool isCompatibleCommand(std::string const & s)
59 { return s == "printindex"; }
61 /// Updates needed features for this inset.
62 void validate(LaTeXFeatures & features) const;
64 EDITABLE editable() const { return NOT_EDITABLE; }
66 InsetCode lyxCode() const;
68 DisplayType display() const { return AlignCenter; }
70 docstring screenLabel() const;
72 Inset * clone() const { return new InsetPrintIndex(*this); }