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
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "ControlWrap.h"
|
2003-03-05 23:19:45 +00:00
|
|
|
#include "funcrequest.h"
|
|
|
|
#include "lyxlength.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-05 23:19:45 +00:00
|
|
|
void 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));
|
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));
|
|
|
|
}
|