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 Inset::Code lyxCode() const;
38 void metrics(MetricsInfo &, Dimension &) const;
40 void draw(PainterInfo &, int, int) const;
42 docstring name() const { return from_ascii("Index"); }
44 void getDrawFont(Font &) const;
46 void write(Buffer const & buf, std::ostream & os) const;
48 int docbook(Buffer const &, odocstream &,
49 OutputParams const &) const;
50 /// should paragraph indendation be omitted in any case?
51 bool neverIndent(Buffer const &) const { return true; }
55 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
57 virtual Inset * clone() const;
61 class InsetPrintIndex : public InsetCommand {
64 InsetPrintIndex(InsetCommandParams const &);
65 /// Updates needed features for this inset.
66 void validate(LaTeXFeatures & features) const;
68 EDITABLE editable() const { return NOT_EDITABLE; }
70 Inset::Code lyxCode() const;
72 DisplayType display() const { return AlignCenter; }
74 docstring const getScreenLabel(Buffer const &) const;
76 virtual Inset * clone() const {
77 return new InsetPrintIndex(params());