]> git.lyx.org Git - lyx.git/blob - src/insets/InsetNomencl.h
Further cleanup of collapsable insets. The layouts are now properly read and applied.
[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 const getScreenLabel(Buffer const &) const;
32         ///
33         EDITABLE editable() const { return IS_EDITABLE; }
34         /// Updates needed features for this inset.
35         void validate(LaTeXFeatures & features) const;
36         ///
37         InsetCode lyxCode() const { return NOMENCL_CODE; }
38         ///
39         int docbook(Buffer const &, odocstream &,
40                     OutputParams const &) const;
41         ///
42         int docbookGlossary(odocstream &) const;
43         ///
44         static CommandInfo const * findInfo(std::string const &);
45         ///
46         static std::string defaultCommand() { return "nomenclature"; };
47         ///
48         static bool isCompatibleCommand(std::string const & s) 
49                 { return s == "nomenclature"; }
50 private:
51         virtual Inset * clone() const {
52                 return new InsetNomencl(params());
53         }
54         /// unique id for this nomenclature entry for docbook export
55         docstring nomenclature_entry_id;
56 };
57
58
59 class InsetPrintNomencl : public InsetCommand {
60 public:
61         ///
62         InsetPrintNomencl(InsetCommandParams const &);
63         /// Updates needed features for this inset.
64         void validate(LaTeXFeatures & features) const;
65         // FIXME: This should be editable to set the label width (stored
66         // in params_["labelwidth"]).
67         // Currently the width can be read from file and written, but not
68         // changed.
69         ///
70         EDITABLE editable() const { return NOT_EDITABLE; }
71         ///
72         int docbook(Buffer const &, odocstream &,
73                     OutputParams const &) const;
74         ///
75         InsetCode lyxCode() const;
76         ///
77         DisplayType display() const { return AlignCenter; }
78         ///
79         docstring const getScreenLabel(Buffer const &) const;
80         ///
81         static CommandInfo const * findInfo(std::string const &);
82         ///
83         static std::string defaultCommand() { return "printnomenclature"; };
84         ///
85         static bool isCompatibleCommand(std::string const & s) 
86                 { return s == "printnomenclature"; }
87 private:
88         virtual Inset * clone() const {
89                 return new InsetPrintNomencl(params());
90         }
91 };
92
93
94 } // namespace lyx
95
96 #endif