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