]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbib.h
static_cast-based key/mouse-state. Kill insetKeyPress.
[lyx.git] / src / insets / insetbib.h
index 4dbd137305f53be11b21b1595db93056f94bd706..2606948f598bba7895d7bbcd99d31afba7e1bf79 100644 (file)
@@ -1,12 +1,12 @@
 // -*- C++ -*-
 /* This file is part of*
- * ====================================================== 
+ * ======================================================
  *
  *           LyX, The Document Processor
- *      
+ *
  *           Copyright 1995 Matthias Ettrich
  *           Copyright 1995-2001 The LyX Team.
- * 
+ *
  * ====================================================== */
 
 #ifndef INSET_BIB_H
@@ -22,9 +22,9 @@
 class Buffer;
 
 /** Used to insert bibitem's information (key and label)
-  
+
   Must be automatically inserted as the first object in a
-  bibliography paragraph. 
+  bibliography paragraph.
   */
 class InsetBibKey : public InsetCommand {
 public:
@@ -41,21 +41,21 @@ public:
        ///
        void read(Buffer const *, LyXLex & lex);
        ///
-       virtual string const getScreenLabel() const;
-        ///
-       void edit(BufferView *, int x, int y, unsigned int button);
+       virtual string const getScreenLabel(Buffer const *) const;
        ///
-       EDITABLE editable() const {
-               return IS_EDITABLE;
-       }
+       void edit(BufferView *, int x, int y, mouse_button::state button);
+       ///
+       void edit(BufferView * bv, bool front = true);
+       ///
+       EDITABLE editable() const { return IS_EDITABLE; }
        /// A user can't neither insert nor delete this inset
        bool deletable() const {
                return false;
        }
-        ///
-        void setCounter(int);
-        ///
-        int  getCounter() const { return counter; }
+       ///
+       void setCounter(int);
+       ///
+       int  getCounter() const { return counter; }
        ///
        string const getBibLabel() const;
        ///
@@ -63,10 +63,10 @@ public:
                InsetBibKey * inset;
                BufferView * view;
        };
+
 private:
        ///
-        int counter;
+       int counter;
        ///
        Holder holder;
        ///
@@ -74,7 +74,7 @@ private:
 };
 
 
-/** Used to insert BibTeX's information 
+/** Used to insert BibTeX's information
   */
 class InsetBibtex : public InsetCommand {
 public:
@@ -87,26 +87,30 @@ public:
                return new InsetBibtex(params(), same_id);
        }
        ///
-       string const getScreenLabel() const;
+       string const getScreenLabel(Buffer const *) 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);
-       /// 
+       void edit(BufferView *, int x, int y, mouse_button::state button);
+       ///
+       void edit(BufferView * bv, bool front = true);
+       ///
        int latex(Buffer const *, std::ostream &,
                  bool fragile, bool freespace) const;
        ///
        std::vector<std::pair<string,string> > const getKeys(Buffer const *) const;
-        ///
-        bool addDatabase(string const &);
-        ///
-        bool delDatabase(string const &);
        ///
-       bool display() const { return true; } 
+       std::vector<string> const getFiles(Buffer const &) const;
        ///
-       struct Holder {
+       bool addDatabase(string const &);
+       ///
+       bool delDatabase(string const &);
+       ///
+       bool display() const { return true; }
+       ///
+       struct Holder {
                InsetBibtex * inset;
                BufferView * view;
        };