]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlExternal.h
Overhaul the branches code.
[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 #include "Dialog.h"
18
19 #include "support/types.h"
20
21 #include <boost/scoped_ptr.hpp>
22
23 #include <string>
24 #include <vector>
25
26
27 class InsetExternalParams;
28
29 namespace lyx {
30 namespace external {
31
32 class Template;
33 class RotationDataType;
34
35 } // namespace external
36 } // namespace lyx
37
38
39 class ControlExternal : public Dialog::Controller {
40 public:
41         ///
42         ControlExternal(Dialog &);
43         ///
44         virtual bool initialiseParams(std::string const & data);
45         /// clean-up on hide.
46         virtual void clearParams();
47         /// clean-up on hide.
48         virtual void dispatchParams();
49         ///
50         virtual bool isBufferDependent() const { return true; }
51
52         ///
53         InsetExternalParams const & params() const;
54         ///
55         void setParams(InsetExternalParams const &);
56
57         ///
58         void editExternal();
59         ///
60         std::vector<std::string> const getTemplates() const;
61         ///
62         int getTemplateNumber(std::string const &) const;
63         ///
64         lyx::external::Template getTemplate(int) const;
65         ///
66         std::string const Browse(std::string const &) const;
67
68         /// Read the Bounding Box from a eps or ps-file
69         std::string const readBB(std::string const & file);
70         ///
71         void bbChanged(bool val) { bb_changed_ = val; }
72         bool bbChanged() const { return bb_changed_; }
73 private:
74         ///
75         boost::scoped_ptr<InsetExternalParams> params_;
76         bool bb_changed_;
77 };
78
79
80 namespace lyx {
81 namespace external {
82
83 std::vector<RotationDataType> const & all_origins();
84 std::string const origin_gui_str(lyx::size_type i);
85
86 } // namespace external
87 } // namespace lyx
88
89 #endif // CONTROLEXTERNAL_H