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
20 #include "support/docstring.h"
28 class InsetGraphicsParams;
33 /** A controller for Graphics dialogs.
35 class ControlGraphics : public Dialog::Controller {
38 ControlGraphics(Dialog &);
40 virtual bool initialiseParams(std::string const & data);
42 virtual void clearParams();
44 virtual void dispatchParams();
46 virtual bool isBufferDependent() const { return true; }
48 InsetGraphicsParams & params() { return *params_.get(); }
50 InsetGraphicsParams const & params() const { return *params_.get(); }
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);
58 /// test if file exist
59 bool isFilenameValid(std::string const & fname) const;
65 boost::scoped_ptr<InsetGraphicsParams> params_;
69 /// get the units for the bounding box
70 std::vector<std::string> const getBBUnits();
72 /// The (tranlated) GUI std::string and it's LaTeX equivalent.
73 typedef std::pair<docstring, std::string> RotationOriginPair;
75 std::vector<RotationOriginPair> getRotationOriginData();
77 } // namespace frontend
80 #endif // CONTROLGRAPHICS_H