4 * ======================================================
6 * LyX, The Document Processor
8 * Copyright 2000-2001 The LyX Team.
10 * ======================================================
12 * \author Angus Leeming, a.leeming@.ac.uk
16 #pragma implementation
22 #include "ControlError.h"
23 #include "FormError.h"
24 #include "form_error.h"
25 #include "xforms_helpers.h" // formatted
27 typedef FormCB<ControlError, FormDB<FD_form_error> > base_class;
29 FormError::FormError(ControlError & c)
30 : base_class(c, _("LaTeX Error"))
34 void FormError::build()
36 dialog_.reset(build_error());
38 // Manage the cancel/close button
39 bc().setCancel(dialog_->button_cancel);
43 void FormError::update()
45 string const txt = formatted(controller().params(),
46 dialog_->message->w - 10);
47 fl_set_object_label(dialog_->message, txt.c_str());