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