3 * Copyright 2001 The LyX Team.
4 * See the file COPYING.
6 * \author Edwin Leuven, leuven@fee.uva.nl
12 #pragma implementation
16 #include "ControlPreamble.h"
17 #include "FormPreamble.h"
18 #include "form_preamble.h"
19 #include "xforms_helpers.h"
21 typedef FormCB<ControlPreamble, FormDB<FD_form_preamble> > base_class;
23 FormPreamble::FormPreamble(ControlPreamble & c)
24 : base_class(c, _("LaTeX preamble"))
28 void FormPreamble::build()
30 dialog_.reset(build_preamble());
32 fl_set_input_return(dialog_->input_preamble, FL_RETURN_CHANGED);
34 // Manage the ok, apply and cancel/close buttons
35 bc().setOK(dialog_->button_ok);
36 bc().setApply(dialog_->button_apply);
37 bc().setCancel(dialog_->button_cancel);
41 void FormPreamble::apply()
43 controller().params() = fl_get_input(dialog_->input_preamble);
47 void FormPreamble::update()
49 fl_set_input(dialog_->input_preamble, controller().params().c_str());