]> git.lyx.org Git - lyx.git/blob - src/insets/insetnomencl.h
New nomenclature inset from Ugras
[lyx.git] / src / insets / insetnomencl.h
1 // -*- C++ -*-
2 /**
3  * \file insetnomencl.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  * \author O. U. Baran
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef INSET_NOMENCL_H
14 #define INSET_NOMENCL_H
15
16
17 #include "insetcommand.h"
18
19
20 namespace lyx {
21
22 class LaTeXFeatures;
23
24 /** Used to insert notation labels
25   */
26 class InsetNomencl : public InsetCommand {
27 public:
28         ///
29         InsetNomencl(InsetCommandParams const &);
30         ///
31         docstring const getScreenLabel(Buffer const &) const;
32         ///
33         EDITABLE editable() const { return IS_EDITABLE; }
34         /// Updates needed features for this inset.
35         void validate(LaTeXFeatures & features) const;
36         ///
37         InsetBase::Code lyxCode() const;
38         ///
39         int docbook(Buffer const &, odocstream &,
40                     OutputParams const &) const;
41 private:
42         virtual std::auto_ptr<InsetBase> doClone() const {
43                 return std::auto_ptr<InsetBase>(new InsetNomencl(params()));
44         }
45 };
46
47
48 class InsetPrintNomencl : public InsetCommand {
49 public:
50         ///
51         InsetPrintNomencl(InsetCommandParams const &);
52         /// Updates needed features for this inset.
53         void validate(LaTeXFeatures & features) const;
54         // FIXME: This should be editable to set the label width (stored
55         // in params_["labelwidth"]).
56         // Currently the width can be read from file and written, but not
57         // changed.
58         ///
59         EDITABLE editable() const { return NOT_EDITABLE; }
60         ///
61         int docbook(Buffer const &, odocstream &,
62                     OutputParams const &) const;
63         ///
64         InsetBase::Code lyxCode() const;
65         ///
66         bool display() const { return true; }
67         ///
68         docstring const getScreenLabel(Buffer const &) const;
69 private:
70         virtual std::auto_ptr<InsetBase> doClone() const {
71                 return std::auto_ptr<InsetBase>(new InsetPrintNomencl(params()));
72         }
73 };
74
75
76 } // namespace lyx
77
78 #endif