]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/FormError.h
Small fix from Angus
[lyx.git] / src / frontends / gnome / 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 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "DialogBase.h"
20 #include "LString.h"
21 #include "boost/utility.hpp"
22 #include "insets/inseterror.h"
23
24 #include <gtk--/container.h>
25
26 /** This class provides an Gnome implementation of the FormError Dialog.
27  */
28 class FormError : public DialogBase, public noncopyable {
29 public:
30   ///
31   FormError(LyXView *, Dialogs *);
32   ///
33   ~FormError();
34 private:
35   /// Slot launching dialog to an existing inset
36   void showInset( InsetError * const );
37   
38   /// Update dialog before showing it
39   virtual void update(bool = false);
40   /// Apply from dialog (modify or create inset)
41   virtual void apply();
42   /// Explicitly free the dialog.
43   void free();
44   /// Create the dialog if necessary, update it and display it.
45   void show();
46   /// Hide the dialog.
47   void hide();
48   
49   /** Which LyXFunc do we use?
50       We could modify Dialogs to have a visible LyXFunc* instead and
51       save a couple of bytes per dialog.
52   */
53   LyXView * lv_;
54   /** Which Dialogs do we belong to?
55       Used so we can get at the signals we have to connect to.
56   */
57   Dialogs * d_;
58   /// pointer to the inset passed through showInset (if any)
59   InsetError * inset_;
60   /// Update connection.
61   Connection u_;
62   /// Hide connection.
63   Connection h_;
64   /// inset::hide connection.
65   Connection ih_;
66
67   /// Real GUI implementation.
68   Gtk::Container * dialog_;
69 };
70
71 #endif