2001-06-13 14:33:31 +00:00
|
|
|
// -*- C++ -*-
|
2001-03-28 12:59:29 +00:00
|
|
|
/* This file is part of
|
2002-03-21 21:21:28 +00:00
|
|
|
* ======================================================
|
2001-03-28 12:59:29 +00:00
|
|
|
*
|
|
|
|
* LyX, The Document Processor
|
|
|
|
*
|
|
|
|
* Copyright 2001 The LyX Team.
|
|
|
|
*
|
|
|
|
* ======================================================
|
|
|
|
*
|
|
|
|
* \file ControlGraphics.h
|
|
|
|
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
2002-01-29 09:26:24 +00:00
|
|
|
* \author Herbert Voss <voss@perce.de>
|
|
|
|
*/
|
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"
|
|
|
|
|
|
|
|
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;
|
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 &);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CONTROLGRAPHICS_H
|