5 * ======================================================
7 * LyX, The Document Processor
9 * Copyright 2000-2001 The LyX Team.
11 * ======================================================
13 * \author Angus Leeming, a.leeming@.ac.uk
17 #pragma implementation
23 #include "ControlError.h"
24 #include "FormError.h"
25 #include "form_error.h"
26 #include "xforms_helpers.h" // formatted
28 typedef FormCB<ControlError, FormDB<FD_form_error> > base_class;
30 FormError::FormError(ControlError & c)
31 : base_class(c, _("LaTeX Error"))
35 void FormError::build()
37 dialog_.reset(build_error());
39 // Manage the cancel/close button
40 bc().setCancel(dialog_->button_cancel);
44 void FormError::update()
46 string const txt = formatted(controller().params(),
47 dialog_->message->w - 10);
48 fl_set_object_label(dialog_->message, txt.c_str());