]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inset.C
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[lyx.git] / src / insets / inset.C
index b61eafd076dc3dc6a31d6c55680f4a28ee57237d..5f0b633794979a5e7b0c6f9fb2c615067bc68579 100644 (file)
 #include <config.h>
 
 #include "inset.h"
-#include "updatableinset.h"
 
 #include "BufferView.h"
 #include "debug.h"
 #include "gettext.h"
 #include "lyxtext.h"
 #include "LColor.h"
+#include "metricsinfo.h"
+#include "coordcache.h"
 
 
+namespace lyx {
+
 using std::string;
 
 
 InsetOld::InsetOld()
-       : InsetBase(),
-         xo_(0), yo_(0), scx(0), owner_(0),
-         //background_color_(LColor::inherit)
+       : //background_color_(LColor::inherit)
          background_color_(LColor::background)
 {}
 
 
 InsetOld::InsetOld(InsetOld const & in)
-       : InsetBase(),
-         xo_(0), yo_(0), scx(0), owner_(0), name_(in.name_),
+       : InsetBase(in), name_(in.name_),
          background_color_(in.background_color_)
 {}
 
@@ -53,14 +53,6 @@ LColor_color InsetOld::backgroundColor() const
 }
 
 
-bool InsetOld::forceDefaultParagraphs(InsetBase const * inset) const
-{
-       if (owner())
-               return owner()->forceDefaultParagraphs(inset);
-       return false;
-}
-
-
 int InsetOld::ascent() const
 {
        return dim_.asc;
@@ -79,16 +71,11 @@ int InsetOld::width() const
 }
 
 
-int InsetOld::scroll(bool recursive) const
+void InsetOld::setPosCache(PainterInfo const & pi, int x, int y) const
 {
-       if (!recursive || !owner_)
-               return scx;
-       return 0;
+       //lyxerr << "InsetOld:: position cache to " << x << " " << y << std::endl;
+       pi.base.bv->coordCache().insets().add(this, x, y);
 }
 
 
-void InsetOld::setPosCache(PainterInfo const &, int x, int y) const
-{
-       xo_ = x;
-       yo_ = y;
-}
+} // namespace lyx