]> git.lyx.org Git - lyx.git/blob - src/insets/InsetNomencl.h
Fix date inset except on windows (bug 9925)
[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         void addToToc(DocIterator const & di, bool output_active,
44                                   UpdateType utype) const;
45         ///
46         InsetCode lyxCode() const { return NOMENCL_CODE; }
47         ///
48         int docbook(odocstream &, OutputParams const &) const;
49         /// Does nothing at the moment.
50         docstring xhtml(XHTMLStream &, OutputParams const &) const;
51         //@}
52
53         /// \name Static public methods obligated for InsetCommand derived classes
54         //@{
55         ///
56         static ParamInfo const & findInfo(std::string const &);
57         ///
58         static std::string defaultCommand() { return "nomenclature"; }
59         ///
60         static bool isCompatibleCommand(std::string const & s) 
61                 { return s == "nomenclature"; }
62         //@}
63
64 private:
65         /// \name Private functions inherited from Inset class
66         //@{
67         ///
68         Inset * clone() const { return new InsetNomencl(*this); }
69         //@}
70
71         /// \name Private functions inherited from InsetCommand class
72         //@{
73         ///
74         docstring screenLabel() const;
75         //@}
76
77         /// unique id for this nomenclature entry for docbook export
78         docstring nomenclature_entry_id;
79 };
80
81
82 class InsetPrintNomencl : public InsetCommand {
83 public:
84         ///
85         InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
86
87         /// \name Public functions inherited from Inset class
88         //@{
89         /// Updates needed features for this inset.
90         void validate(LaTeXFeatures & features) const;
91         ///
92         int docbook(odocstream &, OutputParams const &) const;
93         /// 
94         docstring xhtml(XHTMLStream &, OutputParams const &) const;
95         ///
96         InsetCode lyxCode() const;
97         ///
98         bool hasSettings() const { return true; }
99         ///
100         DisplayType display() const { return AlignCenter; }
101         ///
102         void latex(otexstream &, OutputParams const &) const;
103         ///
104         std::string contextMenuName() const;
105         //@}
106
107         /// \name Static public methods obligated for InsetCommand derived classes
108         //@{
109         ///
110         static ParamInfo const & findInfo(std::string const &);
111         ///
112         static std::string defaultCommand() { return "printnomenclature"; }
113         ///
114         static bool isCompatibleCommand(std::string const & s) 
115                 { return s == "printnomenclature"; }
116         //@}
117
118 private:
119         /// \name Private functions inherited from Inset class
120         //@{
121         ///
122         Inset * clone() const { return new InsetPrintNomencl(*this); }
123         ///
124         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
125         ///
126         void doDispatch(Cursor & cur, FuncRequest & cmd);
127         ///
128         docstring layoutName() const { return from_ascii("PrintNomencl"); }
129         //@}
130
131         /// \name Private functions inherited from InsetCommand class
132         //@{
133         ///
134         docstring screenLabel() const;
135         //@}
136 };
137
138 } // namespace lyx
139
140 #endif