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,
44 UpdateType utype, TocBackend & backend) const;
46 InsetCode lyxCode() const { return NOMENCL_CODE; }
48 int plaintext(odocstringstream & ods, OutputParams const & op,
49 size_t max_length = INT_MAX) const;
51 int docbook(odocstream &, OutputParams const &) const;
52 /// Does nothing at the moment.
53 docstring xhtml(XHTMLStream &, OutputParams const &) const;
56 /// \name Static public methods obligated for InsetCommand derived classes
59 static ParamInfo const & findInfo(std::string const &);
61 static std::string defaultCommand() { return "nomenclature"; }
63 static bool isCompatibleCommand(std::string const & s)
64 { return s == "nomenclature"; }
68 /// \name Private functions inherited from Inset class
71 Inset * clone() const { return new InsetNomencl(*this); }
74 /// \name Private functions inherited from InsetCommand class
77 docstring screenLabel() const;
80 /// unique id for this nomenclature entry for docbook export
81 docstring nomenclature_entry_id;
85 class InsetPrintNomencl : public InsetCommand {
88 InsetPrintNomencl(Buffer * buf, InsetCommandParams const &);
90 /// \name Public functions inherited from Inset class
92 /// Updates needed features for this inset.
93 void validate(LaTeXFeatures & features) const;
95 int docbook(odocstream &, OutputParams const &) const;
97 docstring xhtml(XHTMLStream &, OutputParams const &) const;
99 InsetCode lyxCode() const;
101 bool hasSettings() const { return true; }
103 DisplayType display() const { return AlignCenter; }
105 void latex(otexstream &, OutputParams const &) const;
107 std::string contextMenuName() const;
110 /// \name Static public methods obligated for InsetCommand derived classes
113 static ParamInfo const & findInfo(std::string const &);
115 static std::string defaultCommand() { return "printnomenclature"; }
117 static bool isCompatibleCommand(std::string const & s)
118 { return s == "printnomenclature"; }
122 /// \name Private functions inherited from Inset class
125 Inset * clone() const { return new InsetPrintNomencl(*this); }
127 bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus & status) const;
129 void doDispatch(Cursor & cur, FuncRequest & cmd);
131 docstring layoutName() const { return from_ascii("PrintNomencl"); }
134 /// \name Private functions inherited from InsetCommand class
137 docstring screenLabel() const;