]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbib.h
fix compilation pb ; update eu.po
[lyx.git] / src / insets / insetbib.h
index 52893fb97fbc3de82912f3e257766216c1ddd6c5..6995e60055bfd74aba3dde09f94e544e348530d4 100644 (file)
 #pragma interface
 #endif
 
-#include "insetcommand.h"
 #include <vector>
+#include "insetcommand.h"
 
 class Buffer;
-struct FD_bibitem_form;
 
 /** Used to insert bibitem's information (key and label)
   
@@ -30,17 +29,11 @@ struct FD_bibitem_form;
 class InsetBibKey : public InsetCommand {
 public:
        ///
-       InsetBibKey() : InsetCommand("bibitem") { counter = 1; }
-       ///
-       explicit
-       InsetBibKey(string const & key, string const & label = string());
-       ///
-       explicit
-       InsetBibKey(InsetBibKey const *);
+       InsetBibKey(InsetCommandParams const &);
        ///
        ~InsetBibKey();
        ///
-        Inset * Clone() const { return new InsetBibKey(this); }
+       Inset * Clone(Buffer const &) const;
        /** Currently \bibitem is used as a LyX2.x command,
            so we need this method.
        */
@@ -48,7 +41,7 @@ public:
        ///
        void Read(Buffer const *, LyXLex & lex);
        ///
-       virtual string getScreenLabel() const;
+       virtual string const getScreenLabel() const;
         ///
        void Edit(BufferView *, int x, int y, unsigned int button);
        ///
@@ -64,7 +57,7 @@ public:
         ///
         int  getCounter() const { return counter; }
        ///
-       void callback( FD_bibitem_form *, long );
+       string const getBibLabel() const;
        ///
        struct Holder {
                InsetBibKey * inset;
@@ -76,6 +69,8 @@ private:
         int counter;
        ///
        Holder holder;
+       ///
+       static int key_counter;
 };
 
 
@@ -83,36 +78,27 @@ private:
   */
 class InsetBibtex : public InsetCommand {
 public:
-       /// 
-       InsetBibtex() : InsetCommand("BibTeX") { owner = 0; }
        ///
-       InsetBibtex(string const & dbase, string const & style,
-                   Buffer *);
+       InsetBibtex(InsetCommandParams const &);
        ///
        ~InsetBibtex();
-
-        ///
-       Inset * Clone() const {
-               return new InsetBibtex(getCmdName(), getOptions(), owner);
-       }
        ///
-       Inset::Code LyxCode() const
-       {
-               return Inset::BIBTEX_CODE;
+       Inset * Clone(Buffer const &) const {
+               return new InsetBibtex(params());
        }
        ///
-       string getScreenLabel() const;
+       string const getScreenLabel() const;
+       ///
+       EDITABLE Editable() const { return IS_EDITABLE; }
+       ///
+       Inset::Code LyxCode() const { return Inset::BIBTEX_CODE; }
        ///
        void Edit(BufferView *, int x, int y, unsigned int button);
        /// 
        int Latex(Buffer const *, std::ostream &,
                  bool fragile, bool freespace) const;
        ///
-       std::vector<std::pair<string,string> > getKeys() const;
-       ///
-       EDITABLE Editable() const {
-               return IS_EDITABLE;
-       }
+       std::vector<std::pair<string,string> > const getKeys(Buffer const *) const;
         ///
         bool addDatabase(string const &);
         ///
@@ -126,9 +112,6 @@ public:
        };
 
 private:
-       ///
-       mutable Buffer * owner;
-
        ///
        Holder holder;
 };