2 * \file ControlCommand.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Angus Leeming
8 * Full author contact details are available in file CREDITS.
13 #include "ControlCommand.h"
15 #include "funcrequest.h"
16 #include "insets/insetcommand.h"
22 ControlCommand::ControlCommand(Dialog & dialog, string const & lfun_name)
23 : Dialog::Controller(dialog),
28 bool ControlCommand::initialiseParams(string const & data)
30 // The name passed with LFUN_INSET_APPLY is also the name
31 // used to identify the mailer.
32 InsetCommandMailer::string2params(lfun_name_, data, params_);
37 void ControlCommand::clearParams()
39 params_ = InsetCommandParams();
43 void ControlCommand::dispatchParams()
45 if (lfun_name_.empty())
48 string const lfun = InsetCommandMailer::params2string(lfun_name_,
50 kernel().dispatch(FuncRequest(LFUN_INSET_APPLY, lfun));