]> git.lyx.org Git - lyx.git/blob - src/frontends/DialogBase.h
some fixes to prev patch
[lyx.git] / src / frontends / DialogBase.h
1 // -*- C++ -*-
2 /* DialogBase.h
3  * Abstract base class of all dialogs.
4  * Author: Allan Rae <rae@lyx.org>
5  * This file is part of
6  * ====================================================== 
7  *
8  *           LyX, The Document Processor
9  *
10  *           Copyright 1995 Matthias Ettrich
11  *           Copyright 1995-2000 The LyX Team.
12  *
13  *           This file Copyright 2000
14  *           Allan Rae
15  * ======================================================
16  */
17 #ifndef DIALOGBASE_H
18 #define DIALOGBASE_H
19
20 #include <sigc++/signal_system.h>
21
22 // If we do not want to bring them in global namespace, they could be
23 // defined inside DialogBase... (JMarc) 
24 #ifdef SIGC_CXX_NAMESPACES
25 using SigC::Connection;
26 using SigC::slot;
27 #endif
28
29
30 /** Abstract base class of all dialogs.
31     The outside world only needs some way to tell a dialog when to show, hide
32     or update itself.  A dialog then takes whatever steps are necessary to
33     satisfy that request.  Thus a dialog will have to "pull" the necessary
34     details from the core of the program.
35  */
36 #ifdef SIGC_CXX_NAMESPACES
37 class DialogBase : public SigC::Object
38 #else
39 class DialogBase : public Object
40 #endif
41 {
42 public:
43         /**@name Constructors and Deconstructors */
44         //@{
45         ///
46         virtual ~DialogBase() {}
47         //@}
48
49         /**@name Signal Targets */
50         //@{
51         ///
52         virtual void show() = 0;
53         ///
54         virtual void hide() = 0;
55         ///
56         virtual void update() = 0;
57         //@}
58
59         ///
60         enum EnumDialogStatus {
61                 DIALOG_UNMODIFIED,
62                 DIALOG_MODIFIED,
63                 DIALOG_READONLY
64         };
65 };
66
67 #endif // DIALOGBASE_H