4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Alejandro Aguilar Sierra
9 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS
14 #ifndef CONTROL_MATH_H
15 #define CONTROL_MATH_H
18 #include "ControlDialog_impl.h"
20 #include "ButtonController.h"
23 #include <boost/shared_ptr.hpp>
31 class ControlMath : public ControlDialogBD {
34 ControlMath(LyXView &, Dialogs &);
37 void dispatchFunc(kb_action act, string const & arg = string()) const;
38 /// dispatch a symbol insert
39 void insertSymbol(string const & sym, bool bs = true) const;
42 void addDaughter(void * key, ViewBase * v,
43 BCView * bc, ButtonPolicy * bcpolicy);
45 void showDaughter(void *);
52 typedef boost::shared_ptr<GUIMathSub> DaughterPtr;
54 typedef std::map<void *, DaughterPtr> Store;
56 /** The store of all daughter dialogs.
57 * The map uses the button on the main panel to identify them.
61 /// A pointer to the currently active daughter dialog.
66 class ControlMathSub : public ControlDialogBD {
69 ControlMathSub(LyXView &, Dialogs &, ControlMath const & p);
72 void dispatchFunc(kb_action act, string const & arg = string()) const;
73 /// dispatch a symbol insert
74 void insertSymbol(string const & sym, bool bs = true) const;
80 ControlMath const & parent_;
87 GUIMathSub(LyXView & lv, Dialogs & d,
88 ControlMath const & p,
91 ButtonPolicy * bcpolicy);
93 ControlMathSub & controller() { return controller_; }
97 ControlMathSub controller_;
99 boost::scoped_ptr<ButtonController> bc_;
101 boost::scoped_ptr<ViewBase> view_;
105 extern char const * function_names[];
106 extern int const nr_function_names;
107 extern char const * latex_arrow[];
108 extern int const nr_latex_arrow;
109 extern char const * latex_bop[];
110 extern int const nr_latex_bop;
111 extern char const * latex_brel[];
112 extern int const nr_latex_brel;
113 extern char const * latex_dots[];
114 extern int const nr_latex_dots;
115 extern char const * latex_greek[];
116 extern int const nr_latex_greek;
117 extern char const * latex_deco[];
118 extern int const nr_latex_deco;
119 extern char const * latex_misc[];
120 extern int const nr_latex_misc;
121 extern char const * latex_varsz[];
122 extern int const nr_latex_varsz;
123 extern char const * latex_ams_misc[];
124 extern int const nr_latex_ams_misc;
125 extern char const * latex_ams_arrows[];
126 extern int const nr_latex_ams_arrows;
127 extern char const * latex_ams_rel[];
128 extern int const nr_latex_ams_rel;
129 extern char const * latex_ams_nrel[];
130 extern int const nr_latex_ams_nrel;
131 extern char const * latex_ams_ops[];
132 extern int const nr_latex_ams_ops;
135 * Return the mangled XPM filename of the given
138 string const find_xpm(string const & name);
140 #endif /* CONTROL_MATH_H */