]> git.lyx.org Git - lyx.git/blob - src/frontends/controllers/ControlGraphics.h
Really dull and boring header shit
[lyx.git] / src / frontends / controllers / ControlGraphics.h
1 // -*- C++ -*-
2 /**
3  * \file ControlGraphics.h
4  * Read the file COPYING
5  *
6  * \author Baruch Even
7  * \author Angus Leeming
8  * \author Herbert Voss
9  *
10  * Full author contact details are available in file CREDITS
11  */
12
13 #ifndef CONTROLGRAPHICS_H
14 #define CONTROLGRAPHICS_H
15
16 #ifdef __GNUG__
17 #pragma interface
18 #endif
19
20 #include "ControlInset.h"
21
22 // needed to instatiate inset->hideDialog in ControlInset
23 #include "insets/insetgraphics.h"
24
25 #include <utility>
26 #include <vector>
27
28 class InsetGraphics;
29 class InsetGraphicsParams;
30 class LyXView;
31
32 /** A controller for Graphics dialogs.
33  */
34 class ControlGraphics
35         : public ControlInset<InsetGraphics, InsetGraphicsParams> {
36 public:
37         ///
38         ControlGraphics(LyXView &, Dialogs &);
39
40         /// Browse for a file
41         string const Browse(string const &);
42         /// Read the Bounding Box from a eps or ps-file
43         string const readBB(string const & file);
44         /// Control the bb
45         bool bbChanged;
46         /// test if file exist
47         bool isFilenameValid(string const & fname) const;
48
49 private:
50         /// Dispatch the changed parameters to the kernel.
51         virtual void applyParamsToInset();
52         ///
53         virtual void applyParamsNoInset();
54         /// get the parameters from the string passed to createInset.
55         virtual InsetGraphicsParams const getParams(string const &);
56         /// get the parameters from the inset passed to showInset.
57         virtual InsetGraphicsParams const getParams(InsetGraphics const &);
58 };
59
60 namespace frnt {
61         /// The (tranlated) GUI string and it's LaTeX equivalent.
62         typedef std::pair<string, string> RotationOriginPair;
63         ///
64         std::vector<RotationOriginPair> getRotationOriginData();
65 } // namespace frnt
66
67 #endif // CONTROLGRAPHICS_H