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
16 #include "InsetCollapsible.h"
17 #include "InsetCommand.h"
24 /** Used to insert nomenclature entries
26 class InsetNomencl : public InsetCollapsible {
29 InsetNomencl(Buffer * buf);
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;
52 InsetNomencl const * asInsetNomencl() const override { return this; }
55 docstring getSymbol() const;
57 docstring getDescription() const;
59 docstring getPrefix() const;
62 /// \name Private functions inherited from Inset class
65 Inset * clone() const override { return new InsetNomencl(*this); }
68 /// \name Private functions inherited from InsetCollapsible class
71 docstring layoutName() const override;
73 void write(std::ostream & os) const override;
78 class InsetPrintNomencl : public InsetCommand {
81 InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
83 /// \name Public functions inherited from Inset class
85 /// Updates needed features for this inset.
86 void validate(LaTeXFeatures & features) const override;
88 void docbook(XMLStream &, OutputParams const &) const override;
90 docstring xhtml(XMLStream &, OutputParams const &) const override;
92 InsetCode lyxCode() const override;
94 bool hasSettings() const override;
96 int rowFlags() const override { return Display; }
98 void latex(otexstream &, OutputParams const &) const override;
100 std::string contextMenuName() const override;
103 /// \name Static public methods obligated for InsetCommand derived classes
106 static ParamInfo const & findInfo(std::string const &);
108 static std::string defaultCommand() { return "printnomenclature"; }
110 static bool isCompatibleCommand(std::string const & s)
111 { return s == "printnomenclature"; }
115 /// \name Private functions inherited from Inset class
118 Inset * clone() const override { return new InsetPrintNomencl(*this); }
120 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const override;
122 void doDispatch(Cursor & cur, FuncRequest & cmd) override;
124 docstring layoutName() const override { return from_ascii("PrintNomencl"); }
127 /// \name Private functions inherited from InsetCommand class
130 docstring screenLabel() const override;