]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormMathsDeco.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / FormMathsDeco.C
index a710038e1da1ec1a9aa9674eab2c8c148e70f524..ec0c43a6fe49e0d8f2057819f2a4e24f0fa320fd 100644 (file)
@@ -1,12 +1,14 @@
 /**
  * \file FormMathsDeco.C
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
  * \author Alejandro Aguilar Sierra
- * \author Pablo De Napoli, pdenapo@dm.uba.ar
- * \author John Levon, moz@compsoc.man.ac.uk
- * \author Angus Leeming, a.leeming@ic.ac.uk
+ * \author Pablo De Napoli
+ * \author John Levon
+ * \author Angus Leeming 
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 #pragma implementation
 #endif
 
+#include "ControlMath.h"
 #include "FormMathsDeco.h"
-#include "form_maths_deco.h"
-#include "Dialogs.h"
+#include "forms/form_maths_deco.h"
 #include "bmtable.h"
+#include FORMS_H_LOCATION
 
 #include "deco.xbm"
 
 
-static char const * decoration_names[] = {
-       "widehat", "widetilde", "overbrace", "overleftarrow", "overrightarrow",
-       "overline", "underbrace", "underline", "underleftarrow", "underrightarrow",
-       "underleftrightarrow", "overleftrightarrow",
-       "hat", "acute", "bar", "dot",
-       "check", "grave", "vec", "ddot",
-       "breve", "tilde"
-};
-
-
-static int const nr_decoration_names = sizeof(decoration_names) / sizeof(char const *);
-
-FormMathsDeco::FormMathsDeco(LyXView * lv, Dialogs * d,
+FormMathsDeco::FormMathsDeco(LyXView & lv, Dialogs & d,
                             FormMathsPanel const & p)
        : FormMathsSub(lv, d, p, _("Maths Decorations & Accents"), false)
 {}
@@ -51,7 +42,7 @@ FL_FORM * FormMathsDeco::form() const
 
 void FormMathsDeco::build()
 {
-       dialog_.reset(build_maths_deco());
+       dialog_.reset(build_maths_deco(this));
 
        fl_set_bmtable_data(dialog_->bmtable_deco1, 3, 4,
                            deco1_width, deco1_height, deco1_bits);
@@ -69,8 +60,8 @@ void FormMathsDeco::build()
 
 void FormMathsDeco::apply()
 {
-       if (deco_ < nr_decoration_names)
-               parent_.insertSymbol(decoration_names[deco_]);
+       if (deco_ < nr_latex_deco)
+               parent_.insertSymbol(latex_deco[deco_]);
 }