3 * \file ControlCommand.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS
11 * ControlCommand is a controller class for dialogs that create or modify
12 * an inset derived from InsetCommand.
14 * The class is likely to be changed as other Inset controllers are created
15 * and it becomes clear just what functionality can be moved back into
20 #ifndef CONTROLCOMMAND_H
21 #define CONTROLCOMMAND_H
24 #include "ControlInset.h"
25 #include "insets/insetcommand.h"
26 #include "commandtags.h" // kb_action
28 /** The Inset dialog controller. Connects/disconnects signals, launches
29 GUI-dependent View and returns the output from this View to the kernel.
32 : public ControlInset<InsetCommand, InsetCommandParams>
36 ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
38 /// Dispatch the changed parameters to the kernel.
39 virtual void applyParamsToInset();
41 virtual void applyParamsNoInset();
42 /// get the parameters from the string passed to createInset.
43 virtual InsetCommandParams const getParams(string const &);
44 /// get the parameters from the inset passed to showInset.
45 virtual InsetCommandParams const getParams(InsetCommand const &);
47 /// Controls what is done in LyXFunc::Dispatch()
48 kb_action const action_;
52 #endif // CONTROLCOMMAND_H