]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbib.h
Just some changes to be able to change TabularFeatures with the Table menu
[lyx.git] / src / insets / insetbib.h
index e9072295994bddec9be1c7e1867999f2b227aabe..a478f646f9f0061e10f7ca4d0d7588d104786563 100644 (file)
@@ -18,8 +18,7 @@
 
 #include "insetcommand.h"
 
-// Created by Alejandro 970222
-
+class Buffer;
 
 /** Used to insert citations  
  */
@@ -28,6 +27,7 @@ public:
        ///
        InsetCitation() : InsetCommand("cite") {}
        ///
+       explicit
        InsetCitation(string const & key, string const & note = string());
         ///
        ~InsetCitation();
@@ -38,18 +38,18 @@ public:
        ///
        string getScreenLabel()const;
         ///
-       void Edit(BufferView *, int, int);
+       void Edit(BufferView *, int x, int y, unsigned int button);
         ///
-       unsigned char Editable() const {
-               return 1;
+       EDITABLE Editable() const {
+               return IS_EDITABLE;
        }
-private:
        ///
        struct Holder {
                InsetCitation * inset;
                BufferView * view;
        };
 
+private:
        ///
        Holder holder;
 };
@@ -65,22 +65,24 @@ public:
        ///
        InsetBibKey() : InsetCommand("bibitem") { counter = 1; }
        ///
+       explicit
        InsetBibKey(string const & key, string const & label = string());
        ///
+       explicit
        InsetBibKey(InsetBibKey const *);
        ///
        ~InsetBibKey();
        ///
         Inset * Clone() const { return new InsetBibKey(this); }
        /// Currently \bibitem is used as a LyX2.x command, so we need this method.
-        void Write(ostream &) const;
+        void Write(std::ostream &) const;
        ///
        virtual string getScreenLabel() const;
         ///
-       void Edit(BufferView *, int, int);
+       void Edit(BufferView *, int x, int y, unsigned int button);
        ///
-       unsigned char Editable() const {
-               return 1;
+       EDITABLE Editable() const {
+               return IS_EDITABLE;
        }
        /// A user can't neither insert nor delete this inset
        bool Deletable() const {
@@ -90,16 +92,16 @@ public:
         void setCounter(int);
         ///
         int  getCounter() const { return counter; }
-
- private:
-       ///
-        int counter;
        ///
        struct Holder {
                InsetBibKey * inset;
                BufferView * view;
        };
 
+ private:
+       ///
+        int counter;
+
        ///
        Holder holder;
 };
@@ -114,6 +116,9 @@ public:
        ///
        InsetBibtex(string const & dbase, string const & style,
                    Buffer *);
+       ///
+       ~InsetBibtex();
+
         ///
        Inset * Clone() const {
                return new InsetBibtex(contents, options, 0);
@@ -126,26 +131,33 @@ public:
        ///
        string getScreenLabel() const;
        ///
-       void Edit(BufferView *, int, int);
+       void Edit(BufferView *, int x, int y, unsigned int button);
        /// 
-       int Latex(ostream &, signed char) const;
-       ///
-       int Latex(string & file, signed char fragile) const;
+       int Latex(std::ostream &, bool fragile, bool freespace) const;
        ///
        string getKeys(char delim);
        ///
-       unsigned char Editable() const {
-               return 1;
+       EDITABLE Editable() const {
+               return IS_EDITABLE;
        }
         ///
         bool addDatabase(string const &);
         ///
         bool delDatabase(string const &);
        ///
-       bool display() const { return true; }    
+       bool display() const { return true; } 
+
+       struct Holder {
+               InsetBibtex * inset;
+               BufferView * view;
+       };
+
 private:
        ///
        mutable Buffer * owner;
+
+       ///
+       Holder holder;
 };
 
 #endif