* \author John Levon
* \author Angus Leeming
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
* Adapted from FormMathsSpace martin.vermeer@hut.fi
*/
#include <config.h>
-
#include "FormMathsStyle.h"
#include "forms/form_maths_style.h"
#include "ControlMath.h"
#include "xformsBC.h"
+#include "lyx_forms.h"
#include "bmtable.h"
-#include FORMS_H_LOCATION
-
#include "style.xbm"
#include "font.xbm"
+
char const * latex_mathstyle[] = {
"displaystyle", "textstyle", "scriptstyle", "scriptscriptstyle"
};
};
-typedef FormCB<ControlMathSub, FormDB<FD_maths_style> > base_class;
+typedef FormController<ControlMath, FormView<FD_maths_style> > base_class;
-FormMathsStyle::FormMathsStyle()
- : base_class(_("Maths Styles & Fonts"), false),
+FormMathsStyle::FormMathsStyle(Dialog & parent)
+ : base_class(parent, _("Math Styles & Fonts"), false),
style_(-1)
{}
void FormMathsStyle::apply()
{
if ((style_ >= 0) && (style_ < 4))
- controller().insertSymbol(latex_mathstyle[style_]);
+ controller().dispatchInsert(latex_mathstyle[style_]);
else if ((style_ >= 4) && (style_ < 14))
controller().dispatchFunc(latex_mathfontcmds[style_-4]);
}