]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlGraphics.h
more unicode filenames
[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 Voß
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
20 #include "support/docstring.h"
21
22 #include <utility>
23 #include <vector>
24
25 namespace lyx {
26
27 class InsetGraphics;
28 class InsetGraphicsParams;
29 class LyXView;
30
31 namespace frontend {
32
33 /** A controller for Graphics dialogs.
34  */
35 class ControlGraphics : public Dialog::Controller {
36 public:
37         ///
38         ControlGraphics(Dialog &);
39         ///
40         virtual bool initialiseParams(std::string const & data);
41         /// clean-up on hide.
42         virtual void clearParams();
43         /// clean-up on hide.
44         virtual void dispatchParams();
45         ///
46         virtual bool isBufferDependent() const { return true; }
47         ///
48         InsetGraphicsParams & params() { return *params_.get(); }
49         ///
50         InsetGraphicsParams const & params() const { return *params_.get(); }
51
52         /// Browse for a file
53         docstring const browse(docstring const &) const;
54         /// Read the Bounding Box from a eps or ps-file
55         std::string const readBB(std::string const & file);
56         /// Control the bb
57         bool bbChanged;
58         /// test if file exist
59         bool isFilenameValid(std::string const & fname) const;
60         /// edit file
61         void editGraphics();
62
63 private:
64         ///
65         boost::scoped_ptr<InsetGraphicsParams> params_;
66 };
67
68
69 /// get the units for the bounding box
70 std::vector<std::string> const getBBUnits();
71
72 /// The (tranlated) GUI std::string and it's LaTeX equivalent.
73 typedef std::pair<std::string, std::string> RotationOriginPair;
74 ///
75 std::vector<RotationOriginPair> getRotationOriginData();
76
77 } // namespace frontend
78 } // namespace lyx
79
80 #endif // CONTROLGRAPHICS_H