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 #pragma implementation
17 #include "ControlCommand.h"
19 #include "BufferView.h"
20 #include "funcrequest.h"
24 ControlCommand::ControlCommand(LyXView & lv, Dialogs & d, kb_action ac)
25 : ControlInset<InsetCommand, InsetCommandParams>(lv, d),
30 InsetCommandParams const ControlCommand::getParams(string const & arg)
32 InsetCommandParams params;
33 params.setFromString(arg);
38 InsetCommandParams const ControlCommand::getParams(InsetCommand const & inset)
40 return inset.params();
44 void ControlCommand::applyParamsToInset()
46 inset()->setParams(params());
47 bufferview()->updateInset(inset(), true);
51 void ControlCommand::applyParamsNoInset()
53 if (action_ == LFUN_NOACTION)
55 lyxfunc().dispatch(FuncRequest(action_, params().getAsString()));