2 * \file ControlCommand.C
3 * Read the file COPYING
5 * \author Angus Leeming
7 * Full author contact details are available in file CREDITS
13 #pragma implementation
16 #include "ControlCommand.h"
18 #include "BufferView.h"
19 #include "funcrequest.h"
23 ControlCommand::ControlCommand(LyXView & lv, Dialogs & d, kb_action ac)
24 : ControlInset<InsetCommand, InsetCommandParams>(lv, d),
29 InsetCommandParams const ControlCommand::getParams(string const & arg)
31 InsetCommandParams params;
32 params.setFromString(arg);
37 InsetCommandParams const ControlCommand::getParams(InsetCommand const & inset)
39 return inset.params();
43 void ControlCommand::applyParamsToInset()
45 inset()->setParams(params());
46 bufferview()->updateInset(inset(), true);
50 void ControlCommand::applyParamsNoInset()
52 if (action_ == LFUN_NOACTION)
54 lyxfunc().dispatch(FuncRequest(action_, params().getAsString()));