2003-07-08 14:19:25 +00:00
|
|
|
/**
|
|
|
|
* \file ControlNote.C
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2003-07-08 14:19:25 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
|
|
|
#include "ControlNote.h"
|
|
|
|
#include "funcrequest.h"
|
|
|
|
#include "insets/insetnote.h"
|
2003-07-30 21:47:18 +00:00
|
|
|
#include "gettext.h"
|
|
|
|
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
using std::string;
|
2003-07-30 21:47:18 +00:00
|
|
|
|
2004-05-19 15:11:37 +00:00
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
2003-07-08 14:19:25 +00:00
|
|
|
|
|
|
|
ControlNote::ControlNote(Dialog & parent)
|
|
|
|
: Dialog::Controller(parent)
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
bool ControlNote::initialiseParams(string const & data)
|
|
|
|
{
|
2003-12-10 14:49:51 +00:00
|
|
|
InsetNoteParams params;
|
2003-07-08 14:19:25 +00:00
|
|
|
InsetNoteMailer::string2params(data, params);
|
|
|
|
params_.reset(new InsetNoteParams(params));
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ControlNote::clearParams()
|
|
|
|
{
|
|
|
|
params_.reset();
|
|
|
|
}
|
|
|
|
|
2003-07-30 21:47:18 +00:00
|
|
|
|
2003-07-08 14:19:25 +00:00
|
|
|
void ControlNote::dispatchParams()
|
|
|
|
{
|
2003-12-10 14:49:51 +00:00
|
|
|
string const lfun = InsetNoteMailer::params2string(params());
|
2005-04-26 09:37:52 +00:00
|
|
|
kernel().dispatch(FuncRequest(getLfun(), lfun));
|
2003-07-08 14:19:25 +00:00
|
|
|
}
|
2004-05-19 15:11:37 +00:00
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|