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