]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlMath2.C
Get rid of current_view from the Qt math panel.
[lyx.git] / src / frontends / controllers / ControlMath2.C
1 /**
2  * \file ControlMath2.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 "ControlMath2.h"
14 #include "Kernel.h"
15 #include "funcrequest.h"
16
17
18 ControlMath2::ControlMath2(Dialog & dialog)
19         : Dialog::Controller(dialog)
20 {}
21
22
23 void ControlMath2::dispatchInsert(string const & name) const
24 {
25         kernel().dispatch(FuncRequest(LFUN_INSERT_MATH, '\\' + name));
26 }
27
28
29 void ControlMath2::dispatchSubscript() const
30 {
31         kernel().dispatch(FuncRequest(LFUN_SUBSCRIPT));
32 }
33
34
35 void ControlMath2::dispatchSuperscript() const
36 {
37         kernel().dispatch(FuncRequest(LFUN_SUPERSCRIPT));
38 }
39
40
41 void ControlMath2::dispatchCubeRoot() const
42 {
43         kernel().dispatch(FuncRequest(LFUN_INSERT_MATH, "\\root"));
44         kernel().dispatch(FuncRequest(LFUN_SELFINSERT, "3"));
45         kernel().dispatch(FuncRequest(LFUN_RIGHT));
46 }
47
48
49 void ControlMath2::dispatchMatrix(string const & str) const
50 {
51         kernel().dispatch(FuncRequest(LFUN_INSERT_MATRIX, str));
52 }
53
54
55 void ControlMath2::dispatchDelim(string const & str) const
56 {
57         kernel().dispatch(FuncRequest(LFUN_MATH_DELIM, str));
58 }
59
60
61 void ControlMath2::dispatchToggleDisplay() const
62 {
63         kernel().dispatch(FuncRequest(LFUN_MATH_DISPLAY));
64 }
65