2000-08-01 17:33:32 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/* This file is part of
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 2000 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include FORMS_H_LOCATION
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include "Dialogs.h"
|
|
|
|
#include "FormCommand.h"
|
|
|
|
|
2000-10-02 00:10:25 +00:00
|
|
|
FormCommand::FormCommand( LyXView * lv, Dialogs * d, string const & t,
|
2000-10-10 01:33:42 +00:00
|
|
|
ChangedBufferAction cba, ButtonPolicy * bp )
|
|
|
|
: FormBase( lv, d, t, BUFFER_DEPENDENT, cba, bp ),
|
2000-09-27 05:40:29 +00:00
|
|
|
inset_(0), ih_(0)
|
2000-08-01 17:33:32 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
2000-10-04 03:17:36 +00:00
|
|
|
void FormCommand::showInset( InsetCommand * inset )
|
2000-08-01 17:33:32 +00:00
|
|
|
{
|
2000-10-02 00:10:25 +00:00
|
|
|
if ( dialogIsOpen || inset == 0 ) return;
|
2000-08-01 17:33:32 +00:00
|
|
|
|
|
|
|
inset_ = inset;
|
2000-08-03 12:56:25 +00:00
|
|
|
ih_ = inset_->hide.connect(slot(this, &FormCommand::hide));
|
2000-08-01 17:33:32 +00:00
|
|
|
|
|
|
|
params = inset->params();
|
|
|
|
show();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FormCommand::createInset( string const & arg )
|
|
|
|
{
|
2000-10-02 00:10:25 +00:00
|
|
|
if ( dialogIsOpen ) return;
|
2000-08-01 17:33:32 +00:00
|
|
|
|
|
|
|
params.setFromString( arg );
|
|
|
|
show();
|
|
|
|
}
|