]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlTabularCreate.C
Really dull and boring header shit
[lyx.git] / src / frontends / controllers / ControlTabularCreate.C
1 /**
2  * \file ControlTabularCreate.C
3  * See the file COPYING.
4  *
5  * \author unknown
6  *
7  * Full author contact details are available in file CREDITS
8  */
9
10 #include <config.h>
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include "ControlTabularCreate.h"
17 #include "ViewBase.h"
18 #include "ButtonControllerBase.h"
19 #include "lyxfunc.h"
20 #include "funcrequest.h"
21
22
23 #include "support/lstrings.h"
24
25
26 ControlTabularCreate::ControlTabularCreate(LyXView & lv, Dialogs & d)
27         : ControlDialogBD(lv, d)
28 {}
29
30
31 ControlTabularCreate::rowsCols & ControlTabularCreate::params()
32 {
33         return params_;
34 }
35
36
37 void ControlTabularCreate::setParams()
38 {
39         bc().valid(); // so that the user can press Ok
40 }
41
42
43 void ControlTabularCreate::apply()
44 {
45         if (!bufferIsAvailable())
46                 return;
47
48         view().apply();
49
50         string const val = tostr(params().first) + " " + tostr(params().second);
51         lyxfunc().dispatch(FuncRequest(LFUN_TABULAR_INSERT, val));
52 }