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