3 * Copyright 2000-2001 The LyX Team.
4 * See the file COPYING.
6 * \author Angus Leeming, a.leeming@ic.ac.uk
11 #include FORMS_H_LOCATION
14 #pragma implementation
18 #include "frontends/LyXView.h"
19 #include "FormInset.h"
24 FormInset::FormInset(LyXView * lv, Dialogs * d, string const & t)
25 : FormBaseBD(lv, d, t), ih_(0)
29 void FormInset::connect()
31 u_ = d_->updateBufferDependent.
32 connect(slot(this, &FormInset::updateSlot));
33 h_ = d_->hideBufferDependent.
34 connect(slot(this, &FormInset::hide));
35 FormBaseDeprecated::connect();
39 void FormInset::disconnect()
42 FormBaseBD::disconnect();
46 void FormInset::updateSlot(bool switched)
55 FormCommand::FormCommand(LyXView * lv, Dialogs * d, string const & t)
56 : FormInset(lv, d, t),
61 void FormCommand::disconnect()
64 params = InsetCommandParams(string());
65 FormInset::disconnect();
69 void FormCommand::showInset(InsetCommand * inset)
71 if (inset == 0) return; // maybe we should Assert this?
73 // If connected to another inset, disconnect from it.
78 params = inset->params();
79 ih_ = inset->hideDialog.connect(slot(this, &FormCommand::hide));
84 void FormCommand::createInset(string const & arg)
91 params.setFromString(arg);
93 bc().valid(); // so that the user can press Ok