1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2000-2001 The LyX Team.
8 * ======================================================
13 #include FORMS_H_LOCATION
16 #pragma implementation
21 #include "FormInset.h"
26 FormInset::FormInset(LyXView * lv, Dialogs * d, string const & t)
27 : FormBaseBD(lv, d, t), ih_(0)
31 void FormInset::connect()
33 u_ = d_->updateBufferDependent.
34 connect(slot(this, &FormInset::updateSlot));
35 h_ = d_->hideBufferDependent.
36 connect(slot(this, &FormInset::hide));
37 FormBaseDeprecated::connect();
41 void FormInset::disconnect()
44 FormBaseBD::disconnect();
48 void FormInset::updateSlot(bool switched)
57 FormCommand::FormCommand(LyXView * lv, Dialogs * d, string const & t)
58 : FormInset(lv, d, t),
63 void FormCommand::disconnect()
66 params = InsetCommandParams(string());
67 FormInset::disconnect();
71 void FormCommand::showInset(InsetCommand * inset)
73 if (inset == 0) return; // maybe we should Assert this?
75 // If connected to another inset, disconnect from it.
80 params = inset->params();
81 ih_ = inset->hideDialog.connect(slot(this, &FormCommand::hide));
86 void FormCommand::createInset(string const & arg)
93 params.setFromString(arg);
95 bc().valid(); // so that the user can press Ok