2 * \file FormMathsDeco.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Alejandro Aguilar Sierra
7 * \author Pablo De Napoli
9 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS
17 #pragma implementation
20 #include "FormMathsDeco.h"
21 #include "forms/form_maths_deco.h"
23 #include FORMS_H_LOCATION
28 FormMathsDeco::FormMathsDeco(LyXView & lv, Dialogs & d,
29 FormMathsPanel const & p)
30 : FormMathsSub(lv, d, p, _("Maths Decorations & Accents"), false)
34 FL_FORM * FormMathsDeco::form() const
42 void FormMathsDeco::build()
44 dialog_.reset(build_maths_deco(this));
46 fl_set_bmtable_data(dialog_->bmtable_deco1, 3, 4,
47 deco1_width, deco1_height, deco1_bits);
48 fl_set_bmtable_maxitems(dialog_->bmtable_deco1, 12);
50 fl_set_bmtable_data(dialog_->bmtable_deco2, 4, 3,
51 deco2_width, deco2_height, deco2_bits);
52 fl_set_bmtable_maxitems(dialog_->bmtable_deco2, 10);
54 bc().setCancel(dialog_->button_close);
55 bc().addReadOnly(dialog_->bmtable_deco1);
56 bc().addReadOnly(dialog_->bmtable_deco2);
60 void FormMathsDeco::apply()
62 if (deco_ < nr_latex_deco)
63 parent_.insertSymbol(latex_deco[deco_]);
67 bool FormMathsDeco::input(FL_OBJECT * ob, long)
69 deco_ = fl_get_bmtable(ob);
72 //if (ob == dialog_->bmtable_deco1)
74 if (ob == dialog_->bmtable_deco2)