]> git.lyx.org Git - lyx.git/blob - src/insets/insetindex.h
remove Inset::deletable() as it returns always 'true'
[lyx.git] / src / insets / insetindex.h
1 // -*- C++ -*-
2 /**
3  * \file insetindex.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #ifndef INSET_INDEX_H
13 #define INSET_INDEX_H
14
15
16 #include "insetcommand.h"
17
18 struct LaTeXFeatures;
19
20 /** Used to insert index labels
21   */
22 class InsetIndex : public InsetCommand {
23 public:
24         ///
25         InsetIndex(InsetCommandParams const &, bool same_id = false);
26         ///
27         virtual Inset * clone(Buffer const &, bool same_id = false) const {
28                 return new InsetIndex(params(), same_id);
29         }
30         ///
31         string const getScreenLabel(Buffer const *) const;
32         ///
33         EDITABLE editable() const { return IS_EDITABLE; }
34         ///
35         void edit(BufferView *, int, int, mouse_button::state);
36         ///
37         void edit(BufferView * bv, bool front = true);
38         ///
39         Inset::Code lyxCode() const;
40         ///
41         int docbook(Buffer const *, std::ostream &, bool mixcont) const;
42 };
43
44
45 class InsetPrintIndex : public InsetCommand {
46 public:
47         ///
48         InsetPrintIndex(InsetCommandParams const &, bool same_id = false);
49         ///
50         virtual Inset * clone(Buffer const &, bool same_id = false) const {
51                 return new InsetPrintIndex(params(), same_id);
52         }
53         /// Updates needed features for this inset.
54         void validate(LaTeXFeatures & features) const;
55         ///
56         void edit(BufferView *, int, int, mouse_button::state) {}
57         ///
58         void edit(BufferView *, bool = true) {}
59         ///
60         EDITABLE editable() const { return NOT_EDITABLE; }
61         ///
62         bool display() const { return true; }
63         ///
64         Inset::Code lyxCode() const;
65         ///
66         string const getScreenLabel(Buffer const *) const;
67         ///
68         virtual bool needFullRow() const { return true; }
69 };
70
71 #endif