]> git.lyx.org Git - lyx.git/blob - src/insets/InsetNomencl.h
Cleanup mouse/selection/context-menu interactions.
[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 nomenclature entries
25   */
26 class InsetNomencl : public InsetCommand {
27 public:
28         ///
29         InsetNomencl(InsetCommandParams const &);
30         ///
31         docstring screenLabel() const;
32         ///
33         EDITABLE editable() const { return IS_EDITABLE; }
34         /// Updates needed features for this inset.
35         void validate(LaTeXFeatures & features) const;
36         ///
37         InsetCode lyxCode() const { return NOMENCL_CODE; }
38         ///
39         int docbook(odocstream &, OutputParams const &) const;
40         ///
41         int docbookGlossary(odocstream &) const;
42         ///
43         static ParamInfo const & findInfo(std::string const &);
44         ///
45         static std::string defaultCommand() { return "nomenclature"; };
46         ///
47         static bool isCompatibleCommand(std::string const & s) 
48                 { return s == "nomenclature"; }
49 private:
50         Inset * clone() const { return new InsetNomencl(*this); }
51         /// unique id for this nomenclature entry for docbook export
52         docstring nomenclature_entry_id;
53 };
54
55
56 class InsetPrintNomencl : public InsetCommand {
57 public:
58         ///
59         InsetPrintNomencl(InsetCommandParams const &);
60         /// Updates needed features for this inset.
61         void validate(LaTeXFeatures & features) const;
62         // FIXME: This should be editable to set the label width (stored
63         // in params_["labelwidth"]).
64         // Currently the width can be read from file and written, but not
65         // changed.
66         ///
67         EDITABLE editable() const { return NOT_EDITABLE; }
68         ///
69         int docbook(odocstream &, OutputParams const &) const;
70         ///
71         InsetCode lyxCode() const;
72         ///
73         DisplayType display() const { return AlignCenter; }
74         ///
75         docstring screenLabel() const;
76         ///
77         static ParamInfo const & findInfo(std::string const &);
78         ///
79         static std::string defaultCommand() { return "printnomenclature"; };
80         ///
81         static bool isCompatibleCommand(std::string const & s) 
82                 { return s == "printnomenclature"; }
83 private:
84         Inset * clone() const { return new InsetPrintNomencl(*this); }
85 };
86
87
88 } // namespace lyx
89
90 #endif