2002-09-05 14:10:50 +00:00
|
|
|
/**
|
2001-03-23 17:09:34 +00:00
|
|
|
* \file FormError.C
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2000-09-22 15:09:51 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Angus Leeming
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
2000-09-22 15:09:51 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
2001-03-23 17:09:34 +00:00
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "xformsBC.h"
|
|
|
|
#include "ControlError.h"
|
2000-09-22 15:09:51 +00:00
|
|
|
#include "FormError.h"
|
2002-06-13 13:43:51 +00:00
|
|
|
#include "forms/form_error.h"
|
2001-03-23 17:09:34 +00:00
|
|
|
#include "xforms_helpers.h" // formatted
|
2002-06-13 13:43:51 +00:00
|
|
|
#include FORMS_H_LOCATION
|
2000-10-03 05:53:25 +00:00
|
|
|
|
2002-06-13 13:43:51 +00:00
|
|
|
typedef FormCB<ControlError, FormDB<FD_error> > base_class;
|
2000-10-03 05:53:25 +00:00
|
|
|
|
2002-08-12 14:28:43 +00:00
|
|
|
FormError::FormError()
|
|
|
|
: base_class(_("LaTeX Error"))
|
2001-03-23 17:09:34 +00:00
|
|
|
{}
|
2000-09-22 15:09:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
void FormError::build()
|
|
|
|
{
|
2002-06-13 13:43:51 +00:00
|
|
|
dialog_.reset(build_error(this));
|
2000-09-22 15:09:51 +00:00
|
|
|
|
2002-03-21 21:21:28 +00:00
|
|
|
// Manage the cancel/close button
|
2002-03-12 14:11:15 +00:00
|
|
|
bc().setCancel(dialog_->button_close);
|
2000-09-22 15:09:51 +00:00
|
|
|
}
|
2001-03-23 17:09:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
void FormError::update()
|
|
|
|
{
|
|
|
|
string const txt = formatted(controller().params(),
|
2002-03-12 14:11:15 +00:00
|
|
|
dialog_->frame_message->w - 10);
|
|
|
|
fl_set_object_label(dialog_->frame_message, txt.c_str());
|
2001-03-23 17:09:34 +00:00
|
|
|
}
|