]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormError.C
2002-07-02 Lars Gullik Bj�nnes <larsbj@birdstep.com>
[lyx.git] / src / frontends / xforms / FormError.C
1 /*
2  * \file FormError.C
3  * Copyright 2000-2001 The LyX Team.
4  * See the file COPYING.
5  *
6  * \author Angus Leeming, a.leeming@ic.ac.uk
7  */
8
9 #ifdef __GNUG__
10 #pragma implementation
11 #endif
12
13 #include <config.h>
14
15 #include "xformsBC.h"
16 #include "ControlError.h"
17 #include "FormError.h"
18 #include "forms/form_error.h"
19 #include "xforms_helpers.h" // formatted
20 #include FORMS_H_LOCATION
21
22 typedef FormCB<ControlError, FormDB<FD_error> > base_class;
23
24 FormError::FormError(ControlError & c, Dialogs & d)
25         : base_class(c, d, _("LaTeX Error"))
26 {}
27
28
29 void FormError::build()
30 {
31         dialog_.reset(build_error(this));
32
33         // Manage the cancel/close button
34         bc().setCancel(dialog_->button_close);
35 }
36
37
38 void FormError::update()
39 {
40         string const txt = formatted(controller().params(),
41                                      dialog_->frame_message->w - 10);
42         fl_set_object_label(dialog_->frame_message, txt.c_str());
43 }