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
14 #include "ControlCommand.h"
16 #include "BufferView.h"
17 #include "funcrequest.h"
21 ControlCommand::ControlCommand(LyXView & lv, Dialogs & d, kb_action ac)
22 : ControlInset<InsetCommand, InsetCommandParams>(lv, d),
27 InsetCommandParams const ControlCommand::getParams(string const & arg)
29 InsetCommandParams params;
30 params.setFromString(arg);
35 InsetCommandParams const ControlCommand::getParams(InsetCommand const & inset)
37 return inset.params();
41 void ControlCommand::applyParamsToInset()
43 inset()->setParams(params());
44 bufferview()->updateInset(inset(), true);
48 void ControlCommand::applyParamsNoInset()
50 if (action_ == LFUN_NOACTION)
52 lyxfunc().dispatch(FuncRequest(action_, params().getAsString()));