]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlDialog.h
We don't currently use fork anywhere (or if we do it's by mistake!), so
[lyx.git] / src / frontends / controllers / ControlDialog.h
1 // -*- C++ -*-
2 /*
3  * \file ControlDialog.h
4  * Copyright 2002 the LyX Team
5  * Read the file COPYING
6  *
7  * \author Angus Leeming <a.leeming@ic.ac.uk>
8  *
9  * ControlDialog is to be used as a parent class for dialogs that are not
10  * views onto parameters of insets. (An ugly description I know, but I hope 
11  * the meaning is clear! Can anyone do any better?) Examples would be the 
12  * Document and Paragraph dialogs.
13  */
14
15 #ifndef CONTROLDIALOG_H
16 #define CONTROLDIALOG_H
17
18 class LyXView;
19 class Dialogs;
20
21 /** Base class to control connection/disconnection of signals with the LyX
22     kernel for dialogs NOT used with insets.
23     The Base class will be either ControlConnectBI or ControlConnectBD.
24  */
25 template <class Base>
26 class ControlDialog : public Base
27 {
28 public:
29         ///
30         ControlDialog(LyXView &, Dialogs &);
31
32 protected:
33         /// Show the dialog.
34         virtual void show();
35         /// Hide the dialog.
36         virtual void hide();
37         /// Update the dialog.
38         virtual void update();
39
40         /// clean-up on hide.
41         virtual void clearParams() {}
42         /// set the params before show or update
43         virtual void setParams() {}
44
45 private:
46         /// is the dialog built ?
47         bool dialog_built_;
48 };
49
50 #endif // CONTROLDIALOG_H