namespace grfx -> lyx::graphics

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7239 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Lars Gullik Bjønnes 2003-07-04 08:23:23 +00:00
parent 961883ed6d
commit fe390e9da1
67 changed files with 226 additions and 97 deletions

View File

@ -1,3 +1,6 @@
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
* introduce namespace lyx::graphics
2003-07-02 André Pönitz <poenitz@gmx.net>

View File

@ -110,6 +110,8 @@ using std::for_each;
using lyx::pos_type;
using lyx::textclass_type;
namespace grfx = lyx::graphics;
// all these externs should eventually be removed.
extern BufferList bufferlist;

View File

@ -1,3 +1,6 @@
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
* introduce namespace lyx::graphics
2003-06-27 André Pönitz <poenitz@gmx.net>

View File

@ -19,9 +19,12 @@
class LyXFont;
namespace grfx {
namespace lyx {
namespace graphics {
class Image;
}
}
/**
* Painter - A painter class to encapsulate all graphics parameters and operations
@ -132,7 +135,7 @@ public:
/// draw an image from the image cache
virtual Painter & image(int x, int y,
int w, int h,
grfx::Image const & image) = 0;
lyx::graphics::Image const & image) = 0;
/// draw a string at position x, y (y is the baseline)
virtual Painter & text(int x, int y,

View File

@ -1,3 +1,7 @@
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
* introduce namespace lyx::graphics
2003-07-03 John Levon <levon@movementarian.org>
* ui/QTexinfoDialog.ui: enable View properly

View File

@ -33,6 +33,8 @@
using namespace lyx::support;
namespace grfx = lyx::graphics;
typedef QController<ControlExternal, QView<QExternalDialog> > base_class;

View File

@ -32,7 +32,8 @@ using namespace lyx::support;
using std::find_if;
using std::endl;
namespace grfx {
namespace lyx {
namespace graphics {
/// Access to this class is through this static method.
Image::ImagePtr QLImage::newImage()
@ -253,4 +254,5 @@ void QLImage::scale(Params const & params)
xformed_pixmap_ = xformed_pixmap_.xForm(m);
}
} // namespace grfx
} // namespace graphics
} // lyx

View File

@ -18,7 +18,8 @@
#include <qpixmap.h>
namespace grfx {
namespace lyx {
namespace graphics {
class QLImage : public Image {
public:
@ -80,6 +81,7 @@ private:
QPixmap xformed_pixmap_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // QLIMAGE_H

View File

@ -36,6 +36,7 @@
using std::endl;
namespace grfx = lyx::graphics;
QLPainter::QLPainter(QWorkArea & qwa)
: Painter(), owner_(qwa), paint_check_(0)

View File

@ -100,7 +100,7 @@ public:
/// draw an image from the image cache
virtual Painter & image(int x, int y,
int w, int h,
grfx::Image const & image);
lyx::graphics::Image const & image);
/// draw a string at position x, y (y is the baseline)
virtual Painter & text(int x, int y,

View File

@ -63,6 +63,8 @@ using std::setfill;
using std::setw;
using std::endl;
namespace grfx = lyx::graphics;
typedef Qt2CB<ControlPrefs, Qt2DB<QPrefsDialog> > base_class;

View File

@ -119,7 +119,7 @@ void parse_init(int & argc, char * argv[])
{
static LQApplication a(argc, argv);
using namespace grfx;
using namespace lyx::graphics;
Image::newImage = boost::bind(&QLImage::newImage);
Image::loadableFormats = boost::bind(&QLImage::loadableFormats);

View File

@ -48,6 +48,8 @@ using std::min;
using std::max;
using std::endl;
namespace grfx = lyx::graphics;
namespace {
class SplashScreen : boost::noncopyable, boost::signals::trackable {

View File

@ -1,3 +1,7 @@
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
* introduce namespace lyx::graphics
2003-07-01 Lars Gullik Bjønnes <larsbj@gullik.net>
* introcude namespace lyx::support

View File

@ -32,6 +32,8 @@
using namespace lyx::support;
namespace grfx = lyx::graphics;
typedef FormController<ControlExternal, FormView<FD_external> > base_class;
FormExternal::FormExternal(Dialog & parent)

View File

@ -68,6 +68,8 @@ extern string user_lyxdir;
using namespace lyx::support;
namespace grfx = lyx::graphics;
namespace {
// These should probably go inside the class definition...

View File

@ -35,6 +35,7 @@ using namespace lyx::support;
using std::endl;
using std::max;
namespace grfx = lyx::graphics;
XPainter::XPainter(XWorkArea & xwa)
: Painter(), owner_(xwa)

View File

@ -95,7 +95,7 @@ public:
/// draw an image from the image cache
virtual Painter & image(int x, int y,
int w, int h,
grfx::Image const & image);
lyx::graphics::Image const & image);
/// draw a string at position x, y (y is the baseline)
virtual Painter & text(int x, int y,

View File

@ -172,7 +172,7 @@ void parse_init(int & argc, char * argv[])
lyxColorHandler.reset(new LyXColorHandler());
using namespace grfx;
using namespace lyx::graphics;
// connect the image loader based on the xforms library
Image::newImage = boost::bind(&xformsImage::newImage);

View File

@ -45,7 +45,8 @@ unsigned int packedcolor(LColor::color c);
} // namespace anon
namespace grfx {
namespace lyx {
namespace graphics {
/// Access to this class is through this static method.
Image::ImagePtr xformsImage::newImage()
@ -364,11 +365,14 @@ void xformsImage::errorCB(string const & error_message)
finishedLoading(false);
}
} // namespace grfx
} // namespace graphics
} // namespace lyx
namespace {
namespace grfx = lyx::graphics;
extern "C" {
int status_report(FL_IMAGE * ob, const char *s)

View File

@ -24,7 +24,8 @@
struct flimage_;
typedef flimage_ FL_IMAGE;
namespace grfx {
namespace lyx {
namespace graphics {
class xformsImage : public Image
{
@ -104,6 +105,7 @@ private:
PixmapStatus pixmap_status_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // XFORMSIMAGE_H

View File

@ -1,3 +1,7 @@
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
* Change namespace grfx to lyx::graphics.
2003-07-01 Lars Gullik Bjønnes <larsbj@gullik.net>
* introcude namespace lyx::support

View File

@ -25,7 +25,8 @@
using namespace lyx::support;
namespace grfx {
namespace lyx {
namespace graphics {
/** The cache contains one item per file, so use a map to find the
* cache item quickly by filename.
@ -113,4 +114,5 @@ Cache::ItemPtr const Cache::item(string const & file) const
return it->second;
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -26,7 +26,8 @@
#include <boost/shared_ptr.hpp>
namespace grfx {
namespace lyx {
namespace graphics {
class CacheItem;
@ -79,6 +80,7 @@ private:
boost::scoped_ptr<Impl> const pimpl_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // GRAPHICSCACHE_H

View File

@ -32,7 +32,8 @@ using namespace lyx::support;
using std::endl;
namespace grfx {
namespace lyx {
namespace graphics {
struct CacheItem::Impl : public boost::signals::trackable {
@ -311,11 +312,14 @@ void CacheItem::Impl::imageLoaded(bool success)
}
} // namespace grfx
} // namespace graphics
} // namespace lyx
namespace {
namespace grfx = lyx::graphics;
string const findTargetFormat(string const & from)
{
typedef grfx::Image::FormatList FormatList;
@ -351,7 +355,8 @@ string const findTargetFormat(string const & from)
} // anon namespace
namespace grfx {
namespace lyx {
namespace graphics {
void CacheItem::Impl::convertToDisplayFormat()
{
@ -409,4 +414,5 @@ void CacheItem::Impl::convertToDisplayFormat()
converter_->startConversion();
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -37,7 +37,8 @@
class InsetGraphics;
namespace grfx {
namespace lyx {
namespace graphics {
class Image;
class Converter;
@ -95,6 +96,7 @@ private:
boost::scoped_ptr<Impl> const pimpl_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // GRAPHICSCACHEITEM_H

View File

@ -36,7 +36,8 @@ using namespace lyx::support;
using std::endl;
using std::ostream;
namespace grfx {
namespace lyx {
namespace graphics {
struct Converter::Impl : public boost::signals::trackable {
///
@ -108,7 +109,9 @@ string const & Converter::convertedFile() const
return pimpl_->finished_ ? pimpl_->to_file_ : empty;
}
} // namespace grfx
} // namespace graphics
} // namespace lyx
//------------------------------
// Implementation details follow
@ -126,7 +129,8 @@ bool build_script(string const & from_file, string const & to_file_base,
} // namespace anon
namespace grfx {
namespace lyx {
namespace graphics {
Converter::Impl::Impl(string const & from_file, string const & to_file_base,
string const & from_format, string const & to_format)
@ -223,7 +227,8 @@ void Converter::Impl::converted(pid_t /* pid */, int retval)
}
}
} // namespace grfx
} // namespace graphics
} // namespace lyx
namespace {

View File

@ -22,7 +22,8 @@
#include <boost/scoped_ptr.hpp>
#include <boost/utility.hpp>
namespace grfx {
namespace lyx {
namespace graphics {
class Converter : boost::noncopyable {
public:
@ -65,6 +66,7 @@ private:
boost::scoped_ptr<Impl> const pimpl_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // GRAPHICSCONVERTER_H

View File

@ -19,7 +19,8 @@
using std::endl;
using std::abs;
namespace grfx {
namespace lyx {
namespace graphics {
// This is to be connected to a function that will return a new
// instance of a viable derived class.
@ -53,4 +54,5 @@ Image::getScaledDimensions(Params const & params) const
return std::make_pair(width, height);
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -33,7 +33,8 @@
#include <vector>
#include <utility>
namespace grfx {
namespace lyx {
namespace graphics {
class Params;
@ -107,6 +108,7 @@ protected:
getScaledDimensions(Params const & params) const;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // GRAPHICSIMAGE_H

View File

@ -25,7 +25,8 @@
#include <list>
namespace grfx {
namespace lyx {
namespace graphics {
struct Loader::Impl : boost::signals::trackable {
///
@ -296,4 +297,5 @@ void Loader::Impl::startLoading()
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -32,7 +32,8 @@
class Inset;
namespace grfx {
namespace lyx {
namespace graphics {
class Image;
class Params;
@ -106,6 +107,7 @@ private:
boost::scoped_ptr<Impl> const pimpl_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // GRAPHICSLOADER_H

View File

@ -18,7 +18,8 @@
using std::abs;
namespace grfx {
namespace lyx {
namespace graphics {
Params::Params()
: display(ColorDisplay),
@ -95,4 +96,5 @@ bool operator!=(BoundingBox const & a, BoundingBox const & b)
return !(a == b);
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -18,7 +18,8 @@
#include "LString.h"
namespace grfx {
namespace lyx {
namespace graphics {
/** Parse a string of the form "200pt 500pt 300mm 5in" into a
* usable bounding box.
@ -67,6 +68,7 @@ struct Params
bool operator==(Params const &, Params const &);
bool operator!=(Params const &, Params const &);
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // GRAPHICSPARAMS_H

View File

@ -14,7 +14,8 @@
#include "graphics/GraphicsTypes.h"
namespace grfx {
namespace lyx {
namespace graphics {
/// The translator between the Display enum and corresponding lyx string.
Translator<DisplayType, string> displayTranslator(DefaultDisplay, "default");
@ -41,4 +42,5 @@ void setDisplayTranslator()
}
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -18,7 +18,8 @@
#include "LString.h"
#include "support/translator.h"
namespace grfx {
namespace lyx {
namespace graphics {
/// The status of the loading process
enum ImageStatus {
@ -68,6 +69,7 @@ extern Translator<DisplayType, string> displayTranslator;
///
void setDisplayTranslator();
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // GRAPHICSTYPES_H

View File

@ -19,8 +19,8 @@
using std::endl;
using std::list;
namespace grfx {
namespace lyx {
namespace graphics {
int LoaderQueue::s_numimages_ = 5;
int LoaderQueue::s_millisecs_ = 500;
@ -113,4 +113,5 @@ void LoaderQueue::touch(Cache::ItemPtr const & item)
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -29,7 +29,8 @@
#include <set>
#include <queue>
namespace grfx {
namespace lyx {
namespace graphics {
class LoaderQueue {
public:
@ -74,6 +75,7 @@ private:
void stopLoader();
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // LOADERQUEUE_H

View File

@ -22,7 +22,8 @@
using namespace lyx::support;
namespace grfx {
namespace lyx {
namespace graphics {
struct PreviewImage::Impl : public boost::signals::trackable {
///
@ -152,4 +153,5 @@ void PreviewImage::Impl::statusChanged()
}
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -17,7 +17,8 @@
class Inset;
namespace grfx {
namespace lyx {
namespace graphics {
class PreviewLoader;
class Image;
@ -55,6 +56,7 @@ private:
boost::scoped_ptr<Impl> const pimpl_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // PREVIEWIMAGE_H

View File

@ -117,7 +117,8 @@ typedef InProgressProcesses::value_type InProgressProcess;
} // namespace anon
namespace grfx {
namespace lyx {
namespace graphics {
struct PreviewLoader::Impl : public boost::signals::trackable {
///
@ -241,7 +242,8 @@ Buffer const & PreviewLoader::buffer() const
return pimpl_->buffer();
}
} // namespace grfx
} // namespace graphics
} // namespace lyx
// The details of the Impl
@ -306,7 +308,8 @@ void InProgress::stop() const
} // namespace anon
namespace grfx {
namespace lyx {
namespace graphics {
PreviewLoader::Impl::Impl(PreviewLoader & p, Buffer const & b)
: parent_(p), buffer_(b), font_scaling_factor_(0.0)
@ -637,8 +640,8 @@ void PreviewLoader::Impl::dumpData(ostream & os,
}
}
} // namespace grfx
} // namespace graphics
} // namespace lyx
namespace {

View File

@ -25,7 +25,8 @@
class Buffer;
namespace grfx {
namespace lyx {
namespace graphics {
class PreviewImage;
@ -92,6 +93,7 @@ private:
boost::scoped_ptr<Impl> const pimpl_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // PREVIEWLOADER_H

View File

@ -30,7 +30,8 @@
using namespace lyx::support;
namespace grfx {
namespace lyx {
namespace graphics {
bool PreviewedInset::activated()
{
@ -50,15 +51,15 @@ void PreviewedInset::generatePreview()
!view() || !view()->buffer())
return;
grfx::Previews & previews = grfx::Previews::get();
grfx::PreviewLoader & loader = previews.loader(view()->buffer());
Previews & previews = Previews::get();
PreviewLoader & loader = previews.loader(view()->buffer());
addPreview(loader);
if (!snippet_.empty())
loader.startLoading();
}
void PreviewedInset::addPreview(grfx::PreviewLoader & ploader)
void PreviewedInset::addPreview(PreviewLoader & ploader)
{
if (!Previews::activated() || !previewWanted())
return;
@ -88,8 +89,8 @@ void PreviewedInset::removePreview()
if (!view() || !view()->buffer() || snippet_.empty())
return;
grfx::Previews & previews = grfx::Previews::get();
grfx::PreviewLoader & loader = previews.loader(view()->buffer());
Previews & previews = Previews::get();
PreviewLoader & loader = previews.loader(view()->buffer());
loader.remove(snippet_);
snippet_.erase();
pimage_ = 0;
@ -103,8 +104,8 @@ bool PreviewedInset::previewReady() const
return false;
if (!pimage_ || snippet_ != pimage_->snippet()) {
grfx::PreviewLoader & ploader =
grfx::Previews::get().loader(view()->buffer());
PreviewLoader & ploader =
Previews::get().loader(view()->buffer());
pimage_ = ploader.preview(snippet_);
}
@ -115,7 +116,7 @@ bool PreviewedInset::previewReady() const
}
void PreviewedInset::imageReady(grfx::PreviewImage const & pimage) const
void PreviewedInset::imageReady(PreviewImage const & pimage) const
{
// Check snippet against the Inset's current contents
if (snippet_ != pimage.snippet())
@ -127,4 +128,5 @@ void PreviewedInset::imageReady(grfx::PreviewImage const & pimage) const
view()->updateInset(&inset_);
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -23,7 +23,8 @@
class Inset;
class BufferView;
namespace grfx {
namespace lyx {
namespace graphics {
class PreviewImage;
class PreviewLoader;
@ -87,7 +88,7 @@ private:
boost::signals::connection connection_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // PREVIEWEDINSET_H

View File

@ -22,9 +22,11 @@
#include <map>
namespace lyx {
using namespace lyx::support;
namespace grfx {
namespace graphics {
bool Previews::activated()
{
@ -99,4 +101,5 @@ void Previews::generateBufferPreviews(Buffer const & buffer) const
ploader.startLoading();
}
} // namespace grfx
} // namespace graphics
} // namespace lyx

View File

@ -21,7 +21,8 @@
class Buffer;
namespace grfx {
namespace lyx {
namespace graphics {
class PreviewLoader;
@ -66,6 +67,7 @@ private:
boost::scoped_ptr<Impl> const pimpl_;
};
} // namespace grfx
} // namespace graphics
} // namespace lyx
#endif // PREVIEWS_H

View File

@ -1,3 +1,7 @@
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
* introduce namespace lyx::graphics
2003-07-01 Lars Gullik Bjønnes <larsbj@gullik.net>
* introduce namespace lyx::support

View File

@ -34,9 +34,11 @@ class WordLangTuple;
class ParagraphList;
class UpdatableInset;
namespace grfx {
namespace lyx {
namespace graphics {
class PreviewLoader;
}
}
/// Insets
class Inset : public InsetBase {
@ -311,7 +313,7 @@ public:
* Most insets have no interest in this capability, so the method
* defaults to empty.
*/
virtual void addPreview(grfx::PreviewLoader &) const {}
virtual void addPreview(lyx::graphics::PreviewLoader &) const {}
/** Find the PreviewLoader, add a LaTeX snippet to it and
* start the loading process.

View File

@ -41,6 +41,7 @@ using std::ostream;
using std::endl;
using std::max;
namespace grfx = lyx::graphics;
InsetCollapsable::InsetCollapsable(BufferParams const & bp, bool collapsed)
: UpdatableInset(), collapsed_(collapsed), inset(bp),

View File

@ -167,7 +167,7 @@ public:
bool = true, bool = false);
///
void addPreview(grfx::PreviewLoader &) const;
void addPreview(lyx::graphics::PreviewLoader &) const;
protected:
///

View File

@ -49,6 +49,7 @@ using namespace lyx::support;
using std::ostream;
using std::endl;
namespace grfx = lyx::graphics;
namespace {

View File

@ -36,7 +36,7 @@ public:
/// The name of the tempfile used for manipulations.
string tempname;
/// how the inset is displayed by LyX
grfx::DisplayType display;
lyx::graphics::DisplayType display;
/// The scale of the displayed graphic (If shown).
unsigned int lyxscale;
};

View File

@ -18,11 +18,16 @@
#include "LString.h"
#include "lyxlength.h"
namespace grfx = lyx::graphics;
class LyXLex;
namespace grfx {
namespace lyx {
namespace graphics {
class Params;
}
}
/// This struct holds all the parameters needed by insetGraphics.
struct InsetGraphicsParams

View File

@ -50,6 +50,8 @@ using std::endl;
using std::vector;
using std::pair;
namespace grfx = lyx::graphics;
extern BufferList bufferlist;

View File

@ -109,7 +109,7 @@ public:
bool loadIfNeeded() const;
///
void addPreview(grfx::PreviewLoader &) const;
void addPreview(lyx::graphics::PreviewLoader &) const;
private:
/// get the text displayed on the button

View File

@ -59,6 +59,8 @@ using std::endl;
using std::swap;
using std::max;
namespace grfx = lyx::graphics;
namespace {
int const ADD_TO_HEIGHT = 2;

View File

@ -211,7 +211,7 @@ public:
bool forceDefaultParagraphs(Inset const * in) const;
///
void addPreview(grfx::PreviewLoader &) const;
void addPreview(lyx::graphics::PreviewLoader &) const;
//
// Public structures and variables

View File

@ -76,6 +76,7 @@ using namespace lyx::support;
using lyx::pos_type;
using lyx::textclass_type;
namespace grfx = lyx::graphics;
// These functions should probably go into bufferview_funcs somehow (Jug)

View File

@ -230,7 +230,7 @@ public:
void appendParagraphs(Buffer * bp, ParagraphList &);
///
void addPreview(grfx::PreviewLoader &) const;
void addPreview(lyx::graphics::PreviewLoader &) const;
//
// Public structures and variables

View File

@ -28,6 +28,8 @@
using namespace lyx::support;
namespace grfx = lyx::graphics;
RenderInset::RenderInset()
{}

View File

@ -84,7 +84,7 @@ public:
virtual RenderInset * clone() const;
/// Refresh the info about which file to display and how to display it.
void update(grfx::Params const & params);
void update(lyx::graphics::Params const & params);
/// compute the size of the object returned in dim
virtual void metrics(MetricsInfo & mi, Dimension & dim) const;
@ -111,8 +111,8 @@ private:
bool readyToDisplay() const;
/// The stored data.
grfx::Loader loader_;
grfx::Params params_;
lyx::graphics::Loader loader_;
lyx::graphics::Params params_;
/// Cached variable (not copied).
mutable unsigned long checksum_;

View File

@ -3,7 +3,7 @@
* Copyright 1995-2002 the LyX Team
* Read the file COPYING
*
* \author unknown
* \author Lars Gullik Bjønnes
*/
#include <config.h>
@ -59,6 +59,8 @@ using std::signal;
using std::system;
#endif
namespace grfx = lyx::graphics;
extern void LoadLyXFile(string const &);
extern void QuitLyX();

View File

@ -40,6 +40,8 @@ using std::ios;
using std::endl;
using std::vector;
namespace grfx = lyx::graphics;
class kb_keymap;
extern boost::scoped_ptr<kb_keymap> toplevel_keymap;

View File

@ -337,7 +337,7 @@ enum LyXRCTags {
///
int label_init_length;
///
grfx::DisplayType display_graphics;
lyx::graphics::DisplayType display_graphics;
///
bool show_banner;
///

View File

@ -1,3 +1,7 @@
2003-07-04 Lars Gullik Bjønnes <larsbj@gullik.net>
* introduce namespace lyx::graphics
2003-07-01 Lars Gullik Bjønnes <larsbj@gullik.net>
* introduce namespace lyx::support

View File

@ -52,6 +52,7 @@
using std::ostream;
using std::vector;
namespace grfx = lyx::graphics;
class InsetFormula::PreviewImpl : public grfx::PreviewedInset {
public:

View File

@ -70,7 +70,7 @@ public:
///
void generatePreview() const;
///
void addPreview(grfx::PreviewLoader &) const;
void addPreview(lyx::graphics::PreviewLoader &) const;
///
void mutate(string const & type);