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 &);
32 int docbookGlossary(odocstream &) const;
34 /// \name Public functions inherited from Inset class
37 docstring toolTip(BufferView const & bv, int x, int y) const;
39 bool hasSettings() const { return true; }
40 /// Updates needed features for this inset.
41 void validate(LaTeXFeatures & features) const;
43 void addToToc(DocIterator const & di, bool output_active) const;
45 InsetCode lyxCode() const { return NOMENCL_CODE; }
47 int docbook(odocstream &, OutputParams const &) const;
48 /// Does nothing at the moment.
49 docstring xhtml(XHTMLStream &, OutputParams const &) const;
52 /// \name Static public methods obligated for InsetCommand derived classes
55 static ParamInfo const & findInfo(std::string const &);
57 static std::string defaultCommand() { return "nomenclature"; }
59 static bool isCompatibleCommand(std::string const & s)
60 { return s == "nomenclature"; }
64 /// \name Private functions inherited from Inset class
67 Inset * clone() const { return new InsetNomencl(*this); }
70 /// \name Private functions inherited from InsetCommand class
73 docstring screenLabel() const;
76 /// unique id for this nomenclature entry for docbook export
77 docstring nomenclature_entry_id;
81 class InsetPrintNomencl : public InsetCommand {
84 InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
86 /// \name Public functions inherited from Inset class
88 /// Updates needed features for this inset.
89 void validate(LaTeXFeatures & features) const;
91 int docbook(odocstream &, OutputParams const &) const;
93 docstring xhtml(XHTMLStream &, OutputParams const &) const;
95 InsetCode lyxCode() const;
97 bool hasSettings() const { return true; }
99 DisplayType display() const { return AlignCenter; }
101 void latex(otexstream &, OutputParams const &) const;
103 std::string contextMenuName() const;
106 /// \name Static public methods obligated for InsetCommand derived classes
109 static ParamInfo const & findInfo(std::string const &);
111 static std::string defaultCommand() { return "printnomenclature"; }
113 static bool isCompatibleCommand(std::string const & s)
114 { return s == "printnomenclature"; }
118 /// \name Private functions inherited from Inset class
121 Inset * clone() const { return new InsetPrintNomencl(*this); }
123 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
125 void doDispatch(Cursor & cur, FuncRequest & cmd);
127 docstring layoutName() const { return from_ascii("PrintNomencl"); }
130 /// \name Private functions inherited from InsetCommand class
133 docstring screenLabel() const;