2002-09-10 10:18:58 +00:00
|
|
|
/**
|
|
|
|
* \file ControlWrap.C
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Dekel Tsur
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-09-10 10:18:58 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "ControlWrap.h"
|
2003-03-05 23:19:45 +00:00
|
|
|
#include "funcrequest.h"
|
|
|
|
#include "insets/insetwrap.h"
|
2002-09-10 10:18:58 +00:00
|
|
|
|
|
|
|
|
2003-03-05 23:19:45 +00:00
|
|
|
ControlWrap::ControlWrap(Dialog & parent)
|
|
|
|
: Dialog::Controller(parent)
|
2002-09-10 10:18:58 +00:00
|
|
|
{}
|
|
|
|
|
|
|
|
|
2003-03-14 00:20:42 +00:00
|
|
|
bool ControlWrap::initialiseParams(string const & data)
|
2002-09-10 10:18:58 +00:00
|
|
|
{
|
2003-03-05 23:19:45 +00:00
|
|
|
InsetWrapParams params;
|
|
|
|
InsetWrapMailer::string2params(data, params);
|
|
|
|
params_.reset(new InsetWrapParams(params));
|
2003-03-14 00:20:42 +00:00
|
|
|
return true;
|
2002-09-10 10:18:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-05 23:19:45 +00:00
|
|
|
void ControlWrap::clearParams()
|
2002-09-10 10:18:58 +00:00
|
|
|
{
|
2003-03-05 23:19:45 +00:00
|
|
|
params_.reset();
|
2002-09-10 10:18:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2003-03-05 23:19:45 +00:00
|
|
|
void ControlWrap::dispatchParams()
|
|
|
|
{
|
2003-03-07 14:08:10 +00:00
|
|
|
string const lfun = InsetWrapMailer::params2string(params());
|
2003-03-05 23:19:45 +00:00
|
|
|
kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));
|
|
|
|
}
|