#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_)
{}
}
-bool InsetOld::forceDefaultParagraphs(InsetBase const * inset) const
-{
- if (owner())
- return owner()->forceDefaultParagraphs(inset);
- return false;
-}
-
-
int InsetOld::ascent() const
{
return dim_.asc;
}
-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
-{
- lyxerr << "InsetOld:: position cache to " << x << " " << y << std::endl;
- xo_ = x;
- yo_ = y;
-}
+} // namespace lyx