]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlERT.h
Various update/redraw fixes. Cleaned up InsetERT and added a dialog for
[lyx.git] / src / frontends / controllers / ControlERT.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 ControlERT.h
12  * \author Juergen Vigna, jug@sad.it
13  * \author Angus Leeming, a.leeming@ic.ac.uk
14  */
15
16 #ifndef CONTROLERT_H
17 #define CONTROLERT_H
18
19 #include <vector>
20
21 #ifdef __GNUG__
22 #pragma interface
23 #endif
24
25 #include "ControlInset.h"
26 #include "insets/insetert.h" // InsetERT::Status
27
28 /** This should be moved back into insetert.h and InsetERT should
29     contain an instance of it. */
30
31 struct ERTParams {
32         ///
33         ERTParams();
34         ///
35         ERTParams(InsetERT const &);
36         ///
37         InsetERT::ERTStatus status;
38 };
39
40
41 ///
42 bool operator==(ERTParams const &, ERTParams const &);
43 ///
44 bool operator!=(ERTParams const &, ERTParams const &);
45
46
47 /** A controller for ERT dialogs.
48  */
49 class ControlERT : public ControlInset<InsetERT, ERTParams>  {
50 public:
51         ///
52         ControlERT(LyXView &, Dialogs &);
53
54 private:
55         /// Dispatch the changed parameters to the kernel.
56         virtual void applyParamsToInset();
57         /// 
58         virtual void applyParamsNoInset();
59         /// get the parameters from the string passed to createInset.
60         virtual ERTParams const getParams(string const &)
61                 { return ERTParams(); }
62         /// get the parameters from the inset passed to showInset.
63         virtual ERTParams const getParams(InsetERT const &);
64 };
65
66 #endif