]> git.lyx.org Git - lyx.git/blob - src/insets/InsetNomencl.h
Fix IM window position for a new window (#13094)
[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 #include "InsetCollapsible.h"
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 InsetCollapsible {
27 public:
28         ///
29         InsetNomencl(Buffer * buf);
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         InsetNomencl const * asInsetNomencl() const override { return this; }
53         //@}
54         ///
55         docstring getSymbol() const;
56         ///
57         docstring getDescription() const;
58         ///
59         docstring getPrefix() const;
60
61 private:
62         /// \name Private functions inherited from Inset class
63         //@{
64         ///
65         Inset * clone() const override { return new InsetNomencl(*this); }
66         //@}
67
68         /// \name Private functions inherited from InsetCollapsible class
69         //@{
70         ///
71         docstring layoutName() const override;
72         ///
73         void write(std::ostream & os) const override;
74         //@}
75 };
76
77
78 class InsetPrintNomencl : public InsetCommand {
79 public:
80         ///
81         InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
82
83         /// \name Public functions inherited from Inset class
84         //@{
85         /// Updates needed features for this inset.
86         void validate(LaTeXFeatures & features) const override;
87         ///
88         void docbook(XMLStream &, OutputParams const &) const override;
89         ///
90         docstring xhtml(XMLStream &, OutputParams const &) const override;
91         ///
92         InsetCode lyxCode() const override;
93         ///
94         bool hasSettings() const override;
95         ///
96         int rowFlags() const override { return Display; }
97         ///
98         void latex(otexstream &, OutputParams const &) const override;
99         ///
100         std::string contextMenuName() const override;
101         //@}
102
103         /// \name Static public methods obligated for InsetCommand derived classes
104         //@{
105         ///
106         static ParamInfo const & findInfo(std::string const &);
107         ///
108         static std::string defaultCommand() { return "printnomenclature"; }
109         ///
110         static bool isCompatibleCommand(std::string const & s)
111                 { return s == "printnomenclature"; }
112         //@}
113
114 private:
115         /// \name Private functions inherited from Inset class
116         //@{
117         ///
118         Inset * clone() const override { return new InsetPrintNomencl(*this); }
119         ///
120         bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override;
121         ///
122         void doDispatch(Cursor & cur, FuncRequest & cmd) override;
123         ///
124         docstring layoutName() const override { return from_ascii("PrintNomencl"); }
125         //@}
126
127         /// \name Private functions inherited from InsetCommand class
128         //@{
129         ///
130         docstring screenLabel() const override;
131         //@}
132 };
133
134 } // namespace lyx
135
136 #endif