#include "gettext.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
+#include "lyx_main.h"
#include "lyxlex.h"
#include "lyxrc.h"
#include "metricsinfo.h"
}
-void InsetGraphics::cache(BufferView * view) const
-{
- BOOST_ASSERT(view);
- view_ = view->owner()->view();
-}
-
-BufferView * InsetGraphics::view() const
-{
- return view_.lock().get();
-}
-
-
void InsetGraphics::statusChanged() const
{
- BufferView * bv = view();
- if (bv)
- bv->updateInset(this);
+ LyX::cref().updateInset(this);
}
-dispatch_result InsetGraphics::localDispatch(FuncRequest const & cmd)
+dispatch_result
+InsetGraphics::priv_dispatch(FuncRequest const & cmd, idx_type &, pos_type &)
{
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
void InsetGraphics::draw(PainterInfo & pi, int x, int y) const
{
- cache(pi.base.bv);
graphic_->draw(pi, x, y);
}