+2002-07-15 John Levon <moz@compsoc.man.ac.uk>
+
+ * QLImage.h:
+ * QLImage.C: remove getPixmap() add isDrawable()
+
2002-07-14 John Levon <moz@compsoc.man.ac.uk>
* io_callback.h:
}
-// FIXME
-Pixmap QLImage::getPixmap() const
-{
- return 1;
-}
-
-
void QLImage::load(string const & filename)
{
if (!pixmap_.isNull()) {
/// Create a copy
virtual Image * clone() const;
- /// FIXME
- virtual Pixmap getPixmap() const;
-
QPixmap const & qpixmap() const { return xformed_pixmap_; }
/// Get the image width
/// Get the image height
virtual unsigned int getHeight() const;
+ // FIXME
+ virtual bool isDrawable() const { return true; }
+
/**
* Load the image file into memory.
* The process is asynchronous, so this method starts the loading.
- add buttons for Documents, Templates, etc. to the file dialog toolbar
- work around Qt crash bug with double click
-GraphicsImage
-
- - remove getPixmap()
-
lyx_gui (qt)
- move out lyxserver
- get mono/color to work
- get bgcolor and clipping to work
-
QLPainter
- work out why buttons look ugly and fix
+2002-07-15 John Levon <moz@compsoc.man.ac.uk>
+
+ * xformsImage.h:
+ * xformsImage.C: add isDrawable()
+
+ * XPainter.C: use static cast to xformsImage
+
2002-07-14 Angus Leeming <leeming@lyx.org>
* lyx_gui.C (C_read_callback): give it extern "C" linkage.
#include "encoding.h"
#include "language.h"
-#include "graphics/GraphicsImage.h"
+#include "xformsImage.h"
#include "support/LAssert.h"
#include "support/lstrings.h"
Painter & XPainter::image(int x, int y,
int w, int h,
- grfx::Image const & image)
+ grfx::Image const & i)
{
+ grfx::xformsImage const & image = static_cast<grfx::xformsImage const &>(i);
XGCValues val;
val.function = GXcopy;
GC gc = XCreateGC(fl_get_display(), owner_.getPixmap(),
}
+bool xformsImage::isDrawable() const
+{
+ return pixmap_;
+}
+
+
Pixmap xformsImage::getPixmap() const
{
if (!pixmap_status_ == PIXMAP_SUCCESS)
#include "graphics/GraphicsImage.h"
+#include <X11/X.h>
+
struct flimage_;
typedef flimage_ FL_IMAGE;
-
+
namespace grfx {
class xformsImage : public Image
/// Get the image height
unsigned int getHeight() const;
+ virtual bool isDrawable() const;
+
/** Load the image file into memory.
* The process is asynchronous, so this method starts the loading.
* When finished, the Image::finishedLoading signal is emitted.
+2002-07-15 John Levon <moz@compsoc.man.ac.uk>
+
+ * GraphicsImage.h: remove getPixmap/X, add isDrawable()
+
2002-07-12 Angus Leeming <leeming@lyx.org>
* GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
#include <boost/function/function0.hpp>
#include <boost/signals/signal1.hpp>
-#include <X11/X.h> // for Pixmap :-(
-
#include <vector>
#include <utility>
/// Create a copy
virtual Image * clone() const = 0;
- ///
- virtual Pixmap getPixmap() const = 0;
-
/// Get the image width
virtual unsigned int getWidth() const = 0;
/// Get the image height
virtual unsigned int getHeight() const = 0;
+ /// is the image drawable ?
+ virtual bool isDrawable() const = 0;
+
/** At the end of the loading process inform the outside world
* by emitting a signal.
*/
+2002-07-15 John Levon <moz@compsoc.man.ac.uk>
+
+ * insetgraphics.C: use ->isDrawable()
+
2002-07-12 Angus Leeming <leeming@lyx.org>
* insetgraphics.C: use the new smart loading capabilities of the image
if (!cache_->loader.image() || cache_->loader.status() != grfx::Ready)
return false;
- return cache_->loader.image()->getPixmap() != 0;
+ return cache_->loader.image()->isDrawable();
}