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"
24 /** Used to insert index labels
26 class InsetIndex : public InsetCollapsable {
29 InsetIndex(BufferParams const &);
31 InsetIndex(InsetIndex const &);
33 EDITABLE editable() const { return IS_EDITABLE; }
35 InsetCode lyxCode() const { return INDEX_CODE; }
37 docstring name() const { return from_ascii("Index"); }
39 void write(std::ostream & os) const;
41 int docbook(odocstream &, OutputParams const &) const;
42 /// should paragraph indendation be omitted in any case?
43 bool neverIndent() const { return true; }
45 void addToToc(ParConstIterator const &) const;
48 Inset * clone() const;
52 class InsetPrintIndex : public InsetCommand {
55 InsetPrintIndex(InsetCommandParams const &);
56 /// Updates needed features for this inset.
57 void validate(LaTeXFeatures & features) const;
59 EDITABLE editable() const { return NOT_EDITABLE; }
61 InsetCode lyxCode() const;
63 DisplayType display() const { return AlignCenter; }
65 docstring screenLabel() const;
67 static ParamInfo const & findInfo(std::string const &);
69 static std::string defaultCommand() { return "printindex"; };
71 static bool isCompatibleCommand(std::string const & s)
72 { return s == "printindex"; }
74 Inset * clone() const { return new InsetPrintIndex(params()); }