3 * \file ControlGraphics.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Angus Leeming
11 * Full author contact details are available in file CREDITS
14 #ifndef CONTROLGRAPHICS_H
15 #define CONTROLGRAPHICS_H
21 #include "ControlInset.h"
23 // needed to instatiate inset->hideDialog in ControlInset
24 #include "insets/insetgraphics.h"
30 class InsetGraphicsParams;
33 /** A controller for Graphics dialogs.
37 : public ControlInset<InsetGraphics, InsetGraphicsParams> {
40 ControlGraphics(LyXView &, Dialogs &);
43 string const Browse(string const &);
44 /// Read the Bounding Box from a eps or ps-file
45 string const readBB(string const & file);
48 /// test if file exist
49 bool isFilenameValid(string const & fname) const;
52 /// Dispatch the changed parameters to the kernel.
53 virtual void applyParamsToInset();
55 virtual void applyParamsNoInset();
56 /// get the parameters from the string passed to createInset.
57 virtual InsetGraphicsParams const getParams(string const &);
58 /// get the parameters from the inset passed to showInset.
59 virtual InsetGraphicsParams const getParams(InsetGraphics const &);
64 /// get the units for the bounding box
65 std::vector<string> const getBBUnits();
67 /// The (tranlated) GUI string and it's LaTeX equivalent.
68 typedef std::pair<string, string> RotationOriginPair;
70 std::vector<RotationOriginPair> getRotationOriginData();
74 #endif // CONTROLGRAPHICS_H