]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlCommand.h
Controller-view split of Graphics and Index popups.
[lyx.git] / src / frontends / controllers / ControlCommand.h
1 /* This file is part of
2  * ====================================================== 
3  *
4  *           LyX, The Document Processor
5  *
6  *           Copyright 2001 The LyX Team.
7  *
8  * ======================================================
9  *
10  * \file ControlCommand.h
11  * \author Angus Leeming <a.leeming@ic.ac.uk>
12  *
13  * ControlCommand is a controller class for dialogs that create or modify
14  * an inset derived from InsetCommand.
15  *
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
18  * ControlInset.
19  * 
20  */
21
22 #ifndef CONTROLCOMMAND_H
23 #define CONTROLCOMMAND_H
24
25 #ifdef __GNUG__
26 #pragma interface
27 #endif
28
29 #include "ControlInset.h"
30 #include "insets/insetcommand.h"
31 #include "commandtags.h" // kb_action
32
33 /** The Inset dialog controller. Connects/disconnects signals, launches 
34     GUI-dependent View and returns the output from this View to the kernel.
35  */
36 class ControlCommand : public ControlInset<InsetCommand, InsetCommandParams>
37 {
38 public:
39         ///
40         ControlCommand(LyXView &, Dialogs &, kb_action=LFUN_NOACTION);
41
42 private:
43         /// Dispatch the changed parameters to the kernel.
44         virtual void applyParamsToInset();
45         /// 
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 &);
51
52         /// Controls what is done in LyXFunc::Dispatch()
53         kb_action const action_;
54 };
55
56
57 #endif // CONTROLCOMMAND_H