]> git.lyx.org Git - lyx.git/blob - src/insets/InsetNomencl.h
Rename insets/insetxxx to insets/InsetXxx, part 2
[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 glossary 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         ///
42         int docbookGlossary(odocstream &) const;
43 private:
44         virtual std::auto_ptr<InsetBase> doClone() const {
45                 return std::auto_ptr<InsetBase>(new InsetNomencl(params()));
46         }
47         /// unique id for this glossary entry for docbook export
48         docstring glossary_entry_id;
49 };
50
51
52 class InsetPrintNomencl : public InsetCommand {
53 public:
54         ///
55         InsetPrintNomencl(InsetCommandParams const &);
56         /// Updates needed features for this inset.
57         void validate(LaTeXFeatures & features) const;
58         // FIXME: This should be editable to set the label width (stored
59         // in params_["labelwidth"]).
60         // Currently the width can be read from file and written, but not
61         // changed.
62         ///
63         EDITABLE editable() const { return NOT_EDITABLE; }
64         ///
65         int docbook(Buffer const &, odocstream &,
66                     OutputParams const &) const;
67         ///
68         InsetBase::Code lyxCode() const;
69         ///
70         bool display() const { return true; }
71         ///
72         docstring const getScreenLabel(Buffer const &) const;
73 private:
74         virtual std::auto_ptr<InsetBase> doClone() const {
75                 return std::auto_ptr<InsetBase>(new InsetPrintNomencl(params()));
76         }
77 };
78
79
80 } // namespace lyx
81
82 #endif