]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNomencl.h
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetNomencl.h
index db09d608295ca43c2b9080f40ddf22e045515e60..b2bc62d4740e9011b3bc6857664833897bcb5e2f 100644 (file)
@@ -21,7 +21,7 @@ namespace lyx {
 
 class LaTeXFeatures;
 
-/** Used to insert glossary labels
+/** Used to insert nomenclature entries
   */
 class InsetNomencl : public InsetCommand {
 public:
@@ -34,18 +34,25 @@ public:
        /// Updates needed features for this inset.
        void validate(LaTeXFeatures & features) const;
        ///
-       InsetBase::Code lyxCode() const;
+       InsetCode lyxCode() const { return NOMENCL_CODE; }
        ///
        int docbook(Buffer const &, odocstream &,
                    OutputParams const &) const;
        ///
        int docbookGlossary(odocstream &) const;
+       ///
+       static CommandInfo const * findInfo(std::string const &);
+       ///
+       static std::string defaultCommand() { return "nomenclature"; };
+       ///
+       static bool isCompatibleCommand(std::string const & s) 
+               { return s == "nomenclature"; }
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const {
-               return std::auto_ptr<InsetBase>(new InsetNomencl(params()));
+       virtual Inset * clone() const {
+               return new InsetNomencl(params());
        }
-       /// unique id for this glossary entry for docbook export
-       docstring glossary_entry_id;
+       /// unique id for this nomenclature entry for docbook export
+       docstring nomenclature_entry_id;
 };
 
 
@@ -65,14 +72,21 @@ public:
        int docbook(Buffer const &, odocstream &,
                    OutputParams const &) const;
        ///
-       InsetBase::Code lyxCode() const;
+       InsetCode lyxCode() const;
        ///
-       bool display() const { return true; }
+       DisplayType display() const { return AlignCenter; }
        ///
        docstring const getScreenLabel(Buffer const &) const;
+       ///
+       static CommandInfo const * findInfo(std::string const &);
+       ///
+       static std::string defaultCommand() { return "printnomenclature"; };
+       ///
+       static bool isCompatibleCommand(std::string const & s) 
+               { return s == "printnomenclature"; }
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const {
-               return std::auto_ptr<InsetBase>(new InsetPrintNomencl(params()));
+       virtual Inset * clone() const {
+               return new InsetPrintNomencl(params());
        }
 };