1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \file ControlCommand.C
11 * \author Angus Leeming <a.leeming@ic.ac.uk>
17 #pragma implementation
20 #include "ControlCommand.h"
22 #include "BufferView.h"
23 #include "funcrequest.h"
27 ControlCommand::ControlCommand(LyXView & lv, Dialogs & d, kb_action ac)
28 : ControlInset<InsetCommand, InsetCommandParams>(lv, d),
33 InsetCommandParams const ControlCommand::getParams(string const & arg)
35 InsetCommandParams params;
36 params.setFromString(arg);
41 InsetCommandParams const ControlCommand::getParams(InsetCommand const & inset)
43 return inset.params();
47 void ControlCommand::applyParamsToInset()
49 inset()->setParams(params());
50 bufferview()->updateInset(inset(), true);
54 void ControlCommand::applyParamsNoInset()
56 if (action_ == LFUN_NOACTION)
58 lyxfunc().dispatch(FuncRequest(action_, params().getAsString()));