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 HIGHLY_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;
40 int latex(odocstream &, OutputParams const &) const;
41 /// should paragraph indendation be omitted in any case?
42 bool neverIndent() const { return true; }
43 /// should paragraphs be forced to use the empty layout?
44 virtual bool forcePlainLayout(idx_type = 0) const { return true; }
45 /// should the user be allowed to customize alignment, etc.?
46 virtual bool allowParagraphCustomization(idx_type = 0) const { return false; }
48 void addToToc(DocIterator const &);
50 Inset * clone() const { return new InsetIndex(*this); }
54 class InsetPrintIndex : public InsetCommand {
57 InsetPrintIndex(InsetCommandParams const &);
60 static ParamInfo const & findInfo(std::string const &);
62 static std::string defaultCommand() { return "printindex"; };
64 static bool isCompatibleCommand(std::string const & s)
65 { return s == "printindex"; }
67 /// Updates needed features for this inset.
68 void validate(LaTeXFeatures & features) const;
70 EDITABLE editable() const { return NOT_EDITABLE; }
72 InsetCode lyxCode() const;
74 DisplayType display() const { return AlignCenter; }
76 docstring screenLabel() const;
78 Inset * clone() const { return new InsetPrintIndex(*this); }