]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlCommand.h
dont use pragma impementation and interface anymore
[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
24 #include "ControlInset.h"
25 #include "insets/insetcommand.h"
26 #include "commandtags.h" // kb_action
27
28 /** The Inset dialog controller. Connects/disconnects signals, launches
29     GUI-dependent View and returns the output from this View to the kernel.
30  */
31 class ControlCommand
32         : public ControlInset<InsetCommand, InsetCommandParams>
33 {
34 public:
35         ///
36         ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
37 private:
38         /// Dispatch the changed parameters to the kernel.
39         virtual void applyParamsToInset();
40         ///
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 &);
46
47         /// Controls what is done in LyXFunc::Dispatch()
48         kb_action const action_;
49 };
50
51
52 #endif // CONTROLCOMMAND_H