1 2002-07-18 Angus Leeming <leeming@lyx.org>
3 * GraphicsCacheItem.[Ch]: add a FileMonitor variable to the the Impl
5 (startMonitoring, monitoring, checksum): new methods to interact with
8 * GraphicsLoader.[Ch] (startMonitoring, monitoring, checksum): new
9 methods invoking the CacheItem methods of the same name.
10 (resetFile): if monitoring and the file changes, start monitoring this
13 2002-07-17 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
15 * Makefile.am: remove FileMonitor.[Ch]
17 2002-06-17 Herbert Voss <voss@lyx.org>
19 * GraphicsCachItem.C (findTargetFormat): remove the speciell case
20 for old ps-files (Garst). It's now handled by defining a converter and
21 disabling the ps-support of xforms.
23 2002-07-17 Angus Leeming <leeming@lyx.org>
25 Be true to the Pimpl idiom, moving all signals into the respective
26 Impl classes and defining methods to connect them to an outside slot.
27 Const-ify all visible class methods as they act only on a const pimpl_.
29 * GraphicsCache.[Ch] (add, remove): const-ify.
31 * GraphicsCacheItem.[Ch] (startLoading): const-ify.
32 (statusChanged): move the signal into the Impl class.
33 (connect): new method, enabling a listener to connect to this signal.
35 * GraphicsConverter.[Ch]: (startConversion): const-ify.
36 (finishedConversion): move the signal into the Impl class.
37 (connect): new method, enabling a listener to connect to this signal.
39 * GraphicsLoader.[Ch] (reset, startLoading): const-ify.
40 (statusChanged): move the signal into the Impl class.
41 (connect): new method, enabling a listener to connect to this signal.
43 * PreviewLoader.[Ch] (add, remove, startLoading): const-ify.
44 (imageReady): move the signal into the Impl class.
45 (connect): new method, enabling a listener to connect to this signal.
46 (emitSignal): new method, enabling PreviewImage to tell the outside
47 world that the file has been loaded into memory.
49 * Previews.[Ch] (loader, removeLoader, generateBufferPreviews):
53 * GraphicsCacheItem.C:
54 * GraphicsConverter.[Ch]:
58 * PreviewLoader.[Ch]: whitespace clean-up.
60 2002-07-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
62 * PreviewLoader.C (setConverter): remove unused variable
64 * GraphicsImageXPM.C (isDrawable): implement
65 (setPixmap): the opaque color is black, not white
67 2002-07-15 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
69 * GraphicsImageXPM.C (color_none_id):
70 (contains_color_none): use ascii_lowercase instead of lowercase
72 2002-07-16 Angus Leeming <leeming@lyx.org>
74 * PreviewLoader.C: greater use of STL algorithms.
76 * Previews.[Ch]: use const in more places.
77 (generateBufferPreviews): now takes a Buffer const & argument, not a
80 2002-07-15 John Levon <moz@compsoc.man.ac.uk>
82 * GraphicsImage.h: remove getPixmap/X, add isDrawable()
84 2002-07-12 Angus Leeming <leeming@lyx.org>
86 * GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
87 if visible 2 secs after the call to load them is first made.
89 * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
90 BufferView to ascertain whether the inset is visible or not.
92 * Makefile.am: added GraphicsSupport.[Ch].
94 * PreviewImage.[Ch]: use this smart loader.
96 * PreviewLoader.C: don't load generated image files indiscimminantly.
97 Instead emit the imageReady signal and allow the image owner to decide.
99 2002-07-12 John Levon <moz@compsoc.man.ac.uk>
101 * GraphicsCache.C: remove init_graphics()
103 2002-07-09 Angus Leeming <leeming@lyx.org>
105 * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
106 arithmetic when it should be floating.
108 2002-07-09 Angus Leeming <leeming@lyx.org>
110 * PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".
111 Output equation labels as "(#)" if lyxrc preference is set.
112 (setFontScalingFactor): use lyxrc variable preview_scale_factor
113 rather than hard-coding this.
115 2002-07-09 Angus Leeming <leeming@lyx.org>
117 * PreviewLoader.C: Further refactoring of the code. Should now be
120 * PreviewMetrics.[Ch]: removed. Had a v. short shelf life and is now
121 past its sell-by date. The code to read the metrics file is now found
122 as a helper function in PreviewLoader.C.
124 * GraphicsImageXPM.C (scale): use boost::tie.
126 2002-07-08 Herbert Voss <voss@lyx.org>
128 * PreviewLoader.C: use of preview_size_factor to get the right
129 font-size! 0.9 is the default.
131 2002-07-08 Angus Leeming <leeming@lyx.org>
133 * PreviewLoader.C: Add "delayed" and "showlabels" options to the
134 invocation of preview.sty.
135 Perform something of an internal clean-up.
137 2002-07-06 Angus Leeming <leeming@lyx.org>
139 * PreviewLoader.C: ensure that the metrics data is used by the
143 * PreviewImage.C: (Impl d-tor): remove all generated files that still
144 exist (perhaps because the process was curtailed before the images
147 * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
149 2002-07-05 Angus Leeming <leeming@lyx.org>
158 * Previews.C: new files. The previewed LaTeX snippet stuff.
160 * Makefile.am: add these files.
162 2002-07-05 Angus Leeming <leeming@lyx.org>
164 * GraphicsLoader.h: whitespace.
166 2002-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
168 * GraphicsImage.[Ch]: newImage and loadableFormats changed to
169 boost::function from boost::signal.
171 2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
173 * GraphicsConverter.C (convert): do not use ChangeExtension
174 because to_file_base may contain a dot.
176 2002-06-28 Angus Leeming <leeming@lyx.org>
178 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
179 by moving those SignalPtrs into the grfx::Image and grfx::Converter
180 classes where they really belong.
181 Use the Pimpl idiom to hide the class internals from public view.
183 * GraphicsTypes: remove the typedefs, leaving only the enums.
185 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
186 passed a reference to one in the load() method.
188 * GraphicsConverter.[Ch]: totally refactored. An instance of
189 grfx::Converter now represents a single conversion process.
190 Thus grfx::CachItem now has a grfx::Converter * that is set when the
191 conversion is initiated and destroyed on completion.
193 * GraphicsCache.[Ch]:
194 * GraphicsCacheItem.[Ch]:
195 * GraphicsConverter.[Ch]:
196 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
198 Note that I have done this only after making the above changes,
199 so not only should we have a clean, minimal and well documented
200 interface to these classes in the header files, but the class internals
201 should be much clearer too.
204 grfx::GCache -> grfx::Cache,
205 grfx::GCacheItem -> grfx::CacheItem,
206 grfx::GConverter -> grfx::Converter,
207 grfx::GImage -> grfx::Image,
208 grfx::GImageXPM -> grfx::ImageXPM,
209 grfx::GParams -> grfx::Params.
211 2002-06-26 Angus Leeming <leeming@lyx.org>
213 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
214 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
217 2002-06-26 Angus Leeming <leeming@lyx.org>
219 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
220 move the DisplayType enum out of grfx::GParams to here.
222 * GraphicsCacheItem.h: re-write preliminary description to reflect
225 * GraphicsParams.[Ch]:
226 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
227 grfx::DisplayType out of grfx::GParams.
229 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
230 that was in frontends/screen.C and insets/insetgraphics.C into a
231 single, easy-to-use class.
233 * Makefile.am: add these files.
235 2002-06-25 Angus Leeming <leeming@lyx.org>
237 * GraphicsCache.[Ch]:
238 * GraphicsCacheItem.[Ch]:
239 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
240 file into memory. The cache no longer controls the generation of the
241 pixmap. Instead, it just emits a signal when the loading status of an
243 The cache no longer stores InsetGraphics pointers and nor does it
244 assume responsibility for modifying an image (scaling, rotating etc).
245 Instead, that must now be performed elsewhere.
247 2002-06-19 Angus Leeming <leeming@lyx.org>
249 * GraphicsConverter.C: add using std::endl directive.
251 2002-06-17 Herbert Voss <voss@lyx.org>
253 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
254 default when nothing different was found
255 (convertToDisplayFormat): handle zipped files in the right way and
256 choose always convert as a default converter when no other
257 userdefined was found
259 * GraphicsConverter.C: add more lyxerr comments and choose
260 convert when no other userdefined converter was found
262 2002-06-10 Herbert Voss <voss@lyx.org>
264 * GraphicsImageXPM.C (convertTo7chars): get another special color
265 format from convert work in the right way
267 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
269 * GraphicsCache.C: use right colormap incantation
271 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
273 * GraphicsCache.C: use lyx_gui namespace
275 * GraphicsImageXPM.C: back down to using xforms
278 2002-06-07 Angus Leeming <leeming@lyx.org>
280 Fixes needed to compile with Compaq cxx 6.5.
281 * GraphicsConverter.h: forward declare class ConvProcess.
283 * GraphicsImageXPM.C:
284 all c-library variables have been moved into namespace std.
285 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
287 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
289 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
291 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
293 * GraphicsImageXPM.C: SigC to boot::signals changes.
294 (newImage): fix () bug when using new.
296 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
298 * switch from SigC signals to boost::signals.
300 2002-05-29 André Pönitz <poenitz@gmx.net>
302 * GraphicsParam.C: remove unneeded #include, move vomment
304 2002-05-28 André Pönitz <poenitz@gmx.net>
306 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
308 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
310 * GraphicsImageXPM.C: ColorHandler moved
312 2002-05-24 Juergen Vigna <jug@sad.it>
315 * GraphicsImage.h: include LString.h first.
317 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
319 * GraphicsCacheItem.h: use more specific smart_ptr header.
320 * GraphicsTypes.h: ditto
321 * GraphicsImage.h: ditto
322 * GraphicsConverter.h: ditto
324 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
326 * GraphicsImageXPM.C: understand convert's use of "opaque"
329 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
331 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
332 GImage::loadableFormats() that ensures that the signal is connected
333 to the derived class' method.
335 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
337 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
338 only work on the string.
340 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
342 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
343 the simple image loader when it encounters colour strings like
346 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
348 * GraphicsCacheItem.C (convertToDisplayFormat):
349 * GraphicsConverter.C (build_script): remove the Alerts when things go
350 wrong as the inset displays the message anyway. Moreover, Alert seems
351 pretty temperamemtal at the moment.
353 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
355 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
357 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
359 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
360 a reference to a temp object that's going out of scope...
362 2002-04-09 Herbert Voss <voss@lyx.org>
364 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
365 LyXLength::inBP instead of inPixels.
367 2002-04-10 Herbert Voss <voss@perce.de>
369 * GraphicsCache.[Ch]:
370 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
371 to read the "Bounding Box" from non (e)ps files.
373 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
375 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
376 the EPS file too, to ensure that the clipped Bounding Box is relative
377 to the original. (From Herbert.)
379 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
381 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
382 variables are initialised. Clean-up parsing of the string (with thanks
385 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
387 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
388 if the file can't be found.
390 * GraphicsParams.h (c-tor): remove string() as default argument.
392 * GraphicsCacheItem.C: a couple of changes as a result.
394 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
396 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
397 path to graphics file.
399 * GraphicsParams.[Ch] (c-tor): now passed filepath.
401 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
403 * most files: ws cleanup
405 * Makefile.am: remove ld -r stuff
407 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
409 * Makefile.am: special rules if partial linking
411 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
413 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
415 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
417 * GraphicsConverter.[Ch] (converted): make first arg const ref.
419 * GraphicsCacheItem.h: doxy change
421 * GraphicsCacheItem.C: ws change
423 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
425 * Makefile.am: if there is no image loading class leveraging the power
426 of the appropriate gui library, then compile the basic alternative
427 found in GraphicsImageXPM.[Ch].
429 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
431 * GraphicsCache.C: change associated with move of initialiseGraphics
434 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
436 * GraphicsParams.[Ch]:
438 * GraphicsImageXPM.C: properly resolve more warnings about comparison
439 between signed and unsigned integer expressions.
441 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
443 * GraphicsCache.C: move connections to the GImage-derived classes to
446 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
448 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
449 conversion, then do that.
451 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
453 * GraphicsCache.C: improve commentary to graphicsInit and where it
456 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
457 that became a memory leak properly. (Let the shared_c_ptr free the
459 (reset, mapcolor): tidy up and introduce a work around for XPM files
460 with crappy color entries. Print out a nice friendly message on what's
461 gone wrong and how to resolve it properly.
463 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
465 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
466 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
468 (unique_color_string): use the correct string c-tor.
470 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
473 * ImageLoaderXPM.[Ch]: removed.
475 * GraphicsConverter.[Ch]:
476 * GraphicsImage.[Ch]:
477 * GraphicsImageXPM.[Ch]:
478 * GraphicsParams.[Ch]:
479 * GraphicsTypes.h: new files.
481 * All files. A total re-write of the graphics cache. The cache now
482 supports asynchronous file conversion and file loading. Images
483 can be cropped, rotated and scaled for display on the LyX screen.
484 The old LyXImage and ImageLoader have been combined in a new class
485 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
488 2002-02-07 Herbert Voss <voss@lyx.org>
490 * GraphicsCacheItem.C: use unzipFile() from support/filetools
492 2002-01-31 Herbert Voss <voss@lyx.org>
494 * GraphicsCacheItem.h: handle filetype without the file extension;
495 getting type from contents; handle zipped files
497 2002-01-27 Herbert Voss <voss@lyx.org>
499 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
501 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
503 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
505 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
507 * GraphicsCacheItem.h: do not include <config.h> in header files
509 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
511 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
512 transparent colour, then set it to the colour of the background.
513 Also take account of the monochrome, grayscale of color
516 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
518 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
519 are different. Thus, don't delete the "to" if it's the original!
521 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
523 * ImageLoadXPM.C: remove setting of alloc colour mask,
524 led to crash as we don't define a callback
526 2001-07-29 Baruch Even <baruch@lyx.org>
528 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
529 colors with closeness of 10000.
531 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
533 2001-07-29 Baruch Even <baruch@lyx.org>
535 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
538 2001-07-23 Baruch Even <baruch@lyx.org>
540 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
541 the image after conversion.
543 2001-07-17 Baruch Even <baruch@lyx.org>
545 * GraphicsCacheItem.h:
546 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
547 from synchronous to asynchronous and to ease the coming changes.
549 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
551 * ImageLoaderXPM.C (runImageLoader): get display information from
554 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
557 * GraphicsCacheItem.C:
559 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
561 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
563 * GraphicsCache.h: inherit privately from noncopyable
564 * ImageLoader.h: ditto
565 * GraphicsCacheItem.h: ditto
567 2001-04-16 Allan Rae <rae@lyx.org>
569 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
570 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
573 2001-04-02 Baruch Even <baruch@lyx.org>
575 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
576 of hard coding ImageMagick.
578 2001-03-10 Baruch Even <baruch@lyx.org>
580 * GraphicsCache.C: Style change from (*it).field to it->field
582 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
584 * GraphicsCache.h: noncopyable is in namespace boost
585 * ImageLoader.h: ditto
586 * GraphicsCacheItem.h: ditto
588 2001-03-07 Baruch Even <baruch@lyx.org>
590 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
591 was false and it's not needed anyhow since the shared_ptr's in the cache
592 will destroy everything on exit.
594 2001-02-28 Baruch Even <baruch@ev-en.org>
597 * GraphicsCache.C: Changed the singleton pattern implementation, the
598 former version "leaked" in the sense that it was not deallocated at
601 2001-02-20 Baruch Even <baruch@ev-en.org>
603 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
604 instead of a pure pointer.
606 * GraphicsCacheItem.[Ch]:
607 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
608 removed the reference counting that was inside. Also fixed a bug where
609 a temporary file wouldn't get erased.
611 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
612 Ownership is now dropped when the caller requests the image_ pointer.
614 2001-02-20 Baruch Even <baruch@ev-en.org>
616 * GraphicsCache.C: Cleared up the confusion on when and how it is
619 * GraphicsCacheItem.C: Indentation change.
621 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
622 figure correctly when the image has been loaded successfully.
624 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
626 * ImageLoader.C: add a "using" directive.
628 * ImageLoader.h: remove extra comma at the end of enum; add an
629 std:: qualifier for vector.
631 2001-01-21 Baruch Even <baruch@ev-en.org>
633 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
634 height in the image itself and minor cleanups.
636 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
637 new ImageLoader class instead of the older Renderer class. This
638 means change of responsibilities.