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; }
47 virtual Inset * clone() const;
51 class InsetPrintIndex : public InsetCommand {
54 InsetPrintIndex(InsetCommandParams const &);
55 /// Updates needed features for this inset.
56 void validate(LaTeXFeatures & features) const;
58 EDITABLE editable() const { return NOT_EDITABLE; }
60 InsetCode lyxCode() const;
62 DisplayType display() const { return AlignCenter; }
64 docstring const getScreenLabel(Buffer const &) const;
66 static CommandInfo const * findInfo(std::string const & cmdName = "");
68 static std::string defaultCommand() { return "printindex"; };
70 static bool isCompatibleCommand(std::string const & s)
71 { return s == "printindex"; }
73 virtual Inset * clone() const {
74 return new InsetPrintIndex(params());