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;
26 /** A controller for Graphics dialogs.
29 class ControlGraphics : public Dialog::Controller {
32 ControlGraphics(Dialog &);
34 virtual bool initialiseParams(std::string const & data);
36 virtual void clearParams();
38 virtual void dispatchParams();
40 virtual bool isBufferDependent() const { return true; }
42 InsetGraphicsParams & params() { return *params_.get(); }
44 InsetGraphicsParams const & params() const { return *params_.get(); }
47 std::string const Browse(std::string const &);
48 /// Read the Bounding Box from a eps or ps-file
49 std::string const readBB(std::string const & file);
52 /// test if file exist
53 bool isFilenameValid(std::string const & fname) const;
57 boost::scoped_ptr<InsetGraphicsParams> params_;
62 /// get the units for the bounding box
63 std::vector<std::string> const getBBUnits();
65 /// The (tranlated) GUI std::string and it's LaTeX equivalent.
66 typedef std::pair<std::string, std::string> RotationOriginPair;
68 std::vector<RotationOriginPair> getRotationOriginData();
72 #endif // CONTROLGRAPHICS_H