3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS
15 #include "ControlError.h"
16 #include "FormError.h"
17 #include "forms/form_error.h"
18 #include "xforms_helpers.h" // formatted
19 #include "lyx_forms.h"
21 typedef FormController<ControlError, FormView<FD_error> > base_class;
23 FormError::FormError(Dialog & parent)
24 : base_class(parent, _("LaTeX Error"))
28 void FormError::build()
30 dialog_.reset(build_error(this));
32 // Manage the cancel/close button
33 bcview().setCancel(dialog_->button_close);
37 void FormError::update()
39 string const txt = formatted(controller().params(),
40 dialog_->frame_message->w - 10);
41 fl_set_object_label(dialog_->frame_message, txt.c_str());