1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \file ControlDialogs.h
11 * \author Angus Leeming <a.leeming@ic.ac.uk>
13 * ControlDialog is to be used as a parent class for dialogs that are not
14 * views onto parameters of insets. (An ugly description I know, but I hope
15 * the meaning is clear! * Can anyone do any better?) Examples would be the
16 * Document and Paragraph dialogs.
19 #ifndef CONTROLDIALOGS_H
20 #define CONTROLDIALOGS_H
22 #include "ControlConnections.h"
24 /** Base class to control connection/disconnection of signals with the LyX
25 kernel for dialogs NOT used with insets.
26 The Base class will be either ControlConnectBI or ControlConnectBD.
29 class ControlDialog : public Base
33 ControlDialog(LyXView &, Dialogs &);
40 /// Update the dialog.
41 virtual void update();
44 virtual void clearParams() {}
45 /// set the params before show or update
46 virtual void setParams() {}
54 ControlDialog<Base>::ControlDialog(LyXView & lv, Dialogs & d)
60 void ControlDialog<Base>::show()
62 if (isBufferDependent() && !lv_.view()->available())
67 bc().readOnly(isReadonly());
72 void ControlDialog<Base>::update()
74 if (isBufferDependent() && !lv_.view()->available())
79 bc().readOnly(isReadonly());
84 void ControlDialog<Base>::hide()
92 #endif // CONTROLDIALOGS_H