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