2001-03-23 17:09:34 +00:00
|
|
|
/*
|
|
|
|
* \file FormError.C
|
2002-03-11 17:00:41 +00:00
|
|
|
* Copyright 2000-2001 The LyX Team.
|
|
|
|
* See the file COPYING.
|
2000-09-22 15:09:51 +00:00
|
|
|
*
|
2002-03-11 17:00:41 +00:00
|
|
|
* \author Angus Leeming, a.leeming@ic.ac.uk
|
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
|
|
|
|
2001-03-23 17:09:34 +00:00
|
|
|
FormError::FormError(ControlError & c)
|
|
|
|
: base_class(c, _("LaTeX Error"))
|
|
|
|
{}
|
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
|
|
|
}
|