]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlListings.cpp
fix scrolling bug: 3320 and 3652, maybe not perfect
[lyx.git] / src / frontends / controllers / ControlListings.cpp
1 /**
2  * \file ControlListings.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Bo Peng
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "ControlListings.h"
14 #include "FuncRequest.h"
15 #include "insets/InsetListings.h"
16
17 #include "debug.h"
18
19 using std::string;
20
21 namespace lyx {
22 namespace frontend {
23
24 ControlListings::ControlListings(Dialog & parent)
25         : Dialog::Controller(parent), params_()
26 {}
27
28
29 bool ControlListings::initialiseParams(string const & data)
30 {
31         InsetListingsMailer::string2params(data, params_);
32         return true;
33 }
34
35
36 void ControlListings::clearParams()
37 {
38         params_.clear();
39 }
40
41
42 void ControlListings::dispatchParams()
43 {
44         string const lfun = InsetListingsMailer::params2string(params());
45         kernel().dispatch(FuncRequest(getLfun(), lfun));
46 }
47
48
49 void ControlListings::setParams(InsetListingsParams const & params)
50 {
51         params_ = params;
52 }
53
54
55 } // namespace frontend
56 } // namespace lyx