]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlMath.h
Move xforms' Maths Panel to the new scheme.
[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
22 class ControlMath : public Dialog::Controller {
23 public:
24         ControlMath(Dialog &);
25
26         virtual bool initialiseParams(string const &) { return true; }
27         virtual void clearParams() {}
28         virtual void dispatchParams() {}
29         virtual bool isBufferDependent() const { return true; }
30
31         /// dispatch an LFUN
32         void dispatchFunc(kb_action action, string const & arg = string()) const;
33         /// Insert a math symbol into the doc.
34         void dispatchInsert(string const & name) const;
35         /// Insert a subscript.
36         void dispatchSubscript() const;
37         /// Insert a superscript.
38         void dispatchSuperscript() const;
39         /// Insert a cube root
40         void dispatchCubeRoot() const;
41         /// Insert a matrix
42         void dispatchMatrix(string const & str) const;
43         /// Insert a delimiter
44         void dispatchDelim(string const & str) const;
45         /// switch between display and inline
46         void dispatchToggleDisplay() const;
47         /// a request to launch dialog \param name.
48         void showDialog(string const & name) const;
49 };
50
51
52 extern char const * function_names[];
53 extern int const nr_function_names;
54 extern char const * latex_arrow[];
55 extern int const nr_latex_arrow;
56 extern char const * latex_bop[];
57 extern int const nr_latex_bop;
58 extern char const * latex_brel[];
59 extern int const nr_latex_brel;
60 extern char const * latex_dots[];
61 extern int const nr_latex_dots;
62 extern char const * latex_greek[];
63 extern int const nr_latex_greek;
64 extern char const * latex_deco[];
65 extern int const nr_latex_deco;
66 extern char const * latex_misc[];
67 extern int const nr_latex_misc;
68 extern char const * latex_varsz[];
69 extern int const nr_latex_varsz;
70 extern char const * latex_ams_misc[];
71 extern int const nr_latex_ams_misc;
72 extern char const * latex_ams_arrows[];
73 extern int const nr_latex_ams_arrows;
74 extern char const * latex_ams_rel[];
75 extern int const nr_latex_ams_rel;
76 extern char const * latex_ams_nrel[];
77 extern int const nr_latex_ams_nrel;
78 extern char const * latex_ams_ops[];
79 extern int const nr_latex_ams_ops;
80
81 /**
82  * Return the mangled XPM filename of the given
83  * math symbol.
84  */
85 string const find_xpm(string const & name);
86
87 #endif // NOT CONTROLMATH