1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \file ControlGraphics.C
11 * \author Angus Leeming <a.leeming@ic.ac.uk>
17 #pragma implementation
20 #include "ControlGraphics.h"
26 #include "insets/insetgraphics.h"
28 ControlGraphics::ControlGraphics(LyXView & lv, Dialogs & d)
29 : ControlInset<InsetGraphics, InsetGraphicsParams>(lv, d)
31 d_.showGraphics.connect(SigC::slot(this, &ControlGraphics::showInset));
35 LyXView * ControlGraphics::lv() const
41 InsetGraphicsParams const ControlGraphics::getParams(string const &)
43 return InsetGraphicsParams();
47 InsetGraphicsParams const
48 ControlGraphics::getParams(InsetGraphics const & inset)
50 return inset.getParams();
54 void ControlGraphics::applyParamsToInset()
56 // Set the parameters in the inset, it also returns true if the new
57 // parameters are different from what was in the inset already.
58 bool changed = inset()->setParams(params());
59 // Tell LyX we've got a change, and mark the document dirty,
61 lv_.view()->updateInset(inset(), changed);
65 void ControlGraphics::applyParamsNoInset()