2 * \file FormMathsSpace.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 "FormMathsSpace.h"
21 #include "forms/form_maths_space.h"
22 #include "ControlMath.h"
25 #include FORMS_H_LOCATION
27 extern char * latex_mathspace[];
29 typedef FormCB<ControlMathSub, FormDB<FD_maths_space> > base_class;
31 FormMathsSpace::FormMathsSpace()
32 : base_class(_("Maths Spacing"), false),
37 void FormMathsSpace::build()
39 dialog_.reset(build_maths_space(this));
43 bc().setCancel(dialog_->button_close);
45 bc().addReadOnly(dialog_->button_negative);
46 bc().addReadOnly(dialog_->button_negmedspace);
47 bc().addReadOnly(dialog_->button_negthickspace);
48 bc().addReadOnly(dialog_->button_thin);
49 bc().addReadOnly(dialog_->button_medium);
50 bc().addReadOnly(dialog_->button_thick);
51 bc().addReadOnly(dialog_->button_quadratin);
52 bc().addReadOnly(dialog_->button_twoquadratin);
56 void FormMathsSpace::apply()
59 controller().insertSymbol(latex_mathspace[space_]);
62 ButtonPolicy::SMInput FormMathsSpace::input(FL_OBJECT *, long data)
66 if (data >= 0 && data < 8) {
70 return ButtonPolicy::SMI_VALID;