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;
77 /// unique id for this nomenclature entry for docbook export
78 docstring nomenclature_entry_id;
82 class InsetPrintNomencl : public InsetCommand {
85 InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
87 /// \name Public functions inherited from Inset class
89 /// Updates needed features for this inset.
90 void validate(LaTeXFeatures & features) const override;
92 void docbook(XMLStream &, OutputParams const &) const override;
94 docstring xhtml(XMLStream &, OutputParams const &) const override;
96 InsetCode lyxCode() const override;
98 bool hasSettings() const override { return true; }
100 RowFlags rowFlags() const override { return Display; }
102 void latex(otexstream &, OutputParams const &) const override;
104 std::string contextMenuName() const override;
107 /// \name Static public methods obligated for InsetCommand derived classes
110 static ParamInfo const & findInfo(std::string const &);
112 static std::string defaultCommand() { return "printnomenclature"; }
114 static bool isCompatibleCommand(std::string const & s)
115 { return s == "printnomenclature"; }
119 /// \name Private functions inherited from Inset class
122 Inset * clone() const override { return new InsetPrintNomencl(*this); }
124 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override;
126 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
128 docstring layoutName() const override { return from_ascii("PrintNomencl"); }
131 /// \name Private functions inherited from InsetCommand class
134 docstring screenLabel() const override;