]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormIndex.C
Really dull and boring header shit
[lyx.git] / src / frontends / xforms / FormIndex.C
1 /**
2  * \file xforms/FormIndex.C
3  * See the file COPYING.
4  *
5  * \author Angus Leeming 
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 "ControlIndex.h"
18 #include "FormIndex.h"
19 #include "forms/form_index.h"
20 #include FORMS_H_LOCATION
21
22 typedef FormCB<ControlIndex, FormDB<FD_index> > base_class;
23
24 FormIndex::FormIndex()
25         : base_class(_("Index"))
26 {}
27
28
29 void FormIndex::build()
30 {
31         dialog_.reset(build_index(this));
32
33         fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
34         setPrehandler(dialog_->input_key);
35
36         // Manage the ok, apply, restore and cancel/close buttons
37         bc().setOK(dialog_->button_ok);
38         bc().setApply(dialog_->button_apply);
39         bc().setCancel(dialog_->button_close);
40         bc().setRestore(dialog_->button_restore);
41
42         bc().addReadOnly(dialog_->input_key);
43
44 }
45
46
47 void FormIndex::update()
48 {
49         fl_set_input(dialog_->input_key,
50                      controller().params().getContents().c_str());
51 }
52
53
54 void FormIndex::apply()
55 {
56         controller().params().setContents(fl_get_input(dialog_->input_key));
57 }