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
|
|
|
*
|
2002-09-05 14:10:50 +00:00
|
|
|
* Full author contact details are available in file CREDITS
|
|
|
|
*/
|
2001-03-28 12:59:29 +00:00
|
|
|
|
|
|
|
#ifndef CONTROLGRAPHICS_H
|
|
|
|
#define CONTROLGRAPHICS_H
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma interface
|
2002-03-21 21:21:28 +00:00
|
|
|
#endif
|
2001-03-28 12:59:29 +00:00
|
|
|
|
|
|
|
#include "ControlInset.h"
|
2002-08-12 20:17:41 +00:00
|
|
|
|
|
|
|
// needed to instatiate inset->hideDialog in ControlInset
|
|
|
|
#include "insets/insetgraphics.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.
|
|
|
|
*/
|
|
|
|
class ControlGraphics
|
|
|
|
: public ControlInset<InsetGraphics, InsetGraphicsParams> {
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
ControlGraphics(LyXView &, Dialogs &);
|
|
|
|
|
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:
|
|
|
|
/// Dispatch the changed parameters to the kernel.
|
|
|
|
virtual void applyParamsToInset();
|
2002-03-21 21:21:28 +00:00
|
|
|
///
|
2001-03-28 12:59:29 +00:00
|
|
|
virtual void applyParamsNoInset();
|
|
|
|
/// get the parameters from the string passed to createInset.
|
|
|
|
virtual InsetGraphicsParams const getParams(string const &);
|
|
|
|
/// get the parameters from the inset passed to showInset.
|
|
|
|
virtual InsetGraphicsParams const getParams(InsetGraphics const &);
|
|
|
|
};
|
|
|
|
|
2002-05-01 09:25:51 +00:00
|
|
|
namespace frnt {
|
|
|
|
/// The (tranlated) GUI string and it's LaTeX equivalent.
|
|
|
|
typedef std::pair<string, string> RotationOriginPair;
|
|
|
|
///
|
|
|
|
std::vector<RotationOriginPair> getRotationOriginData();
|
|
|
|
} // namespace frnt
|
|
|
|
|
2001-03-28 12:59:29 +00:00
|
|
|
#endif // CONTROLGRAPHICS_H
|