]> git.lyx.org Git - lyx.git/blob - src/insets/InsetNomencl.h
Fix bug #6315: counters in insets that don't produce output have ghost values.
[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(Buffer * buf, InsetCommandParams const &);
30
31         ///
32         int docbookGlossary(odocstream &) const;
33
34         /// \name Public functions inherited from Inset class
35         //@{
36         ///
37         docstring toolTip(BufferView const & bv, int x, int y) const;
38         ///
39         bool hasSettings() const { return true; }
40         /// Updates needed features for this inset.
41         void validate(LaTeXFeatures & features) const;
42         ///
43         InsetCode lyxCode() const { return NOMENCL_CODE; }
44         ///
45         int docbook(odocstream &, OutputParams const &) const;
46         /// Does nothing at the moment.
47         docstring xhtml(XHTMLStream &, OutputParams const &) const;
48         //@}
49
50         /// \name Static public methods obligated for InsetCommand derived classes
51         //@{
52         ///
53         static ParamInfo const & findInfo(std::string const &);
54         ///
55         static std::string defaultCommand() { return "nomenclature"; };
56         ///
57         static bool isCompatibleCommand(std::string const & s) 
58                 { return s == "nomenclature"; }
59         //@}
60
61 private:
62         /// \name Private functions inherited from Inset class
63         //@{
64         ///
65         Inset * clone() const { return new InsetNomencl(*this); }
66         //@}
67
68         /// \name Private functions inherited from InsetCommand class
69         //@{
70         ///
71         docstring screenLabel() const;
72         //@}
73
74         /// unique id for this nomenclature entry for docbook export
75         docstring nomenclature_entry_id;
76 };
77
78
79 class InsetPrintNomencl : public InsetCommand {
80 public:
81         ///
82         InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
83
84         /// \name Public functions inherited from Inset class
85         //@{
86         /// Updates needed features for this inset.
87         void validate(LaTeXFeatures & features) const;
88         ///
89         int docbook(odocstream &, OutputParams const &) const;
90         /// Does nothing at the moment.
91         docstring xhtml(XHTMLStream &, OutputParams const &) const;
92         ///
93         InsetCode lyxCode() const;
94         ///
95         bool hasSettings() const { return true; }
96         ///
97         DisplayType display() const { return AlignCenter; }
98         ///
99         int latex(odocstream &, OutputParams const &) const;
100         ///
101         docstring contextMenu(BufferView const & bv, int x, int y) const;
102         //@}
103
104         /// \name Static public methods obligated for InsetCommand derived classes
105         //@{
106         ///
107         static ParamInfo const & findInfo(std::string const &);
108         ///
109         static std::string defaultCommand() { return "printnomenclature"; };
110         ///
111         static bool isCompatibleCommand(std::string const & s) 
112                 { return s == "printnomenclature"; }
113         //@}
114
115 private:
116         /// \name Private functions inherited from Inset class
117         //@{
118         ///
119         Inset * clone() const { return new InsetPrintNomencl(*this); }
120         ///
121         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
122         ///
123         void doDispatch(Cursor & cur, FuncRequest & cmd);
124         //@}
125
126         /// \name Private functions inherited from InsetCommand class
127         //@{
128         ///
129         docstring screenLabel() const;
130         //@}
131 };
132
133 } // namespace lyx
134
135 #endif