]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormPreamble.C
Really dull and boring header shit
[lyx.git] / src / frontends / xforms / FormPreamble.C
1 /**
2  * \file FormPreamble.C
3  * See the file COPYING.
4  *
5  * \author Edwin Leuven
6  *
7  * Full author contact details are available in file CREDITS
8  */
9
10 #include <config.h>
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include "xformsBC.h"
17 #include "ControlPreamble.h"
18 #include "FormPreamble.h"
19 #include "forms/form_preamble.h"
20 #include "xforms_helpers.h"
21 #include FORMS_H_LOCATION
22
23 typedef FormCB<ControlPreamble, FormDB<FD_preamble> > base_class;
24
25 FormPreamble::FormPreamble()
26         : base_class(_("LaTeX preamble"))
27 {}
28
29
30 void FormPreamble::build()
31 {
32         dialog_.reset(build_preamble(this));
33
34         fl_set_input_return(dialog_->input_preamble, FL_RETURN_CHANGED);
35
36         // trigger an input event when pasting using the middle mouse button.
37         setPrehandler(dialog_->input_preamble);
38
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);
43 }
44
45
46 void FormPreamble::apply()
47 {
48         controller().params() = fl_get_input(dialog_->input_preamble);
49 }
50
51
52 void FormPreamble::update()
53 {
54         fl_set_input(dialog_->input_preamble, controller().params().c_str());
55 }