4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
10 * Full author contact details are available in file CREDITS.
13 #ifndef INSET_NOMENCL_H
14 #define INSET_NOMENCL_H
17 #include "InsetCommand.h"
24 /** Used to insert nomenclature entries
26 class InsetNomencl : public InsetCommand {
29 InsetNomencl(Buffer * buf, InsetCommandParams const &);
31 /// \name Public functions inherited from Inset class
34 docstring toolTip(BufferView const & bv, int x, int y) const override;
36 bool hasSettings() const override { return true; }
37 /// Updates needed features for this inset.
38 void validate(LaTeXFeatures & features) const override;
40 void addToToc(DocIterator const & di, bool output_active,
41 UpdateType utype, TocBackend & backend) const override;
43 InsetCode lyxCode() const override { return NOMENCL_CODE; }
45 int plaintext(odocstringstream & ods, OutputParams const & op,
46 size_t max_length = INT_MAX) const override;
48 void docbook(XMLStream &, OutputParams const &) const override;
49 /// Does nothing at the moment.
50 docstring xhtml(XMLStream &, OutputParams const &) const override;
53 /// \name Static public methods obligated for InsetCommand derived classes
56 static ParamInfo const & findInfo(std::string const &);
58 static std::string defaultCommand() { return "nomenclature"; }
60 static bool isCompatibleCommand(std::string const & s)
61 { return s == "nomenclature"; }
65 /// \name Private functions inherited from Inset class
68 Inset * clone() const override { return new InsetNomencl(*this); }
71 /// \name Private functions inherited from InsetCommand class
74 docstring screenLabel() const override;
79 class InsetPrintNomencl : public InsetCommand {
82 InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
84 /// \name Public functions inherited from Inset class
86 /// Updates needed features for this inset.
87 void validate(LaTeXFeatures & features) const override;
89 void docbook(XMLStream &, OutputParams const &) const override;
91 docstring xhtml(XMLStream &, OutputParams const &) const override;
93 InsetCode lyxCode() const override;
95 bool hasSettings() const override { return true; }
97 RowFlags rowFlags() const override { return Display; }
99 void latex(otexstream &, OutputParams const &) const override;
101 std::string contextMenuName() const override;
104 /// \name Static public methods obligated for InsetCommand derived classes
107 static ParamInfo const & findInfo(std::string const &);
109 static std::string defaultCommand() { return "printnomenclature"; }
111 static bool isCompatibleCommand(std::string const & s)
112 { return s == "printnomenclature"; }
116 /// \name Private functions inherited from Inset class
119 Inset * clone() const override { return new InsetPrintNomencl(*this); }
121 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override;
123 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
125 docstring layoutName() const override { return from_ascii("PrintNomencl"); }
128 /// \name Private functions inherited from InsetCommand class
131 docstring screenLabel() const override;