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(Buffer const & buf, std::ostream & os) const;
41 int docbook(Buffer const &, odocstream &,
42 OutputParams const &) const;
43 /// should paragraph indendation be omitted in any case?
44 bool neverIndent(Buffer const &) const { return true; }
46 void addToToc(Buffer const &, ParConstIterator const &) const;
49 virtual Inset * clone() const;
53 class InsetPrintIndex : public InsetCommand {
56 InsetPrintIndex(InsetCommandParams const &);
57 /// Updates needed features for this inset.
58 void validate(LaTeXFeatures & features) const;
60 EDITABLE editable() const { return NOT_EDITABLE; }
62 InsetCode lyxCode() const;
64 DisplayType display() const { return AlignCenter; }
66 docstring const getScreenLabel(Buffer const &) const;
68 static ParamInfo const & findInfo(std::string const &);
70 static std::string defaultCommand() { return "printindex"; };
72 static bool isCompatibleCommand(std::string const & s)
73 { return s == "printindex"; }
75 virtual Inset * clone() const {
76 return new InsetPrintIndex(params());