2000-08-03 12:56:25 +00:00
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
2001-03-28 13:11:08 +00:00
|
|
|
* Copyright 2000-2001 The LyX Team.
|
2000-08-03 12:56:25 +00:00
|
|
|
*
|
|
|
|
* ======================================================
|
2001-03-28 13:11:08 +00:00
|
|
|
*
|
|
|
|
* \file FormIndex.C
|
|
|
|
* \author Angus Leeming, a.leeming@ic.ac.uk
|
2000-08-03 12:56:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2001-03-28 13:11:08 +00:00
|
|
|
#include "xformsBC.h"
|
|
|
|
#include "ControlIndex.h"
|
2000-08-03 12:56:25 +00:00
|
|
|
#include "FormIndex.h"
|
|
|
|
#include "LyXView.h"
|
|
|
|
#include "form_index.h"
|
|
|
|
|
2001-03-28 13:11:08 +00:00
|
|
|
typedef FormCB<ControlIndex, FormDB<FD_form_index> > base_class;
|
2001-03-16 12:08:14 +00:00
|
|
|
|
2001-03-28 13:11:08 +00:00
|
|
|
FormIndex::FormIndex(ControlIndex & c)
|
|
|
|
: base_class(c, _("Index"))
|
|
|
|
{}
|
2000-10-03 05:53:25 +00:00
|
|
|
|
|
|
|
|
2000-08-03 12:56:25 +00:00
|
|
|
void FormIndex::build()
|
|
|
|
{
|
2001-03-15 13:37:04 +00:00
|
|
|
dialog_.reset(build_index());
|
2000-08-04 13:12:30 +00:00
|
|
|
|
2000-11-28 06:46:06 +00:00
|
|
|
fl_set_input_return(dialog_->input_key, FL_RETURN_CHANGED);
|
|
|
|
|
|
|
|
// Manage the ok, apply, restore and cancel/close buttons
|
2001-03-15 13:37:04 +00:00
|
|
|
bc().setOK(dialog_->button_ok);
|
|
|
|
bc().setApply(dialog_->button_apply);
|
|
|
|
bc().setCancel(dialog_->button_cancel);
|
2001-04-03 14:30:58 +00:00
|
|
|
bc().setRestore(dialog_->button_restore);
|
2000-11-28 06:46:06 +00:00
|
|
|
|
2001-03-15 13:37:04 +00:00
|
|
|
bc().addReadOnly(dialog_->input_key);
|
2001-03-28 13:11:08 +00:00
|
|
|
|
2000-08-03 12:56:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2000-10-24 13:13:59 +00:00
|
|
|
void FormIndex::update()
|
2000-08-03 12:56:25 +00:00
|
|
|
{
|
2001-03-28 13:11:08 +00:00
|
|
|
fl_set_input(dialog_->input_key,
|
|
|
|
controller().params().getContents().c_str());
|
2000-08-03 12:56:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormIndex::apply()
|
|
|
|
{
|
2001-03-28 13:11:08 +00:00
|
|
|
controller().params().setContents(fl_get_input(dialog_->input_key));
|
2000-08-03 12:56:25 +00:00
|
|
|
}
|