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
23 class InsetGraphicsParams;
29 /** A controller for Graphics dialogs.
31 class ControlGraphics : public Dialog::Controller {
34 ControlGraphics(Dialog &);
36 virtual bool initialiseParams(std::string const & data);
38 virtual void clearParams();
40 virtual void dispatchParams();
42 virtual bool isBufferDependent() const { return true; }
44 InsetGraphicsParams & params() { return *params_.get(); }
46 InsetGraphicsParams const & params() const { return *params_.get(); }
49 std::string const browse(std::string const &) const;
50 /// Read the Bounding Box from a eps or ps-file
51 std::string const readBB(std::string const & file);
54 /// test if file exist
55 bool isFilenameValid(std::string const & fname) const;
61 boost::scoped_ptr<InsetGraphicsParams> params_;
65 /// get the units for the bounding box
66 std::vector<std::string> const getBBUnits();
68 /// The (tranlated) GUI std::string and it's LaTeX equivalent.
69 typedef std::pair<std::string, std::string> RotationOriginPair;
71 std::vector<RotationOriginPair> getRotationOriginData();
73 } // namespace frontend
76 #endif // CONTROLGRAPHICS_H