]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlExternal.h
c46fa2605258f5907c1e6fdba796743148d4cc10
[lyx.git] / src / frontends / controllers / ControlExternal.h
1 // -*- C++ -*-
2 /**
3  * \file ControlExternal.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Asger Alstrup
8  * \author John Levon
9  * \author Angus Leeming
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef CONTROLEXTERNAL_H
15 #define CONTROLEXTERNAL_H
16
17
18 #include "Dialog.h"
19 #include "insets/insetexternal.h"
20 #include <boost/scoped_ptr.hpp>
21
22
23 class ExternalTemplate;
24
25
26 class ControlExternal : public Dialog::Controller {
27 public:
28         ///
29         ControlExternal(Dialog &);
30         ///
31         virtual bool initialiseParams(string const & data);
32         /// clean-up on hide.
33         virtual void clearParams();
34         /// clean-up on hide.
35         virtual void dispatchParams();
36         ///
37         virtual bool isBufferDependent() const { return true; }
38
39         ///
40         InsetExternal::Params const & params() const;
41         ///
42         void setParams(InsetExternal::Params const &);
43
44         ///
45         void editExternal();
46         ///
47         std::vector<string> const getTemplates() const;
48         ///
49         int getTemplateNumber(string const &) const;
50         ///
51         ExternalTemplate getTemplate(int) const;
52         ///
53         string const Browse(string const &) const;
54 private:
55         ///
56         boost::scoped_ptr<InsetExternal::Params> params_;
57 };
58
59 #endif // CONTROLEXTERNAL_H