mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-01 05:25:55 +00:00
d4c8acbcb2
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1090 a592a061-630c-0410-9148-cb99ea01b6c8
50 lines
937 B
C
50 lines
937 B
C
// -*- 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"
|
|
|
|
FormCommand::FormCommand( LyXView * lv, Dialogs * d, string const & t,
|
|
ChangedBufferAction cba, ButtonPolicy * bp )
|
|
: FormBase( lv, d, t, BUFFER_DEPENDENT, cba, bp ),
|
|
inset_(0), ih_(0)
|
|
{}
|
|
|
|
|
|
void FormCommand::showInset( InsetCommand * inset )
|
|
{
|
|
if ( dialogIsOpen || inset == 0 ) return;
|
|
|
|
inset_ = inset;
|
|
ih_ = inset_->hide.connect(slot(this, &FormCommand::hide));
|
|
|
|
params = inset->params();
|
|
show();
|
|
}
|
|
|
|
|
|
void FormCommand::createInset( string const & arg )
|
|
{
|
|
if ( dialogIsOpen ) return;
|
|
|
|
params.setFromString( arg );
|
|
show();
|
|
}
|