2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2002-09-05 14:10:50 +00:00
|
|
|
/**
|
|
|
|
* \file ControlGraphics.h
|
2002-09-05 15:14:23 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
2001-03-28 12:59:29 +00:00
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* \author Baruch Even
|
|
|
|
* \author Angus Leeming
|
|
|
|
* \author Herbert Voss
|
2001-03-28 12:59:29 +00:00
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
* Full author contact details are available in file CREDITS.
|
2002-09-05 14:10:50 +00:00
|
|
|
*/
|
2001-03-28 12:59:29 +00:00
|
|
|
|
|
|
|
#ifndef CONTROLGRAPHICS_H
|
|
|
|
#define CONTROLGRAPHICS_H
|
|
|
|
|
|
|
|
|
2003-03-07 18:44:57 +00:00
|
|
|
#include "Dialog.h"
|
2002-05-01 09:25:51 +00:00
|
|
|
#include <utility>
|
|
|
|
#include <vector>
|
2001-03-28 12:59:29 +00:00
|
|
|
|
|
|
|
class InsetGraphics;
|
2001-04-26 18:40:38 +00:00
|
|
|
class InsetGraphicsParams;
|
2001-03-28 12:59:29 +00:00
|
|
|
class LyXView;
|
|
|
|
|
|
|
|
/** A controller for Graphics dialogs.
|
|
|
|
*/
|
2002-10-31 20:05:55 +00:00
|
|
|
|
2003-03-07 18:44:57 +00:00
|
|
|
class ControlGraphics : public Dialog::Controller {
|
2001-03-28 12:59:29 +00:00
|
|
|
public:
|
|
|
|
///
|
2003-03-07 18:44:57 +00:00
|
|
|
ControlGraphics(Dialog &);
|
|
|
|
///
|
2003-03-14 00:20:42 +00:00
|
|
|
virtual bool initialiseParams(string const & data);
|
2003-03-07 18:44:57 +00:00
|
|
|
/// clean-up on hide.
|
|
|
|
virtual void clearParams();
|
|
|
|
/// clean-up on hide.
|
|
|
|
virtual void dispatchParams();
|
|
|
|
///
|
|
|
|
virtual bool isBufferDependent() const { return true; }
|
|
|
|
///
|
|
|
|
InsetGraphicsParams & params() { return *params_.get(); }
|
|
|
|
///
|
|
|
|
InsetGraphicsParams const & params() const { return *params_.get(); }
|
2001-03-28 12:59:29 +00:00
|
|
|
|
2001-03-30 09:51:46 +00:00
|
|
|
/// Browse for a file
|
|
|
|
string const Browse(string const &);
|
2002-01-29 09:26:24 +00:00
|
|
|
/// Read the Bounding Box from a eps or ps-file
|
|
|
|
string const readBB(string const & file);
|
|
|
|
/// Control the bb
|
|
|
|
bool bbChanged;
|
2002-03-11 11:17:49 +00:00
|
|
|
/// test if file exist
|
2002-03-22 15:24:32 +00:00
|
|
|
bool isFilenameValid(string const & fname) const;
|
2002-05-01 09:25:51 +00:00
|
|
|
|
2001-03-28 12:59:29 +00:00
|
|
|
private:
|
2002-03-21 21:21:28 +00:00
|
|
|
///
|
2003-03-07 18:44:57 +00:00
|
|
|
boost::scoped_ptr<InsetGraphicsParams> params_;
|
2001-03-28 12:59:29 +00:00
|
|
|
};
|
|
|
|
|
2002-05-01 09:25:51 +00:00
|
|
|
namespace frnt {
|
2002-10-21 17:38:09 +00:00
|
|
|
|
2002-11-04 14:53:03 +00:00
|
|
|
/// get the units for the bounding box
|
|
|
|
std::vector<string> const getBBUnits();
|
|
|
|
|
2002-10-21 17:38:09 +00:00
|
|
|
/// The (tranlated) GUI string and it's LaTeX equivalent.
|
|
|
|
typedef std::pair<string, string> RotationOriginPair;
|
|
|
|
///
|
|
|
|
std::vector<RotationOriginPair> getRotationOriginData();
|
|
|
|
|
2002-05-01 09:25:51 +00:00
|
|
|
} // namespace frnt
|
|
|
|
|
2001-03-28 12:59:29 +00:00
|
|
|
#endif // CONTROLGRAPHICS_H
|