]> git.lyx.org Git - lyx.git/blob - src/insets/insetindex.h
Hopefully fixed the redo problems with insets!
[lyx.git] / src / insets / insetindex.h
1 // -*- C++ -*-
2 /* This file is part of*
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *       
7  *          Copyright 1995 Matthias Ettrich
8  *          Copyright 1996-2001 the LyX Team.
9  * 
10  * ====================================================== */
11
12 #ifndef INSET_INDEX_H
13 #define INSET_INDEX_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "insetcommand.h"
20
21 struct LaTeXFeatures;
22
23 /** Used to insert index labels  
24   */
25 class InsetIndex : public InsetCommand {
26 public:
27         ///
28         InsetIndex(InsetCommandParams const &, bool same_id = false);
29         ///
30         virtual Inset * clone(Buffer const &, bool same_id = false) const {
31                 return new InsetIndex(params(), same_id);
32         }
33         ///
34         string const getScreenLabel(Buffer const *) const;
35         ///
36         EDITABLE editable() const { return IS_EDITABLE; }
37         ///
38         void edit(BufferView *, int, int, unsigned int);
39         ///
40         void edit(BufferView * bv, bool front = true);
41         ///
42         Inset::Code lyxCode() const;
43         ///
44         int docbook(Buffer const *, std::ostream &) const;
45 };
46
47
48 class InsetPrintIndex : public InsetCommand {
49 public:
50         ///
51         InsetPrintIndex(InsetCommandParams const &, bool same_id = false);
52         ///
53         virtual Inset * clone(Buffer const &, bool same_id = false) const {
54                 return new InsetPrintIndex(params(), same_id);
55         }
56         /// Updates needed features for this inset.
57         void validate(LaTeXFeatures & features) const;
58         ///
59         void edit(BufferView *, int, int, unsigned int) {}
60         ///
61         void edit(BufferView *, bool = true) {}
62         ///
63         EDITABLE editable() const{ return NOT_EDITABLE; }
64         ///
65         bool display() const { return true; }
66         ///
67         Inset::Code lyxCode() const;
68         ///
69         string const getScreenLabel(Buffer const *) const;
70 };
71
72 #endif