3 * \file FormMathsPanel.h
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 FORM_MATHSPANEL_H
15 #define FORM_MATHSPANEL_H
17 #include "commandtags.h"
23 #include "MathsCallbacks.h"
24 #include "FormBaseDeprecated.h"
26 #include <boost/scoped_ptr.hpp>
28 class FormMathsBitmap;
31 class FormMathsMatrix;
35 struct FD_maths_panel;
38 * This class provides an XForms implementation of the maths panel.
40 class FormMathsPanel : public FormBaseBD {
43 FormMathsPanel(LyXView &, Dialogs &);
45 void setActive(FormMathsSub *) const;
47 void dispatchFunc(kb_action action) const;
48 /// dispatch a symbol insert
49 void insertSymbol(string const & sym, bool bs = true) const;
51 /// Pointer to the actual instantiation of the ButtonController.
52 virtual xformsBC & bc();
57 virtual bool input(FL_OBJECT *, long);
59 /// Pointer to the actual instantiation of the xforms form
60 virtual FL_FORM * form() const;
62 // Real GUI implementation
63 boost::scoped_ptr<FD_maths_panel> dialog_;
65 /// send LFUN_MATH_DISPLAY
66 void mathDisplay() const;
69 boost::scoped_ptr<FormMathsDeco> deco_;
70 boost::scoped_ptr<FormMathsDelim> delim_;
71 boost::scoped_ptr<FormMathsMatrix> matrix_;
72 boost::scoped_ptr<FormMathsSpace> space_;
73 boost::scoped_ptr<FormMathsStyle> style_;
74 boost::scoped_ptr<FormMathsBitmap> arrow_;
75 boost::scoped_ptr<FormMathsBitmap> boperator_;
76 boost::scoped_ptr<FormMathsBitmap> brelats_;
77 boost::scoped_ptr<FormMathsBitmap> greek_;
78 boost::scoped_ptr<FormMathsBitmap> misc_;
79 boost::scoped_ptr<FormMathsBitmap> dots_;
80 boost::scoped_ptr<FormMathsBitmap> varsize_;
81 boost::scoped_ptr<FormMathsBitmap> ams_misc_;
82 boost::scoped_ptr<FormMathsBitmap> ams_arrows_;
83 boost::scoped_ptr<FormMathsBitmap> ams_rel_;
84 boost::scoped_ptr<FormMathsBitmap> ams_nrel_;
85 boost::scoped_ptr<FormMathsBitmap> ams_ops_;
87 /// A pointer to the currently active subdialog
88 mutable FormMathsSub * active_;
90 /// The ButtonController
91 ButtonController<OkCancelReadOnlyPolicy, xformsBC> bc_;
95 class FormMathsSub : public FormBaseBD {
96 friend class FormMathsPanel; // has subdialogs to manipulate
100 FormMathsSub(LyXView &, Dialogs &, FormMathsPanel const &,
101 string const &, bool allowResize = true);
104 /// Pointer to the actual instantiation of the ButtonController.
105 virtual xformsBC & bc();
106 /// The parent Maths Panel
107 FormMathsPanel const & parent_;
110 virtual void connect();
112 virtual void disconnect();
113 /// The ButtonController
114 ButtonController<IgnorantPolicy, xformsBC> bc_;
119 xformsBC & FormMathsSub::bc()
125 xformsBC & FormMathsPanel::bc()
129 #endif // FORM_MATHSPANEL_H