]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlCommand.h
reverse last change
[lyx.git] / src / frontends / controllers / ControlCommand.h
1 // -*- C++ -*-
2 /**
3  * \file ControlCommand.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS
10  *
11  * ControlCommand is a controller class for dialogs that create or modify
12  * an inset derived from InsetCommand.
13  *
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
16  * ControlInset.
17  *
18  */
19
20 #ifndef CONTROLCOMMAND_H
21 #define CONTROLCOMMAND_H
22
23 #ifdef __GNUG__
24 #pragma interface
25 #endif
26
27 #include "ControlInset.h"
28 #include "insets/insetcommand.h"
29 #include "commandtags.h" // kb_action
30
31 /** The Inset dialog controller. Connects/disconnects signals, launches
32     GUI-dependent View and returns the output from this View to the kernel.
33  */
34 class ControlCommand
35         : public ControlInset<InsetCommand, InsetCommandParams>
36 {
37 public:
38         ///
39         ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
40 private:
41         /// Dispatch the changed parameters to the kernel.
42         virtual void applyParamsToInset();
43         ///
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 &);
49
50         /// Controls what is done in LyXFunc::Dispatch()
51         kb_action const action_;
52 };
53
54
55 #endif // CONTROLCOMMAND_H