]> git.lyx.org Git - lyx.git/blob - src/frontends/xforms/FormError.h
50331bb9411ae827fcbe1d38fa2c2efd34e7d39a
[lyx.git] / src / frontends / xforms / FormError.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ====================================================== 
4  *
5  *           LyX, The Document Processor
6  *
7  *           Copyright 2000 The LyX Team.
8  *
9  * ======================================================
10  */
11
12 #ifndef FORMERROR_H
13 #define FORMERROR_H
14
15 #include <boost/smart_ptr.hpp>
16
17 #ifdef __GNUG__
18 #pragma interface
19 #endif
20
21 #include "FormInset.h"
22
23 class InsetError;
24 struct FD_form_error;
25
26 /** This class provides an XForms implementation of the FormError Dialog.
27  */
28 class FormError : public FormInset {
29 public:
30         /// Constructor
31         FormError(LyXView *, Dialogs *);
32 private:
33         /// Pointer to the actual instantiation of the ButtonController.
34         virtual xformsBC & bc();
35         /// Disconnect signals. Also perform any necessary housekeeping.
36         virtual void disconnect();
37
38         /// Slot launching dialog to an existing inset
39         void showInset(InsetError *);
40         /// Update dialog before showing it
41         virtual void update();
42         /// Build the dialog
43         virtual void build();
44         /// Pointer to the actual instantiation of the xforms form
45         virtual FL_FORM * form() const;
46         /// Fdesign generated method
47         FD_form_error * build_error();
48
49         /// Real GUI implementation.
50         boost::scoped_ptr<FD_form_error> dialog_;
51         /// pointer to the inset passed through showInset
52         InsetError * inset_;
53         /// the error message
54         string message_;
55         /// The ButtonController
56         ButtonController<OkCancelPolicy, xformsBC> bc_;
57 };
58
59
60 inline
61 xformsBC & FormError::bc()
62 {
63         return bc_;
64 }
65 #endif