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