]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNomencl.h
Remove TextClassPtr without losing the type safety it provided.
[lyx.git] / src / insets / InsetNomencl.h
index c76669badf8a65c3cf67ef38764d83f157a58732..6727068ab089bf064d85000f0ddcdf2c85ef01ab 100644 (file)
@@ -21,31 +21,35 @@ namespace lyx {
 
 class LaTeXFeatures;
 
-/** Used to insert glossary labels
+/** Used to insert nomenclature entries
   */
 class InsetNomencl : public InsetCommand {
 public:
        ///
        InsetNomencl(InsetCommandParams const &);
        ///
-       docstring const getScreenLabel(Buffer const &) const;
+       docstring screenLabel() const;
        ///
        EDITABLE editable() const { return IS_EDITABLE; }
        /// Updates needed features for this inset.
        void validate(LaTeXFeatures & features) const;
        ///
-       Inset::Code lyxCode() const;
+       InsetCode lyxCode() const { return NOMENCL_CODE; }
        ///
-       int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+       int docbook(odocstream &, OutputParams const &) const;
        ///
        int docbookGlossary(odocstream &) const;
+       ///
+       static ParamInfo 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<Inset> doClone() const {
-               return std::auto_ptr<Inset>(new InsetNomencl(params()));
-       }
-       /// unique id for this glossary entry for docbook export
-       docstring glossary_entry_id;
+       Inset * clone() const { return new InsetNomencl(params()); }
+       /// unique id for this nomenclature entry for docbook export
+       docstring nomenclature_entry_id;
 };
 
 
@@ -62,18 +66,22 @@ public:
        ///
        EDITABLE editable() const { return NOT_EDITABLE; }
        ///
-       int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+       int docbook(odocstream &, OutputParams const &) const;
+       ///
+       InsetCode lyxCode() const;
+       ///
+       DisplayType display() const { return AlignCenter; }
+       ///
+       docstring screenLabel() const;
        ///
-       Inset::Code lyxCode() const;
+       static ParamInfo const & findInfo(std::string const &);
        ///
-       bool display() const { return true; }
+       static std::string defaultCommand() { return "printnomenclature"; };
        ///
-       docstring const getScreenLabel(Buffer const &) const;
+       static bool isCompatibleCommand(std::string const & s) 
+               { return s == "printnomenclature"; }
 private:
-       virtual std::auto_ptr<Inset> doClone() const {
-               return std::auto_ptr<Inset>(new InsetPrintNomencl(params()));
-       }
+       Inset * clone() const { return new InsetPrintNomencl(params()); }
 };