]> git.lyx.org Git - lyx.git/blob - src/frontends/gnome/FormError.h
try this for distinguishing inner and outer tabs
[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() { }
40   virtual void updateSlot(bool = false);
41   /// Apply from dialog (modify or create inset)
42   virtual void apply();
43   /// Explicitly free the dialog.
44   void free();
45   /// Create the dialog if necessary, update it and display it.
46   void show();
47   /// Hide the dialog.
48   void hide();
49   
50   /** Which LyXFunc do we use?
51       We could modify Dialogs to have a visible LyXFunc* instead and
52       save a couple of bytes per dialog.
53   */
54   LyXView * lv_;
55   /** Which Dialogs do we belong to?
56       Used so we can get at the signals we have to connect to.
57   */
58   Dialogs * d_;
59   /// pointer to the inset passed through showInset (if any)
60   InsetError * inset_;
61   /// Update connection.
62   Connection u_;
63   /// Hide connection.
64   Connection h_;
65   /// inset::hide connection.
66   Connection ih_;
67
68   /// Real GUI implementation.
69   Gtk::Container * dialog_;
70 };
71
72 #endif