]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlNote.C
Rename .C => .cpp for files in src/frontends/controllers, step 1
[lyx.git] / src / frontends / controllers / ControlNote.C
1 /**
2  * \file ControlNote.cpp
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 namespace lyx {
22 namespace frontend {
23
24 ControlNote::ControlNote(Dialog & parent)
25         : Dialog::Controller(parent)
26 {}
27
28
29 bool ControlNote::initialiseParams(string const & data)
30 {
31         InsetNoteParams params;
32         InsetNoteMailer::string2params(data, params);
33         params_.reset(new InsetNoteParams(params));
34         return true;
35 }
36
37
38 void ControlNote::clearParams()
39 {
40         params_.reset();
41 }
42
43
44 void ControlNote::dispatchParams()
45 {
46         string const lfun = InsetNoteMailer::params2string(params());
47         kernel().dispatch(FuncRequest(getLfun(), lfun));
48 }
49
50 } // namespace frontend
51 } // namespace lyx