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
17 #include "commandtags.h"
18 #include "ControlDialog_impl.h"
20 #include "ButtonController.h"
21 #include "ButtonPolicies.h"
24 #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, ButtonControllerBase * bc);
44 void showDaughter(void *);
51 typedef boost::shared_ptr<GUIMathSub> DaughterPtr;
53 typedef std::map<void *, DaughterPtr> Store;
55 /** The store of all daughter dialogs.
56 * The map uses the button on the main panel to identify them.
60 /// A pointer to the currently active daughter dialog.
65 class ControlMathSub : public ControlDialogBD {
68 ControlMathSub(LyXView &, Dialogs &, ControlMath const & p);
71 void dispatchFunc(kb_action act, string const & arg = string()) const;
72 /// dispatch a symbol insert
73 void insertSymbol(string const & sym, bool bs = true) const;
79 ControlMath const & parent_;
86 GUIMathSub(LyXView & lv, Dialogs & d,
87 ControlMath const & p,
89 ButtonControllerBase * bc);
91 ControlMathSub & controller() { return controller_; }
95 ControlMathSub controller_;
97 boost::scoped_ptr<ButtonControllerBase> bc_;
99 boost::scoped_ptr<ViewBase> view_;
103 extern char const * function_names[];
104 extern int const nr_function_names;
105 extern char const * latex_arrow[];
106 extern int const nr_latex_arrow;
107 extern char const * latex_bop[];
108 extern int const nr_latex_bop;
109 extern char const * latex_brel[];
110 extern int const nr_latex_brel;
111 extern char const * latex_dots[];
112 extern int const nr_latex_dots;
113 extern char const * latex_greek[];
114 extern int const nr_latex_greek;
115 extern char const * latex_deco[];
116 extern int const nr_latex_deco;
117 extern char const * latex_misc[];
118 extern int const nr_latex_misc;
119 extern char const * latex_varsz[];
120 extern int const nr_latex_varsz;
121 extern char const * latex_ams_misc[];
122 extern int const nr_latex_ams_misc;
123 extern char const * latex_ams_arrows[];
124 extern int const nr_latex_ams_arrows;
125 extern char const * latex_ams_rel[];
126 extern int const nr_latex_ams_rel;
127 extern char const * latex_ams_nrel[];
128 extern int const nr_latex_ams_nrel;
129 extern char const * latex_ams_ops[];
130 extern int const nr_latex_ams_ops;
133 * Return the mangled XPM filename of the given
136 string const find_xpm(string const & name);
138 #endif /* CONTROL_MATH_H */