mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
b97138d0e8
* Prevent activation of Ok,Apply in graphics dialog when file is not found * Partial fix for bug 229. Still need to emit updateParagraph when leaving an inset. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3814 a592a061-630c-0410-9148-cb99ea01b6c8
57 lines
1.4 KiB
C++
57 lines
1.4 KiB
C++
// -*- C++ -*-
|
|
/* This file is part of
|
|
* ======================================================
|
|
*
|
|
* LyX, The Document Processor
|
|
*
|
|
* Copyright 2001 The LyX Team.
|
|
*
|
|
* ======================================================
|
|
*
|
|
* \file ControlGraphics.h
|
|
* \author Angus Leeming <a.leeming@ic.ac.uk>
|
|
* \author Herbert Voss <voss@perce.de>
|
|
*/
|
|
|
|
#ifndef CONTROLGRAPHICS_H
|
|
#define CONTROLGRAPHICS_H
|
|
|
|
#ifdef __GNUG__
|
|
#pragma interface
|
|
#endif
|
|
|
|
#include "ControlInset.h"
|
|
|
|
class InsetGraphics;
|
|
class InsetGraphicsParams;
|
|
class LyXView;
|
|
|
|
/** A controller for Graphics dialogs.
|
|
*/
|
|
class ControlGraphics
|
|
: public ControlInset<InsetGraphics, InsetGraphicsParams> {
|
|
public:
|
|
///
|
|
ControlGraphics(LyXView &, Dialogs &);
|
|
|
|
/// Browse for a file
|
|
string const Browse(string const &);
|
|
/// Read the Bounding Box from a eps or ps-file
|
|
string const readBB(string const & file);
|
|
/// Control the bb
|
|
bool bbChanged;
|
|
/// test if file exist
|
|
bool isFilenameValid(string const & fname) const;
|
|
private:
|
|
/// Dispatch the changed parameters to the kernel.
|
|
virtual void applyParamsToInset();
|
|
///
|
|
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
|