]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlInclude.h
Edwin's "about" patch + consistent use of Lsstream.h
[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 private:
44         /// Dispatch the changed parameters to the kernel.
45         virtual void applyParamsToInset();
46         /// Should be used but currently isn't
47         virtual void applyParamsNoInset() {}
48         /// get the parameters from the string passed to createInset.
49         virtual InsetInclude::Params const getParams(string const &)
50                 { return InsetInclude::Params(); }
51         /// get the parameters from the inset passed to showInset.
52         virtual InsetInclude::Params const getParams(InsetInclude const & inset)
53                 { return inset.params(); }
54 };
55 #endif // CONTROLINCLUDE_H