]> git.lyx.org Git - lyx.git/blob - src/insets/InsetNomencl.h
Strip et al. for citation search
[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         /// \name Public functions inherited from Inset class
32         //@{
33         ///
34         docstring toolTip(BufferView const & bv, int x, int y) const override;
35         ///
36         bool hasSettings() const override { return true; }
37         /// Updates needed features for this inset.
38         void validate(LaTeXFeatures & features) const override;
39         ///
40         void addToToc(DocIterator const & di, bool output_active,
41                                   UpdateType utype, TocBackend & backend) const override;
42         ///
43         InsetCode lyxCode() const override { return NOMENCL_CODE; }
44         ///
45         int plaintext(odocstringstream & ods, OutputParams const & op,
46                       size_t max_length = INT_MAX) const override;
47         ///
48         void docbook(XMLStream &, OutputParams const &) const override;
49         /// Does nothing at the moment.
50         docstring xhtml(XMLStream &, OutputParams const &) const override;
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 override { return new InsetNomencl(*this); }
69         //@}
70
71         /// \name Private functions inherited from InsetCommand class
72         //@{
73         ///
74         docstring screenLabel() const override;
75         //@}
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 override;
88         ///
89         void docbook(XMLStream &, OutputParams const &) const override;
90         ///
91         docstring xhtml(XMLStream &, OutputParams const &) const override;
92         ///
93         InsetCode lyxCode() const override;
94         ///
95         bool hasSettings() const override { return true; }
96         ///
97         int rowFlags() const override { return Display; }
98         ///
99         void latex(otexstream &, OutputParams const &) const override;
100         ///
101         std::string contextMenuName() const override;
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 override { return new InsetPrintNomencl(*this); }
120         ///
121         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override;
122         ///
123         void doDispatch(Cursor & cur, FuncRequest & cmd) override;
124         ///
125         docstring layoutName() const override { return from_ascii("PrintNomencl"); }
126         //@}
127
128         /// \name Private functions inherited from InsetCommand class
129         //@{
130         ///
131         docstring screenLabel() const override;
132         //@}
133 };
134
135 } // namespace lyx
136
137 #endif