#include <config.h>
#include "insets/insetgraphics.h"
-#include "insets/renderers.h"
+#include "insets/render_graphic.h"
#include "buffer.h"
#include "BufferView.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
#include "latexrunparams.h"
+#include "lyx_main.h"
#include "lyxlex.h"
#include "lyxrc.h"
+#include "metricsinfo.h"
#include "frontends/Alert.h"
+#include "frontends/LyXView.h"
#include "support/filetools.h"
#include "support/lyxalgo.h" // lyx::count
InsetGraphics::InsetGraphics()
: graphic_label(uniqueID()),
- graphic_(new GraphicRenderer)
+ graphic_(new RenderGraphic)
{
graphic_->connect(boost::bind(&InsetGraphics::statusChanged, this));
}
: InsetOld(ig),
boost::signals::trackable(),
graphic_label(uniqueID()),
- graphic_(new GraphicRenderer(*ig.graphic_))
+ graphic_(new RenderGraphic(*ig.graphic_))
{
graphic_->connect(boost::bind(&InsetGraphics::statusChanged, this));
setParams(ig.params());
void InsetGraphics::statusChanged() const
{
- BufferView * bv = graphic_->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: {
return DISPATCHED;
default:
- return InsetOld::localDispatch(cmd);
+ return UNDISPATCHED;
}
}