]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlNote.C
Overhaul the branches code.
[lyx.git] / src / frontends / controllers / ControlNote.C
1 /**
2  * \file ControlNote.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  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "ControlNote.h"
14 #include "funcrequest.h"
15 #include "insets/insetnote.h"
16 #include "gettext.h"
17
18
19 using std::string;
20
21
22 ControlNote::ControlNote(Dialog & parent)
23         : Dialog::Controller(parent)
24 {}
25
26
27 bool ControlNote::initialiseParams(string const & data)
28 {
29         InsetNoteParams params;
30         InsetNoteMailer::string2params(data, params);
31         params_.reset(new InsetNoteParams(params));
32         return true;
33 }
34
35
36 void ControlNote::clearParams()
37 {
38         params_.reset();
39 }
40
41
42 void ControlNote::dispatchParams()
43 {
44         string const lfun = InsetNoteMailer::params2string(params());
45         kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
46 }