1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2000-2001 The LyX Team.
8 * ======================================================
11 * \author Angus Leeming, a.leeming@ic.ac.uk
17 #pragma implementation
21 #include "ControlIndex.h"
22 #include "FormIndex.h"
24 #include "form_index.h"
26 typedef FormCB<ControlIndex, FormDB<FD_form_index> > base_class;
28 FormIndex::FormIndex(ControlIndex & c)
29 : base_class(c, _("Index"))
33 void FormIndex::build()
35 dialog_.reset(build_index());
37 fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
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);
45 bc().addReadOnly(dialog_->input_key);
50 void FormIndex::update()
52 fl_set_input(dialog_->input_key,
53 controller().params().getContents().c_str());
57 void FormIndex::apply()
59 controller().params().setContents(fl_get_input(dialog_->input_key));