]> git.lyx.org Git - lyx.git/blob - src/insets/InsetNomencl.h
Fix some bugs in the bibinfo caching mechanism. Comments to follow.
[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         docstring screenLabel() const;
32         ///
33         docstring toolTip(BufferView const & bv, int x, int y) const;
34         ///
35         bool hasSettings() const { return true; }
36         /// Updates needed features for this inset.
37         void validate(LaTeXFeatures & features) const;
38         ///
39         InsetCode lyxCode() const { return NOMENCL_CODE; }
40         ///
41         int docbook(odocstream &, OutputParams const &) const;
42         /// Does nothing at the moment.
43         docstring xhtml(XHTMLStream &, OutputParams const &) const;
44         ///
45         int docbookGlossary(odocstream &) const;
46         ///
47         static ParamInfo const & findInfo(std::string const &);
48         ///
49         static std::string defaultCommand() { return "nomenclature"; };
50         ///
51         static bool isCompatibleCommand(std::string const & s) 
52                 { return s == "nomenclature"; }
53 private:
54         Inset * clone() const { return new InsetNomencl(*this); }
55         /// unique id for this nomenclature entry for docbook export
56         docstring nomenclature_entry_id;
57 };
58
59
60 class InsetPrintNomencl : public InsetCommand {
61 public:
62         ///
63         InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
64         /// Updates needed features for this inset.
65         void validate(LaTeXFeatures & features) const;
66         ///
67         int docbook(odocstream &, OutputParams const &) const;
68         /// Does nothing at the moment.
69         docstring xhtml(XHTMLStream &, OutputParams const &) const;
70         ///
71         InsetCode lyxCode() const;
72         ///
73         bool hasSettings() const { return true; }
74         ///
75         DisplayType display() const { return AlignCenter; }
76         ///
77         docstring screenLabel() const;
78         ///
79         static ParamInfo const & findInfo(std::string const &);
80         ///
81         static std::string defaultCommand() { return "printnomenclature"; };
82         ///
83         static bool isCompatibleCommand(std::string const & s) 
84                 { return s == "printnomenclature"; }
85         ///
86         int latex(odocstream &, OutputParams const &) const;
87         ///
88         docstring contextMenu(BufferView const & bv, int x, int y) const;
89 protected:
90         ///
91         void doDispatch(Cursor & cur, FuncRequest & cmd);
92         ///
93         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
94 private:
95         Inset * clone() const { return new InsetPrintNomencl(*this); }
96 };
97
98 } // namespace lyx
99
100 #endif