]> git.lyx.org Git - features.git/blob - src/frontends/controllers/ControlBranch.C
The 'Branches' mega-patch.
[features.git] / src / frontends / controllers / ControlBranch.C
1 /**
2  * \file ControlBranch.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming
7  * \author Martin Vermeer
8  *
9  * Full author contact details are available in file CREDITS
10  */
11
12 #include <config.h>
13
14 #include "ControlBranch.h"
15 #include "funcrequest.h"
16 #include "insets/insetbranch.h"
17 #include "debug.h"
18
19 ControlBranch::ControlBranch(Dialog & parent)
20         : Dialog::Controller(parent)
21 {}
22
23
24 bool ControlBranch::initialiseParams(string const & data)
25 {
26         InsetBranchParams params;
27         InsetBranchMailer::string2params(data, params);
28         params_.reset(new InsetBranchParams(params));
29         
30         return true;
31 }
32
33
34 void ControlBranch::clearParams()
35 {
36         params_.reset();
37 }
38
39 void ControlBranch::dispatchParams()
40 {
41         string const lfun = InsetBranchMailer::params2string(string("branch"), params());
42         kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
43 }
44