]> git.lyx.org Git - features.git/blob - src/insets/insetindex.h
Angus insetindex patch + protect patch from Dekel
[features.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-2000 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 #include "support/utility.hpp"
21
22 struct LaTeXFeatures;
23
24 /** Used to insert index labels  
25   */
26 class InsetIndex : public InsetCommand, public noncopyable {
27 public:
28         ///
29         InsetIndex(InsetCommandParams const &);
30         ///
31         Inset * Clone() const { return new InsetIndex(params());}
32         ///
33         string getScreenLabel() const;
34         ///
35         EDITABLE Editable() const { return IS_EDITABLE; }
36         ///
37         void Edit(BufferView *, int, int, unsigned int);
38 };
39
40
41 class InsetPrintIndex : public InsetCommand, public noncopyable {
42 public:
43         ///
44         InsetPrintIndex(InsetCommandParams const &);
45         ///
46         Inset * Clone() const { return new InsetPrintIndex(params());}
47         /// Updates needed features for this inset.
48         void Validate(LaTeXFeatures & features) const;
49         ///
50         void Edit(BufferView *, int, int, unsigned int) {}
51         ///
52         EDITABLE Editable() const{ return NOT_EDITABLE; }
53         ///
54         bool display() const { return true; }
55         ///
56         Inset::Code LyxCode() const;
57         ///
58         string getScreenLabel() const;
59 };
60
61 #endif