1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 2001 The LyX Team.
8 * ======================================================
10 * \file ControlCommand.h
11 * \author Angus Leeming <a.leeming@ic.ac.uk>
13 * ControlCommand is a controller class for dialogs that create or modify
14 * an inset derived from InsetCommand.
16 * The class is likely to be changed as other Inset controllers are created
17 * and it becomes clear just what functionality can be moved back into
22 #ifndef CONTROLCOMMAND_H
23 #define CONTROLCOMMAND_H
29 #include "ControlInset.h"
30 #include "insets/insetcommand.h"
31 #include "commandtags.h" // kb_action
33 /** The Inset dialog controller. Connects/disconnects signals, launches
34 GUI-dependent View and returns the output from this View to the kernel.
36 class ControlCommand : public ControlInset<InsetCommand, InsetCommandParams>
40 ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
43 /// Dispatch the changed parameters to the kernel.
44 virtual void applyParamsToInset();
46 virtual void applyParamsNoInset();
47 /// get the parameters from the string passed to createInset.
48 virtual InsetCommandParams const getParams(string const &);
49 /// get the parameters from the inset passed to showInset.
50 virtual InsetCommandParams const getParams(InsetCommand const &);
52 /// Controls what is done in LyXFunc::Dispatch()
53 kb_action const action_;
57 #endif // CONTROLCOMMAND_H