4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
11 * ControlMath2 is a controller class for the Math Panel dialog.
19 #include "lfuns.h" // for kb_action
22 class ControlMath : public Dialog::Controller {
24 ControlMath(Dialog &);
26 /// Nothing to initialise in this case.
27 virtual bool initialiseParams(std::string const &) { return true; }
28 virtual void clearParams() {}
29 virtual void dispatchParams() {}
30 virtual bool isBufferDependent() const { return true; }
33 void dispatchFunc(kb_action action, std::string const & arg = std::string()) const;
34 /// Insert a math symbol into the doc.
35 void dispatchInsert(std::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;
43 void dispatchMatrix(std::string const & str) const;
44 /// Insert a delimiter
45 void dispatchDelim(std::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.
51 void showDialog(std::string const & name) const;
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;
85 * Return the mangled XPM filename of the given
88 std::string const find_xpm(std::string const & name);
90 #endif // NOT CONTROLMATH