]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormError.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormError.C
1 /*
2  * \file FormError.C
3  * This file is part of
4  * ====================================================== 
5  *
6  *           LyX, The Document Processor
7  *
8  *           Copyright 2000-2001 The LyX Team.
9  *
10  * ======================================================
11  *
12  * \author Angus Leeming, a.leeming@.ac.uk
13  */
14
15 #ifdef __GNUG__
16 #pragma implementation
17 #endif
18
19 #include <config.h>
20
21 #include "xformsBC.h"
22 #include "ControlError.h"
23 #include "FormError.h"
24 #include "form_error.h"
25 #include "xforms_helpers.h" // formatted
26
27 typedef FormCB<ControlError, FormDB<FD_form_error> > base_class;
28
29 FormError::FormError(ControlError & c)
30         : base_class(c, _("LaTeX Error"))
31 {}
32
33
34 void FormError::build()
35 {
36         dialog_.reset(build_error());
37
38         // Manage the cancel/close button
39         bc().setCancel(dialog_->button_cancel);
40 }
41
42
43 void FormError::update()
44 {
45         string const txt = formatted(controller().params(),
46                                      dialog_->message->w - 10);
47         fl_set_object_label(dialog_->message, txt.c_str());
48 }