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
27 #include "ControlInset.h"
28 #include "insets/insetcommand.h"
29 #include "commandtags.h" // kb_action
31 /** The Inset dialog controller. Connects/disconnects signals, launches
32 GUI-dependent View and returns the output from this View to the kernel.
34 class ControlCommand : public ControlInset<InsetCommand, InsetCommandParams>
38 ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
41 /// Dispatch the changed parameters to the kernel.
42 virtual void applyParamsToInset();
44 virtual void applyParamsNoInset();
45 /// get the parameters from the string passed to createInset.
46 virtual InsetCommandParams const getParams(string const &);
47 /// get the parameters from the inset passed to showInset.
48 virtual InsetCommandParams const getParams(InsetCommand const &);
50 /// Controls what is done in LyXFunc::Dispatch()
51 kb_action const action_;
55 #endif // CONTROLCOMMAND_H