]> git.lyx.org Git - lyx.git/blobdiff - src/insets/updatableinset.h
ws changes only
[lyx.git] / src / insets / updatableinset.h
index 5b361e0edb397746d992ec6e468df0800909e1c2..ba795e875989e2c31c318f9d656dedb8a989980e 100644 (file)
@@ -9,7 +9,7 @@
  * \author Lars Gullik Bjønnes
  * \author Matthias Ettrich
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef UPDATABLEINSET_H
@@ -22,6 +22,8 @@
 
 #include "inset.h"
 
+#include "support/types.h"
+
 
 /** Extracted from Matthias notes:
  *
  */
 class UpdatableInset : public InsetOld {
 public:
-       ///
-       UpdatableInset();
-       ///
-       UpdatableInset(UpdatableInset const & in);
-
        /// check if the font of the char we want inserting is correct
        /// and modify it if it is not.
-       virtual bool checkInsertChar(LyXFont &);
+       virtual bool checkInsertChar(LyXFont &) { return true; }
        ///
        virtual EDITABLE editable() const;
 
@@ -70,18 +67,14 @@ public:
        ///
        virtual bool insertInset(BufferView *, InsetOld *) { return false; }
        ///
-       virtual UpdatableInset * getLockingInset() const {
-               return const_cast<UpdatableInset *>(this);
-       }
+       virtual UpdatableInset * getLockingInset() const
+               { return const_cast<UpdatableInset *>(this); }
        ///
        virtual UpdatableInset * getFirstLockingInsetOfType(InsetOld::Code c)
                { return (c == lyxCode()) ? this : 0; }
        ///
        virtual int insetInInsetY() const { return 0; }
        ///
-       virtual bool updateInsetInInset(BufferView *, InsetOld *)
-               { return false; }
-       ///
        virtual bool lockInsetInInset(BufferView *, UpdatableInset *)
                { return false; }
        ///
@@ -89,23 +82,13 @@ public:
                                        bool /*lr*/ = false)
                { return false; }
        ///  An updatable inset could handle lyx editing commands
-       virtual RESULT localDispatch(FuncRequest const & cmd);
-       ///
-       int scroll(bool recursive = true) const {
-               // We need this method to not clobber the real method in Inset
-               return InsetOld::scroll(recursive);
-       }
+       virtual dispatch_result localDispatch(FuncRequest const & cmd);
+       // We need this method to not clobber the real method in Inset
+       int scroll(bool recursive = true) const
+               { return InsetOld::scroll(recursive); }
        ///
        virtual bool showInsetDialog(BufferView *) const { return false; }
        ///
-       virtual void nodraw(bool b) const {
-               block_drawing_ = b;
-       }
-       ///
-       virtual bool nodraw() const {
-               return block_drawing_;
-       }
-       ///
        // needed for spellchecking text
        ///
        virtual bool allowSpellcheck() const { return false; }
@@ -123,10 +106,10 @@ public:
        ///
        // needed for search/replace functionality
        ///
-       virtual bool searchForward(BufferView *, string const &,
+       virtual bool searchForward(BufferView *, std::string const &,
                                   bool = true, bool = false);
        ///
-       virtual bool searchBackward(BufferView *, string const &,
+       virtual bool searchBackward(BufferView *, std::string const &,
                                    bool = true, bool = false);
 
 protected:
@@ -134,16 +117,6 @@ protected:
        void scroll(BufferView *, float sx) const;
        /// scrolls offset pixels
        void scroll(BufferView *, int offset) const;
-
-private:
-       ///
-       mutable bool block_drawing_;
 };
 
-inline
-bool UpdatableInset::checkInsertChar(LyXFont &)
-{
-       return true;
-}
-
 #endif