]> git.lyx.org Git - lyx.git/blob - src/insets/insetindex.h
My patch from yesterday
[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         ~InsetIndex();
28         ///
29         virtual Inset * clone(Buffer const &, bool same_id = false) const {
30                 return new InsetIndex(params(), same_id);
31         }
32         ///
33         string const getScreenLabel(Buffer const *) const;
34         ///
35         EDITABLE editable() const { return IS_EDITABLE; }
36         ///
37         void edit(BufferView *, int, int, mouse_button::state);
38         ///
39         void edit(BufferView * bv, bool front = true);
40         ///
41         Inset::Code lyxCode() const;
42         ///
43         int docbook(Buffer const *, std::ostream &, bool mixcont) const;
44 };
45
46
47 class InsetPrintIndex : public InsetCommand {
48 public:
49         ///
50         InsetPrintIndex(InsetCommandParams const &, bool same_id = false);
51         ///
52         virtual Inset * clone(Buffer const &, bool same_id = false) const {
53                 return new InsetPrintIndex(params(), same_id);
54         }
55         /// Updates needed features for this inset.
56         void validate(LaTeXFeatures & features) const;
57         ///
58         void edit(BufferView *, int, int, mouse_button::state) {}
59         ///
60         void edit(BufferView *, bool = true) {}
61         ///
62         EDITABLE editable() const { return NOT_EDITABLE; }
63         ///
64         bool display() const { return true; }
65         ///
66         Inset::Code lyxCode() const;
67         ///
68         string const getScreenLabel(Buffer const *) const;
69         ///
70         virtual bool needFullRow() const { return true; }
71 };
72
73 #endif