]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlMath.h
hopefully fix tex2lyx linking.
[lyx.git] / src / frontends / controllers / ControlMath.h
1 // -*- C++ -*-
2 /**
3  * \file ControlMath.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  *
11  * ControlMath2 is a controller class for the Math Panel dialog.
12  */
13
14 #ifndef CONTROLMATH_H
15 #define CONTROLMATH_H
16
17
18 #include "Dialog.h"
19 #include "lfuns.h" // for kb_action
20
21 namespace lyx {
22 namespace frontend {
23
24 class ControlMath : public Dialog::Controller {
25 public:
26         ControlMath(Dialog &);
27
28         /// Nothing to initialise in this case.
29         virtual bool initialiseParams(std::string const &) { return true; }
30         virtual void clearParams() {}
31         virtual void dispatchParams() {}
32         virtual bool isBufferDependent() const { return true; }
33
34         /// dispatch an LFUN
35         void dispatchFunc(kb_action action, std::string const & arg = std::string()) const;
36         /// Insert a math symbol into the doc.
37         void dispatchInsert(std::string const & name) const;
38         /// Insert a subscript.
39         void dispatchSubscript() const;
40         /// Insert a superscript.
41         void dispatchSuperscript() const;
42         /// Insert a cube root
43         void dispatchCubeRoot() const;
44         /// Insert a matrix
45         void dispatchMatrix(std::string const & str) const;
46         /// Insert a variable size delimiter
47         void dispatchDelim(std::string const & str) const;
48         /// Insert a big delimiter
49         void dispatchBigDelim(std::string const & str) const;
50         /// Switch between display and inline
51         void dispatchToggleDisplay() const;
52         /** A request to the kernel to launch a dialog.
53          *  \param name the dialog identifier.
54          */
55         void showDialog(std::string const & name) const;
56 };
57
58
59 extern char const * function_names[];
60 extern int const nr_function_names;
61 extern char const * latex_arrow[];
62 extern int const nr_latex_arrow;
63 extern char const * latex_bop[];
64 extern int const nr_latex_bop;
65 extern char const * latex_brel[];
66 extern int const nr_latex_brel;
67 extern char const * latex_dots[];
68 extern int const nr_latex_dots;
69 extern char const * latex_greek[];
70 extern int const nr_latex_greek;
71 extern char const * latex_deco[];
72 extern int const nr_latex_deco;
73 extern char const * latex_misc[];
74 extern int const nr_latex_misc;
75 extern char const * latex_varsz[];
76 extern int const nr_latex_varsz;
77 extern char const * latex_ams_misc[];
78 extern int const nr_latex_ams_misc;
79 extern char const * latex_ams_arrows[];
80 extern int const nr_latex_ams_arrows;
81 extern char const * latex_ams_rel[];
82 extern int const nr_latex_ams_rel;
83 extern char const * latex_ams_nrel[];
84 extern int const nr_latex_ams_nrel;
85 extern char const * latex_ams_ops[];
86 extern int const nr_latex_ams_ops;
87
88 /**
89  * Return the mangled XPM filename of the given
90  * math symbol.
91  */
92 std::string const find_xpm(std::string const & name);
93
94 } // namespace frontend
95 } // namespace lyx
96
97 #endif // NOT CONTROLMATH