2 /* This file is part of*
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1996-2001 the LyX Team.
10 * ====================================================== */
19 #include "insetcommand.h"
23 /** Used to insert index labels
25 class InsetIndex : public InsetCommand {
28 InsetIndex(InsetCommandParams const &, bool same_id = false);
30 virtual Inset * clone(Buffer const &, bool same_id = false) const {
31 return new InsetIndex(params(), same_id);
34 string const getScreenLabel(Buffer const *) const;
36 EDITABLE editable() const { return IS_EDITABLE; }
38 void edit(BufferView *, int, int, unsigned int);
40 void edit(BufferView * bv, bool front = true);
42 Inset::Code lyxCode() const;
44 int docbook(Buffer const *, std::ostream &) const;
48 class InsetPrintIndex : public InsetCommand {
51 InsetPrintIndex(InsetCommandParams const &, bool same_id = false);
53 virtual Inset * clone(Buffer const &, bool same_id = false) const {
54 return new InsetPrintIndex(params(), same_id);
56 /// Updates needed features for this inset.
57 void validate(LaTeXFeatures & features) const;
59 void edit(BufferView *, int, int, unsigned int) {}
61 void edit(BufferView *, bool = true) {}
63 EDITABLE editable() const { return NOT_EDITABLE; }
65 bool display() const { return true; }
67 Inset::Code lyxCode() const;
69 string const getScreenLabel(Buffer const *) const;
71 virtual bool needFullRow() const { return true; }