]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibitem.h
This should be the last of the commits refactoring the InsetLayout code.
[lyx.git] / src / insets / InsetBibitem.h
index 700cd4edd64ac21efa04b8935b5420eff0771cdb..b0b1121a36bb7df593dbc3db01d8694f6aa34f48 100644 (file)
@@ -14,6 +14,7 @@
 
 
 #include "InsetCommand.h"
+#include "BiblioInfo.h"
 
 
 namespace lyx {
@@ -34,23 +35,31 @@ public:
        ///
        EDITABLE editable() const { return IS_EDITABLE; }
        ///
-       InsetBase::Code lyxCode() const { return InsetBase::BIBITEM_CODE; }
-       ///
-       void setCounter(int);
-       ///
-       int getCounter() const { return counter; }
+       InsetCode lyxCode() const { return BIBITEM_CODE; }
        ///
        docstring const getBibLabel() const;
        ///
        int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
+       ///
+       virtual void fillWithBibKeys(Buffer const &,
+               BiblioInfo &, InsetIterator const &) const;
+       /// Update the counter of this inset
+       virtual void updateLabels(Buffer const &, ParIterator const &);
+       ///
+       static CommandInfo const * findInfo(std::string const &);
+       ///
+       static std::string defaultCommand() { return "bibitem"; };
+       ///
+       static bool isCompatibleCommand(std::string const & s) 
+               { return s == "bibitem"; }
 protected:
        ///
        virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
 private:
-       virtual std::auto_ptr<InsetBase> doClone() const;
+       virtual Inset * clone() const;
 
-       ///
-       int counter;
+       /// The label that is set by updateLabels
+       docstring autolabel_;
        ///
        static int key_counter;
 };