2 * \file xforms/FormIndex.C
3 * Copyright 2000-2001 The LyX Team.
4 * See the file COPYING.
6 * \author Angus Leeming, a.leeming@ic.ac.uk
12 #pragma implementation
16 #include "ControlIndex.h"
17 #include "FormIndex.h"
18 #include "frontends/LyXView.h"
19 #include "forms/form_index.h"
20 #include FORMS_H_LOCATION
22 typedef FormCB<ControlIndex, FormDB<FD_index> > base_class;
24 FormIndex::FormIndex(ControlIndex & c)
25 : base_class(c, _("Index"))
29 void FormIndex::build()
31 dialog_.reset(build_index(this));
33 fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
34 setPrehandler(dialog_->input_key);
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);
42 bc().addReadOnly(dialog_->input_key);
47 void FormIndex::update()
49 fl_set_input(dialog_->input_key,
50 controller().params().getContents().c_str());
54 void FormIndex::apply()
56 controller().params().setContents(fl_get_input(dialog_->input_key));