]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inset.C
updates to minipage inset
[lyx.git] / src / insets / inset.C
index fa361c96fc992b502587a6f75b1bbe6117afdbde..95e69d268254f45d95607cdc2a425f42e40d5bac 100644 (file)
 #pragma implementation "lyxinset.h"
 #endif
 
-#define SCROLL_INSET
-
 #include "lyxinset.h"
 #include "debug.h"
 #include "BufferView.h"
 #include "support/lstrings.h"
 #include "Painter.h"
-#ifdef SCROLL_INSET
 #include "commandtags.h"
 #include "support/lstrings.h"
-#endif
 
 using std::endl;
 
@@ -76,10 +72,10 @@ string const Inset::EditMessage() const
 }
 
 
-LyXText * Inset::getLyXText(BufferView const * bv) const
+LyXText * Inset::getLyXText(BufferView const * bv, bool const) const
 {
     if (owner())
-           return owner()->getLyXText(bv);
+           return owner()->getLyXText(bv, false);
     else
            return bv->text;
 }
@@ -162,7 +158,6 @@ void UpdatableInset::SetFont(BufferView *, LyXFont const &, bool )
 }
 
 
-#ifdef SCROLL_INSET
 void UpdatableInset::scroll(BufferView * bv, float s) const
 {
     LyXFont font;
@@ -196,7 +191,8 @@ void UpdatableInset::scroll(BufferView * bv, int offset) const
        if (!scx && top_x >= 20)
            return;
        if ((top_x + offset) > 20)
-           scx += offset - (top_x - scx + offset - 20);
+           scx = 0;
+//         scx += offset - (top_x - scx + offset - 20);
        else
            scx += offset;
     } else {
@@ -212,21 +208,11 @@ void UpdatableInset::scroll(BufferView * bv, int offset) const
 //    bv->updateInset(const_cast<UpdatableInset *>(this), false);
 }
 
-
-#endif
-
 ///  An updatable inset could handle lyx editing commands
-#ifdef SCROLL_INSET
 UpdatableInset::RESULT
 UpdatableInset::LocalDispatch(BufferView * bv, 
-                             int action, string const & arg) 
-#else
-UpdatableInset::RESULT
-UpdatableInset::LocalDispatch(BufferView *, int, string const &)
-#endif
+                             kb_action action, string const & arg) 
 {
-#ifdef SCROLL_INSET
-
     if (!arg.empty() && (action==LFUN_SCROLL_INSET)) {
        if (arg.find('.') != arg.npos) {
            float xx = static_cast<float>(strToDbl(arg));
@@ -239,7 +225,6 @@ UpdatableInset::LocalDispatch(BufferView *, int, string const &)
        
        return DISPATCHED;
     }
-#endif
     return UNDISPATCHED; 
 }