mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-24 18:43:37 +00:00
b8d43b05bc
allow this as a fallback. E.g., if we're unable to export as MathML, then we try to export as an image. There are several ways, I am sure, in which this implementation is not ideal. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34993 a592a061-630c-0410-9148-cb99ea01b6c8
63 lines
1.2 KiB
C++
63 lines
1.2 KiB
C++
// -*- C++ -*-
|
|
/**
|
|
* \file PreviewImage.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Angus Leeming
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef PREVIEWIMAGE_H
|
|
#define PREVIEWIMAGE_H
|
|
|
|
#include "support/strfwd.h"
|
|
|
|
namespace lyx {
|
|
|
|
namespace support { class FileName; }
|
|
|
|
class Dimension;
|
|
|
|
namespace graphics {
|
|
|
|
class PreviewLoader;
|
|
class Image;
|
|
|
|
class PreviewImage {
|
|
public:
|
|
/** ascent = height * ascent_frac
|
|
* descent = height * (1 - ascent_frac)
|
|
*/
|
|
PreviewImage(PreviewLoader & parent,
|
|
std::string const & latex_snippet,
|
|
support::FileName const & bitmap_file,
|
|
double ascent_frac);
|
|
///
|
|
~PreviewImage();
|
|
|
|
///
|
|
std::string const & snippet() const;
|
|
///
|
|
Dimension dim() const;
|
|
|
|
/** If the image is not yet loaded (WaitingToLoad), then this method
|
|
* triggers that.
|
|
*/
|
|
Image const * image() const;
|
|
///
|
|
support::FileName const & filename() const;
|
|
|
|
private:
|
|
/// Use the Pimpl idiom to hide the internals.
|
|
class Impl;
|
|
/// The pointer never changes although *pimpl_'s contents may.
|
|
Impl * const pimpl_;
|
|
};
|
|
|
|
} // namespace graphics
|
|
} // namespace lyx
|
|
|
|
#endif // PREVIEWIMAGE_H
|