/**
* \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)
{}
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);
void FormMathsDeco::apply()
{
- if (deco_ < nr_decoration_names)
- parent_.insertSymbol(decoration_names[deco_]);
+ if (deco_ < nr_latex_deco)
+ parent_.insertSymbol(latex_deco[deco_]);
}