]> git.lyx.org Git - lyx.git/blob - src/insets/insetindex.h
The speed patch: redraw only rows that have changed
[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 class LaTeXFeatures;
19
20 /** Used to insert index labels
21   */
22 class InsetIndex : public InsetCommand {
23 public:
24         ///
25         InsetIndex(InsetCommandParams const &);
26         ///
27         std::string const getScreenLabel(Buffer const &) const;
28         ///
29         EDITABLE editable() const { return IS_EDITABLE; }
30         ///
31         InsetBase::Code lyxCode() const;
32         ///
33         int docbook(Buffer const &, std::ostream &,
34                     OutputParams const &) const;
35 private:
36         virtual std::auto_ptr<InsetBase> doClone() const {
37                 return std::auto_ptr<InsetBase>(new InsetIndex(params()));
38         }
39 };
40
41
42 class InsetPrintIndex : public InsetCommand {
43 public:
44         ///
45         InsetPrintIndex(InsetCommandParams const &);
46         /// Updates needed features for this inset.
47         void validate(LaTeXFeatures & features) const;
48         ///
49         EDITABLE editable() const { return NOT_EDITABLE; }
50         ///
51         InsetBase::Code lyxCode() const;
52         ///
53         bool display() const { return true; }
54         ///
55         std::string const getScreenLabel(Buffer const &) const;
56 private:
57         virtual std::auto_ptr<InsetBase> doClone() const {
58                 return std::auto_ptr<InsetBase>(new InsetPrintIndex(params()));
59         }
60 };
61
62 #endif