]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlExternal.h
ff4d189c9da580691a9c4fbf79fb5ff529569f84
[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 ControlExternal : public Dialog::Controller {
24 public:
25         ///
26         ControlExternal(Dialog &);
27         ///
28         virtual void initialiseParams(string const & data);
29         /// clean-up on hide.
30         virtual void clearParams();
31         /// clean-up on hide.
32         virtual void dispatchParams();
33         ///
34         virtual bool isBufferDependent() const { return true; }
35
36         ///
37         InsetExternal::Params const & params() const
38                 { return inset_->params(); }
39         ///
40         void setParams(InsetExternal::Params const &);
41
42         ///
43         void editExternal();
44         ///
45         void viewExternal();
46         ///
47         void updateExternal();
48         ///
49         std::vector<string> const getTemplates() const;
50         ///
51         int getTemplateNumber(string const &) const;
52         ///
53         ExternalTemplate getTemplate(int) const;
54         ///
55         string const Browse(string const &) const;
56 private:
57         ///
58         boost::scoped_ptr<InsetExternal> inset_;
59 };
60
61 #endif // CONTROLEXTERNAL_H