]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlGraphics.h
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlGraphics.h
1 // -*- C++ -*-
2 /**
3  * \file ControlGraphics.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Baruch Even
8  * \author Angus Leeming
9  * \author Herbert Voss
10  *
11  * Full author contact details are available in file CREDITS
12  */
13
14 #ifndef CONTROLGRAPHICS_H
15 #define CONTROLGRAPHICS_H
16
17
18 #include "Dialog.h"
19 #include <utility>
20 #include <vector>
21
22 class InsetGraphics;
23 class InsetGraphicsParams;
24 class LyXView;
25
26 /** A controller for Graphics dialogs.
27  */
28
29 class ControlGraphics : public Dialog::Controller {
30 public:
31         ///
32         ControlGraphics(Dialog &);
33         ///
34         virtual bool initialiseParams(string const & data);
35         /// clean-up on hide.
36         virtual void clearParams();
37         /// clean-up on hide.
38         virtual void dispatchParams();
39         ///
40         virtual bool isBufferDependent() const { return true; }
41         ///
42         InsetGraphicsParams & params() { return *params_.get(); }
43         ///
44         InsetGraphicsParams const & params() const { return *params_.get(); }
45
46         /// Browse for a file
47         string const Browse(string const &);
48         /// Read the Bounding Box from a eps or ps-file
49         string const readBB(string const & file);
50         /// Control the bb
51         bool bbChanged;
52         /// test if file exist
53         bool isFilenameValid(string const & fname) const;
54
55 private:
56         ///
57         boost::scoped_ptr<InsetGraphicsParams> params_;
58 };
59
60 namespace frnt {
61
62 /// get the units for the bounding box
63 std::vector<string> const getBBUnits();
64
65 /// The (tranlated) GUI string and it's LaTeX equivalent.
66 typedef std::pair<string, string> RotationOriginPair;
67 ///
68 std::vector<RotationOriginPair> getRotationOriginData();
69
70 } // namespace frnt
71
72 #endif // CONTROLGRAPHICS_H