3 * \file ControlDialog.tmpl
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS
11 * ControlDialog is a base class and so these templatised methods will be
12 * instantiated if this file is #included in the derived classes' .C file.
15 #include "ControlDialog.h"
17 #include "ButtonController.h"
22 ControlDialog<Base>::ControlDialog(LyXView & lv, Dialogs & d)
23 : Base(lv, d), dialog_built_(false)
28 void ControlDialog<Base>::show()
30 if (this->isBufferDependent() && !this->bufferIsAvailable())
41 if (this->emergency_exit_) {
46 this->bc().readOnly(this->bufferIsReadonly());
49 // The widgets may not be valid, so refresh the button controller
55 void ControlDialog<Base>::update()
57 if (this->isBufferDependent() && !this->bufferIsAvailable())
61 if (this->emergency_exit_) {
66 this->bc().readOnly(this->bufferIsReadonly());
67 this->view().update();
69 // The widgets may not be valid, so refresh the button controller
75 void ControlDialog<Base>::hide()
77 this->emergency_exit_ = false;