]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormError.C
Yet more dialog tweaking from Rob.
[lyx.git] / src / frontends / xforms / FormError.C
1 /**
2  * \file FormError.C
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Angus Leeming 
7  *
8  * Full author contact details are available in file CREDITS
9  */
10
11 #ifdef __GNUG__
12 #pragma implementation
13 #endif
14
15 #include <config.h>
16
17 #include "xformsBC.h"
18 #include "ControlError.h"
19 #include "FormError.h"
20 #include "forms/form_error.h"
21 #include "xforms_helpers.h" // formatted
22 #include FORMS_H_LOCATION
23
24 typedef FormCB<ControlError, FormDB<FD_error> > base_class;
25
26 FormError::FormError()
27         : base_class(_("LaTeX Error"))
28 {}
29
30
31 void FormError::build()
32 {
33         dialog_.reset(build_error(this));
34
35         // Manage the cancel/close button
36         bc().setCancel(dialog_->button_close);
37 }
38
39
40 void FormError::update()
41 {
42         string const txt = formatted(controller().params(),
43                                      dialog_->frame_message->w - 10);
44         fl_set_object_label(dialog_->frame_message, txt.c_str());
45 }