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 "ControlMath.h"
21 #include "FormMathsDeco.h"
22 #include "forms/form_maths_deco.h"
24 #include FORMS_H_LOCATION
29 FormMathsDeco::FormMathsDeco(LyXView & lv, Dialogs & d,
30 FormMathsPanel const & p)
31 : FormMathsSub(lv, d, p, _("Maths Decorations & Accents"), false)
35 FL_FORM * FormMathsDeco::form() const
43 void FormMathsDeco::build()
45 dialog_.reset(build_maths_deco(this));
47 fl_set_bmtable_data(dialog_->bmtable_deco1, 3, 4,
48 deco1_width, deco1_height, deco1_bits);
49 fl_set_bmtable_maxitems(dialog_->bmtable_deco1, 12);
51 fl_set_bmtable_data(dialog_->bmtable_deco2, 4, 3,
52 deco2_width, deco2_height, deco2_bits);
53 fl_set_bmtable_maxitems(dialog_->bmtable_deco2, 10);
55 bc().setCancel(dialog_->button_close);
56 bc().addReadOnly(dialog_->bmtable_deco1);
57 bc().addReadOnly(dialog_->bmtable_deco2);
61 void FormMathsDeco::apply()
63 if (deco_ < nr_latex_deco)
64 parent_.insertSymbol(latex_deco[deco_]);
68 bool FormMathsDeco::input(FL_OBJECT * ob, long)
70 deco_ = fl_get_bmtable(ob);
73 //if (ob == dialog_->bmtable_deco1)
75 if (ob == dialog_->bmtable_deco2)