]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormMathsStyle.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FormMathsStyle.C
index 95bbd23be38d182b0ec241292c79df99222256f1..b9de12dc42edf7c97c1f87ab77f78cd3b5b15c60 100644 (file)
@@ -8,25 +8,24 @@
  * \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 "bmtable.h"
-
 #include "lyx_forms.h"
+#include "bmtable.h"
 
 #include "style.xbm"
 #include "font.xbm"
 
+
 char const * latex_mathstyle[] = {
        "displaystyle", "textstyle", "scriptstyle", "scriptscriptstyle"
 };
@@ -37,10 +36,10 @@ kb_action latex_mathfontcmds[] = {
 };
 
 
-typedef FormCB<ControlMathSub, FormDB<FD_maths_style> > base_class;
+typedef FormController<ControlMath, FormView<FD_maths_style> > base_class;
 
-FormMathsStyle::FormMathsStyle()
-       : base_class(_("Math Styles & Fonts"), false),
+FormMathsStyle::FormMathsStyle(Dialog & parent)
+       : base_class(parent, _("Math Styles & Fonts"), false),
          style_(-1)
 {}
 
@@ -76,7 +75,7 @@ void FormMathsStyle::build()
 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]);
 }