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