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