]> git.lyx.org Git - lyx.git/blob - src/insets/InsetNomencl.h
This optional argument to the InsetCollapsable constructor
[lyx.git] / src / insets / InsetNomencl.h
1 // -*- C++ -*-
2 /**
3  * \file InsetNomencl.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author O. U. Baran
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef INSET_NOMENCL_H
14 #define INSET_NOMENCL_H
15
16
17 #include "InsetCommand.h"
18
19
20 namespace lyx {
21
22 class LaTeXFeatures;
23
24 /** Used to insert nomenclature entries
25   */
26 class InsetNomencl : public InsetCommand {
27 public:
28         ///
29         InsetNomencl(InsetCommandParams const &);
30         ///
31         docstring screenLabel() const;
32         ///
33         docstring toolTip(BufferView const & bv, int x, int y) const;
34         ///
35         EDITABLE editable() const { return IS_EDITABLE; }
36         /// Updates needed features for this inset.
37         void validate(LaTeXFeatures & features) const;
38         ///
39         InsetCode lyxCode() const { return NOMENCL_CODE; }
40         ///
41         int docbook(odocstream &, OutputParams const &) const;
42         ///
43         int docbookGlossary(odocstream &) const;
44         ///
45         static ParamInfo const & findInfo(std::string const &);
46         ///
47         static std::string defaultCommand() { return "nomenclature"; };
48         ///
49         static bool isCompatibleCommand(std::string const & s) 
50                 { return s == "nomenclature"; }
51 private:
52         Inset * clone() const { return new InsetNomencl(*this); }
53         /// unique id for this nomenclature entry for docbook export
54         docstring nomenclature_entry_id;
55 };
56
57
58 class InsetPrintNomencl : public InsetCommand {
59 public:
60         ///
61         InsetPrintNomencl(InsetCommandParams const &);
62         /// Updates needed features for this inset.
63         void validate(LaTeXFeatures & features) const;
64         // FIXME: This should be editable to set the label width (stored
65         // in params_["labelwidth"]).
66         // Currently the width can be read from file and written, but not
67         // changed.
68         ///
69         EDITABLE editable() const { return NOT_EDITABLE; }
70         ///
71         int docbook(odocstream &, OutputParams const &) const;
72         ///
73         InsetCode lyxCode() const;
74         ///
75         DisplayType display() const { return AlignCenter; }
76         ///
77         docstring screenLabel() const;
78         ///
79         static ParamInfo const & findInfo(std::string const &);
80         ///
81         static std::string defaultCommand() { return "printnomenclature"; };
82         ///
83         static bool isCompatibleCommand(std::string const & s) 
84                 { return s == "printnomenclature"; }
85 private:
86         Inset * clone() const { return new InsetPrintNomencl(*this); }
87 };
88
89
90 } // namespace lyx
91
92 #endif