]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormIndex.C
Removed // -*- C++ -*- from all .C files!
[lyx.git] / src / frontends / xforms / FormIndex.C
1 /* This file is part of
2  * ====================================================== 
3  *
4  *           LyX, The Document Processor
5  *
6  *           Copyright 2000-2001 The LyX Team.
7  *
8  * ======================================================
9  *
10  * \file FormIndex.C
11  * \author Angus Leeming, a.leeming@ic.ac.uk
12  */
13
14 #include <config.h>
15
16 #ifdef __GNUG__
17 #pragma implementation
18 #endif
19
20 #include "xformsBC.h"
21 #include "ControlIndex.h"
22 #include "FormIndex.h"
23 #include "LyXView.h"
24 #include "form_index.h"
25
26 typedef FormCB<ControlIndex, FormDB<FD_form_index> > base_class;
27
28 FormIndex::FormIndex(ControlIndex & c)
29         : base_class(c, _("Index"))
30 {}
31
32
33 void FormIndex::build()
34 {
35         dialog_.reset(build_index());
36
37         fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
38
39         // Manage the ok, apply, restore and cancel/close buttons
40         bc().setOK(dialog_->button_ok);
41         bc().setApply(dialog_->button_apply);
42         bc().setCancel(dialog_->button_cancel);
43         bc().setRestore(dialog_->button_restore);
44
45         bc().addReadOnly(dialog_->input_key);
46
47 }
48
49
50 void FormIndex::update()
51 {
52         fl_set_input(dialog_->input_key,
53                      controller().params().getContents().c_str());
54 }
55
56
57 void FormIndex::apply()
58 {
59         controller().params().setContents(fl_get_input(dialog_->input_key));
60 }