]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inset.C
insetcharstyle drawing cosmetics
[lyx.git] / src / insets / inset.C
index 88affad0752447fc792d724c56d67e7ef6344e1c..1f6014002595ee05dd85830a1b494c3409255767 100644 (file)
 #include "updatableinset.h"
 
 #include "BufferView.h"
+#include "debug.h"
 #include "gettext.h"
+#include "lyxtext.h"
 #include "LColor.h"
-
+#include "metricsinfo.h"
+#include "coordcache.h"
 
 using std::string;
 
 
 InsetOld::InsetOld()
-       : InsetBase(),
-         xo_(0), yo_(0), scx(0), owner_(0),
+       : scx(0),
          //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), scx(0), name_(in.name_),
          background_color_(in.background_color_)
 {}
 
 
-bool InsetOld::directWrite() const
-{
-       return false;
-}
-
-
-InsetOld::EDITABLE InsetOld::editable() const
-{
-       return NOT_EDITABLE;
-}
-
-
-bool InsetOld::autoDelete() const
-{
-       return false;
-}
-
-
-string const InsetOld::editMessage() const
-{
-       return _("Opened inset");
-}
-
-
 void InsetOld::setBackgroundColor(LColor_color color)
 {
        background_color_ = color;
@@ -75,10 +52,8 @@ LColor_color InsetOld::backgroundColor() const
 }
 
 
-bool InsetOld::forceDefaultParagraphs(InsetOld const * inset) const
+bool InsetOld::forceDefaultParagraphs(InsetBase const *) const
 {
-       if (owner())
-               return owner()->forceDefaultParagraphs(inset);
        return false;
 }
 
@@ -101,26 +76,14 @@ int InsetOld::width() const
 }
 
 
-bool InsetOld::insetAllowed(InsetOld * in) const
-{
-       return insetAllowed(in->lyxCode());
-}
-
-
-int InsetOld::scroll(bool recursive) const
-{
-       if (!recursive || !owner_)
-               return scx;
-       return 0;
-}
-
-bool isEditableInset(InsetOld const * i)
+int InsetOld::scroll(bool) const
 {
-       return i && i->editable();
+       return scx;
 }
 
 
-bool isHighlyEditableInset(InsetOld const * i)
+void InsetOld::setPosCache(PainterInfo const & pi, int x, int y) const
 {
-       return i && i->editable() == InsetOld::HIGHLY_EDITABLE;
+       //lyxerr << "InsetOld:: position cache to " << x << " " << y << std::endl;
+       theCoords.insets_.add(this, x, y);
 }