]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlCommand.h
Really dull and boring header shit
[lyx.git] / src / frontends / controllers / ControlCommand.h
1 // -*- C++ -*-
2 /**
3  * \file ControlCommand.h
4  * Read the file COPYING
5  *
6  * \author Angus Leeming
7  *
8  * Full author contact details are available in file CREDITS
9  *
10  * ControlCommand is a controller class for dialogs that create or modify
11  * an inset derived from InsetCommand.
12  *
13  * The class is likely to be changed as other Inset controllers are created
14  * and it becomes clear just what functionality can be moved back into
15  * ControlInset.
16  *
17  */
18
19 #ifndef CONTROLCOMMAND_H
20 #define CONTROLCOMMAND_H
21
22 #ifdef __GNUG__
23 #pragma interface
24 #endif
25
26 #include "ControlInset.h"
27 #include "insets/insetcommand.h"
28 #include "commandtags.h" // kb_action
29
30 /** The Inset dialog controller. Connects/disconnects signals, launches
31     GUI-dependent View and returns the output from this View to the kernel.
32  */
33 class ControlCommand : public ControlInset<InsetCommand, InsetCommandParams>
34 {
35 public:
36         ///
37         ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
38
39 private:
40         /// Dispatch the changed parameters to the kernel.
41         virtual void applyParamsToInset();
42         ///
43         virtual void applyParamsNoInset();
44         /// get the parameters from the string passed to createInset.
45         virtual InsetCommandParams const getParams(string const &);
46         /// get the parameters from the inset passed to showInset.
47         virtual InsetCommandParams const getParams(InsetCommand const &);
48
49         /// Controls what is done in LyXFunc::Dispatch()
50         kb_action const action_;
51 };
52
53
54 #endif // CONTROLCOMMAND_H