]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlInclude.C
Implemented controller-view split for FormError and FormInclude.
[lyx.git] / src / frontends / controllers / ControlInclude.C
1 /**
2  * \file ControlInclude.C
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author Alejandro Aguilar Sierra
7  * \author John Levon, moz@compsoc.man.ac.uk
8  * \author Angus Leeming, a.leeming@.ac.uk
9  */
10
11 #ifdef __GNUG__
12 #pragma implementation
13 #endif
14
15 #include <config.h>
16 #include "ControlInclude.h"
17 #include "buffer.h"
18 #include "Dialogs.h"
19 #include "lyxfunc.h"
20 #include "LyXView.h"
21
22 using SigC::slot;
23
24 ControlInclude::ControlInclude(LyXView & lv, Dialogs & d)
25         : ControlInset<InsetInclude, InsetInclude::Params>(lv, d)
26 {
27         d_.showInclude.connect(slot(this, &ControlInclude::showInset));
28 }
29
30 LyXView * ControlInclude::lv() const
31 {
32         return &lv_;
33 }
34
35
36 void ControlInclude::applyParamsToInset()
37 {
38         inset()->set(params());
39         lv_.view()->updateInset(inset(), true);
40 }