2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 2000 The LyX Team.
9 * ======================================================
14 #include FORMS_H_LOCATION
17 #pragma implementation
23 #include "FormInset.h"
25 FormInset::FormInset(LyXView * lv, Dialogs * d, string const & t,
27 char const * close, char const * cancel)
28 : FormBaseBD( lv, d, t, bp, close, cancel ), ih_(0)
32 void FormInset::connect()
34 u_ = d_->updateBufferDependent.
35 connect(slot(this, &FormInset::update));
36 h_ = d_->hideBufferDependent.
37 connect(slot(this, &FormInset::hide));
41 void FormInset::disconnect()
44 FormBaseBD::disconnect();
48 FormCommand::FormCommand( LyXView * lv, Dialogs * d, string const & t,
50 char const * close, char const * cancel)
51 : FormInset( lv, d, t, bp, close, cancel ),
56 void FormCommand::disconnect()
59 params = InsetCommandParams( string() );
60 FormInset::disconnect();
64 void FormCommand::showInset( InsetCommand * inset )
66 if (inset == 0) return; // maybe we should Assert this?
68 // If connected to another inset, disconnect from it.
73 params = inset->params();
74 ih_ = inset->hide.connect(slot(this, &FormCommand::hide));
79 void FormCommand::createInset( string const & arg )
86 params.setFromString( arg );