]> git.lyx.org Git - lyx.git/blob - src/insets/insetnomencl.C
* src/insets/insetbox.C (InsetBox::doDispatch): remove annoying debug message
[lyx.git] / src / insets / insetnomencl.C
1 /**
2  * \file insetnomencl.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Lars Gullik Bjønnes
7  * \author O. U. Baran
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11 #include <config.h>
12
13 #include "insetnomencl.h"
14
15 #include "dispatchresult.h"
16 #include "funcrequest.h"
17 #include "gettext.h"
18 #include "LaTeXFeatures.h"
19 #include "metricsinfo.h"
20 #include "sgml.h"
21
22
23 namespace lyx {
24
25 using std::string;
26
27
28 InsetNomencl::InsetNomencl(InsetCommandParams const & p)
29         : InsetCommand(p, "nomenclature")
30 {}
31
32
33 docstring const InsetNomencl::getScreenLabel(Buffer const &) const
34 {
35         return _("Glo");
36 }
37
38
39 int InsetNomencl::docbook(Buffer const &, odocstream & os,
40                         OutputParams const &) const
41 {
42         // FIXME: This does not work, because the entry needs to be put
43         // in the glossary.
44 #if 0
45         os << "<glossentry><glossterm>"
46            << sgml::escapeString(getParam("symbol"))
47            << "</glossterm><glossdef><para>"
48            << sgml::escapeString(getParam("description"))
49            << "</para></glossdef></glossentry>";
50 #endif
51         return 0;
52 }
53
54
55 void InsetNomencl::validate(LaTeXFeatures & features) const
56 {
57         features.require("nomencl");
58 }
59
60
61 InsetBase::Code InsetNomencl::lyxCode() const
62 {
63         return InsetBase::NOMENCL_CODE;
64 }
65
66
67 InsetPrintNomencl::InsetPrintNomencl(InsetCommandParams const & p)
68         : InsetCommand(p, string())
69 {}
70
71
72 docstring const InsetPrintNomencl::getScreenLabel(Buffer const &) const
73 {
74         return _("Glossary");
75 }
76
77
78 int InsetPrintNomencl::docbook(Buffer const &, odocstream & os,
79                 OutputParams const &) const
80 {
81         // FIXME This does not work, we need to define the entries here.
82         //os << "<glossary><glossary/>";
83         return 0;
84 }
85
86
87 void InsetPrintNomencl::validate(LaTeXFeatures & features) const
88 {
89         features.require("nomencl");
90 }
91
92
93 InsetBase::Code InsetPrintNomencl::lyxCode() const
94 {
95         return InsetBase::NOMENCL_PRINT_CODE;
96 }
97
98
99 } // namespace lyx