]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetbib.h
clear()->erase() ; lots of using directives for cxx
[lyx.git] / src / insets / insetbib.h
index 3b862fb3e98101d3b073a448f8eff4192497e614..a478f646f9f0061e10f7ca4d0d7588d104786563 100644 (file)
@@ -27,6 +27,7 @@ public:
        ///
        InsetCitation() : InsetCommand("cite") {}
        ///
+       explicit
        InsetCitation(string const & key, string const & note = string());
         ///
        ~InsetCitation();
@@ -39,8 +40,8 @@ public:
         ///
        void Edit(BufferView *, int x, int y, unsigned int button);
         ///
-       unsigned char Editable() const {
-               return 1;
+       EDITABLE Editable() const {
+               return IS_EDITABLE;
        }
        ///
        struct Holder {
@@ -64,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 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 {
@@ -113,6 +116,9 @@ public:
        ///
        InsetBibtex(string const & dbase, string const & style,
                    Buffer *);
+       ///
+       ~InsetBibtex();
+
         ///
        Inset * Clone() const {
                return new InsetBibtex(contents, options, 0);
@@ -127,24 +133,31 @@ public:
        ///
        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