2 * \file xforms/FormIndex.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS
14 #pragma implementation
18 #include "ControlIndex.h"
19 #include "FormIndex.h"
20 #include "forms/form_index.h"
21 #include FORMS_H_LOCATION
23 typedef FormCB<ControlIndex, FormDB<FD_index> > base_class;
25 FormIndex::FormIndex()
26 : base_class(_("Index"))
30 void FormIndex::build()
32 dialog_.reset(build_index(this));
34 fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
35 setPrehandler(dialog_->input_key);
37 // Manage the ok, apply, restore and cancel/close buttons
38 bc().setOK(dialog_->button_ok);
39 bc().setApply(dialog_->button_apply);
40 bc().setCancel(dialog_->button_close);
41 bc().setRestore(dialog_->button_restore);
43 bc().addReadOnly(dialog_->input_key);
48 void FormIndex::update()
50 fl_set_input(dialog_->input_key,
51 controller().params().getContents().c_str());
55 void FormIndex::apply()
57 controller().params().setContents(fl_get_input(dialog_->input_key));