]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlInclude.h
John's character.C patch (bug fix).
[lyx.git] / src / frontends / controllers / ControlInclude.h
1 // -*- C++ -*-
2 /**
3  * \file ControlInclude.h
4  * Copyright 2001 the LyX Team
5  * See the file COPYING
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author John Levon, moz@compsoc.man.ac.uk
9  * \author Angus Leeming, a.leeming@.ac.uk
10  */
11
12 #ifndef CONTROLINCLUDE_H
13 #define CONTROLINCLUDE_H
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "ControlInset.h"
20 #include "insets/insetinclude.h" // InsetIncludeParams
21
22 /** A controller for the Include file dialog.
23  */
24 class ControlInclude
25         : public ControlInset<InsetInclude, InsetInclude::Params>
26 {
27 public:
28         ///
29         enum Type {
30                 ///
31                 INPUT,
32                 ///
33                 VERBATIM,
34                 ///
35                 INCLUDE
36         };
37         ///
38         ControlInclude(LyXView &, Dialogs &);
39
40         /// Browse for a file
41         string const Browse(string const &, Type);
42
43         /// load a file
44         void load(string const & file); 
45
46 private:
47         /// Dispatch the changed parameters to the kernel.
48         virtual void applyParamsToInset();
49         /// Should be used but currently isn't
50         virtual void applyParamsNoInset() {}
51         /// get the parameters from the string passed to createInset.
52         virtual InsetInclude::Params const getParams(string const &)
53                 { return InsetInclude::Params(); }
54         /// get the parameters from the inset passed to showInset.
55         virtual InsetInclude::Params const getParams(InsetInclude const & inset)
56                 { return inset.params(); }
57 };
58 #endif // CONTROLINCLUDE_H