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"
24 ControlCommand::ControlCommand(Dialog & dialog, string const & lfun_name)
25 : Dialog::Controller(dialog),
30 bool ControlCommand::initialiseParams(string const & data)
32 // The name passed with LFUN_INSET_APPLY is also the name
33 // used to identify the mailer.
34 InsetCommandMailer::string2params(lfun_name_, data, params_);
39 void ControlCommand::clearParams()
41 params_ = InsetCommandParams();
45 void ControlCommand::dispatchParams()
47 if (lfun_name_.empty())
50 string const lfun = InsetCommandMailer::params2string(lfun_name_,
52 kernel().dispatch(FuncRequest(getLfun(), lfun));
55 } // namespace frontend