2 * \file ControlCommand.cpp
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 & command_name,
25 string const & lfun_name)
26 : Dialog::Controller(dialog), params_(command_name),
31 bool ControlCommand::initialiseParams(string const & data)
33 // The name passed with LFUN_INSET_APPLY is also the name
34 // used to identify the mailer.
35 InsetCommandMailer::string2params(lfun_name_, data, params_);
40 void ControlCommand::clearParams()
46 void ControlCommand::dispatchParams()
48 if (lfun_name_.empty())
51 string const lfun = InsetCommandMailer::params2string(lfun_name_,
53 kernel().dispatch(FuncRequest(getLfun(), lfun));
56 } // namespace frontend