3 * See the file COPYING.
7 * Full author contact details are available in file CREDITS
13 #pragma implementation
17 #include "ControlPreamble.h"
18 #include "FormPreamble.h"
19 #include "forms/form_preamble.h"
20 #include "xforms_helpers.h"
21 #include FORMS_H_LOCATION
23 typedef FormCB<ControlPreamble, FormDB<FD_preamble> > base_class;
25 FormPreamble::FormPreamble()
26 : base_class(_("LaTeX preamble"))
30 void FormPreamble::build()
32 dialog_.reset(build_preamble(this));
34 fl_set_input_return(dialog_->input_preamble, FL_RETURN_CHANGED);
36 // trigger an input event when pasting using the middle mouse button.
37 setPrehandler(dialog_->input_preamble);
39 // Manage the ok, apply and cancel/close buttons
40 bc().setOK(dialog_->button_ok);
41 bc().setApply(dialog_->button_apply);
42 bc().setCancel(dialog_->button_close);
46 void FormPreamble::apply()
48 controller().params() = fl_get_input(dialog_->input_preamble);
52 void FormPreamble::update()
54 fl_set_input(dialog_->input_preamble, controller().params().c_str());