1 2002-07-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
3 * PreviewLoader.C (startLoading): use LibScriptSearch to find the
4 preview converter script
6 2002-07-18 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
8 * GraphicsCacheItem.C (reset): use erase() instead of clear() for
11 2002-07-18 Angus Leeming <leeming@lyx.org>
13 * GraphicsCacheItem.[Ch]: add a FileMonitor variable to the the Impl
15 (startMonitoring, monitoring, checksum): new methods to interact with
18 * GraphicsLoader.[Ch] (startMonitoring, monitoring, checksum): new
19 methods invoking the CacheItem methods of the same name.
20 (resetFile): if monitoring and the file changes, start monitoring this
23 2002-07-17 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
25 * Makefile.am: remove FileMonitor.[Ch]
27 2002-06-17 Herbert Voss <voss@lyx.org>
29 * GraphicsCachItem.C (findTargetFormat): remove the speciell case
30 for old ps-files (Garst). It's now handled by defining a converter and
31 disabling the ps-support of xforms.
33 2002-07-17 Angus Leeming <leeming@lyx.org>
35 Be true to the Pimpl idiom, moving all signals into the respective
36 Impl classes and defining methods to connect them to an outside slot.
37 Const-ify all visible class methods as they act only on a const pimpl_.
39 * GraphicsCache.[Ch] (add, remove): const-ify.
41 * GraphicsCacheItem.[Ch] (startLoading): const-ify.
42 (statusChanged): move the signal into the Impl class.
43 (connect): new method, enabling a listener to connect to this signal.
45 * GraphicsConverter.[Ch]: (startConversion): const-ify.
46 (finishedConversion): move the signal into the Impl class.
47 (connect): new method, enabling a listener to connect to this signal.
49 * GraphicsLoader.[Ch] (reset, startLoading): const-ify.
50 (statusChanged): move the signal into the Impl class.
51 (connect): new method, enabling a listener to connect to this signal.
53 * PreviewLoader.[Ch] (add, remove, startLoading): const-ify.
54 (imageReady): move the signal into the Impl class.
55 (connect): new method, enabling a listener to connect to this signal.
56 (emitSignal): new method, enabling PreviewImage to tell the outside
57 world that the file has been loaded into memory.
59 * Previews.[Ch] (loader, removeLoader, generateBufferPreviews):
63 * GraphicsCacheItem.C:
64 * GraphicsConverter.[Ch]:
68 * PreviewLoader.[Ch]: whitespace clean-up.
70 2002-07-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
72 * PreviewLoader.C (setConverter): remove unused variable
74 * GraphicsImageXPM.C (isDrawable): implement
75 (setPixmap): the opaque color is black, not white
77 2002-07-15 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
79 * GraphicsImageXPM.C (color_none_id):
80 (contains_color_none): use ascii_lowercase instead of lowercase
82 2002-07-16 Angus Leeming <leeming@lyx.org>
84 * PreviewLoader.C: greater use of STL algorithms.
86 * Previews.[Ch]: use const in more places.
87 (generateBufferPreviews): now takes a Buffer const & argument, not a
90 2002-07-15 John Levon <moz@compsoc.man.ac.uk>
92 * GraphicsImage.h: remove getPixmap/X, add isDrawable()
94 2002-07-12 Angus Leeming <leeming@lyx.org>
96 * GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
97 if visible 2 secs after the call to load them is first made.
99 * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
100 BufferView to ascertain whether the inset is visible or not.
102 * Makefile.am: added GraphicsSupport.[Ch].
104 * PreviewImage.[Ch]: use this smart loader.
106 * PreviewLoader.C: don't load generated image files indiscimminantly.
107 Instead emit the imageReady signal and allow the image owner to decide.
109 2002-07-12 John Levon <moz@compsoc.man.ac.uk>
111 * GraphicsCache.C: remove init_graphics()
113 2002-07-09 Angus Leeming <leeming@lyx.org>
115 * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
116 arithmetic when it should be floating.
118 2002-07-09 Angus Leeming <leeming@lyx.org>
120 * PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".
121 Output equation labels as "(#)" if lyxrc preference is set.
122 (setFontScalingFactor): use lyxrc variable preview_scale_factor
123 rather than hard-coding this.
125 2002-07-09 Angus Leeming <leeming@lyx.org>
127 * PreviewLoader.C: Further refactoring of the code. Should now be
130 * PreviewMetrics.[Ch]: removed. Had a v. short shelf life and is now
131 past its sell-by date. The code to read the metrics file is now found
132 as a helper function in PreviewLoader.C.
134 * GraphicsImageXPM.C (scale): use boost::tie.
136 2002-07-08 Herbert Voss <voss@lyx.org>
138 * PreviewLoader.C: use of preview_size_factor to get the right
139 font-size! 0.9 is the default.
141 2002-07-08 Angus Leeming <leeming@lyx.org>
143 * PreviewLoader.C: Add "delayed" and "showlabels" options to the
144 invocation of preview.sty.
145 Perform something of an internal clean-up.
147 2002-07-06 Angus Leeming <leeming@lyx.org>
149 * PreviewLoader.C: ensure that the metrics data is used by the
153 * PreviewImage.C: (Impl d-tor): remove all generated files that still
154 exist (perhaps because the process was curtailed before the images
157 * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
159 2002-07-05 Angus Leeming <leeming@lyx.org>
168 * Previews.C: new files. The previewed LaTeX snippet stuff.
170 * Makefile.am: add these files.
172 2002-07-05 Angus Leeming <leeming@lyx.org>
174 * GraphicsLoader.h: whitespace.
176 2002-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
178 * GraphicsImage.[Ch]: newImage and loadableFormats changed to
179 boost::function from boost::signal.
181 2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
183 * GraphicsConverter.C (convert): do not use ChangeExtension
184 because to_file_base may contain a dot.
186 2002-06-28 Angus Leeming <leeming@lyx.org>
188 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
189 by moving those SignalPtrs into the grfx::Image and grfx::Converter
190 classes where they really belong.
191 Use the Pimpl idiom to hide the class internals from public view.
193 * GraphicsTypes: remove the typedefs, leaving only the enums.
195 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
196 passed a reference to one in the load() method.
198 * GraphicsConverter.[Ch]: totally refactored. An instance of
199 grfx::Converter now represents a single conversion process.
200 Thus grfx::CachItem now has a grfx::Converter * that is set when the
201 conversion is initiated and destroyed on completion.
203 * GraphicsCache.[Ch]:
204 * GraphicsCacheItem.[Ch]:
205 * GraphicsConverter.[Ch]:
206 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
208 Note that I have done this only after making the above changes,
209 so not only should we have a clean, minimal and well documented
210 interface to these classes in the header files, but the class internals
211 should be much clearer too.
214 grfx::GCache -> grfx::Cache,
215 grfx::GCacheItem -> grfx::CacheItem,
216 grfx::GConverter -> grfx::Converter,
217 grfx::GImage -> grfx::Image,
218 grfx::GImageXPM -> grfx::ImageXPM,
219 grfx::GParams -> grfx::Params.
221 2002-06-26 Angus Leeming <leeming@lyx.org>
223 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
224 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
227 2002-06-26 Angus Leeming <leeming@lyx.org>
229 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
230 move the DisplayType enum out of grfx::GParams to here.
232 * GraphicsCacheItem.h: re-write preliminary description to reflect
235 * GraphicsParams.[Ch]:
236 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
237 grfx::DisplayType out of grfx::GParams.
239 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
240 that was in frontends/screen.C and insets/insetgraphics.C into a
241 single, easy-to-use class.
243 * Makefile.am: add these files.
245 2002-06-25 Angus Leeming <leeming@lyx.org>
247 * GraphicsCache.[Ch]:
248 * GraphicsCacheItem.[Ch]:
249 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
250 file into memory. The cache no longer controls the generation of the
251 pixmap. Instead, it just emits a signal when the loading status of an
253 The cache no longer stores InsetGraphics pointers and nor does it
254 assume responsibility for modifying an image (scaling, rotating etc).
255 Instead, that must now be performed elsewhere.
257 2002-06-19 Angus Leeming <leeming@lyx.org>
259 * GraphicsConverter.C: add using std::endl directive.
261 2002-06-17 Herbert Voss <voss@lyx.org>
263 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
264 default when nothing different was found
265 (convertToDisplayFormat): handle zipped files in the right way and
266 choose always convert as a default converter when no other
267 userdefined was found
269 * GraphicsConverter.C: add more lyxerr comments and choose
270 convert when no other userdefined converter was found
272 2002-06-10 Herbert Voss <voss@lyx.org>
274 * GraphicsImageXPM.C (convertTo7chars): get another special color
275 format from convert work in the right way
277 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
279 * GraphicsCache.C: use right colormap incantation
281 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
283 * GraphicsCache.C: use lyx_gui namespace
285 * GraphicsImageXPM.C: back down to using xforms
288 2002-06-07 Angus Leeming <leeming@lyx.org>
290 Fixes needed to compile with Compaq cxx 6.5.
291 * GraphicsConverter.h: forward declare class ConvProcess.
293 * GraphicsImageXPM.C:
294 all c-library variables have been moved into namespace std.
295 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
297 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
299 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
301 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
303 * GraphicsImageXPM.C: SigC to boot::signals changes.
304 (newImage): fix () bug when using new.
306 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
308 * switch from SigC signals to boost::signals.
310 2002-05-29 André Pönitz <poenitz@gmx.net>
312 * GraphicsParam.C: remove unneeded #include, move vomment
314 2002-05-28 André Pönitz <poenitz@gmx.net>
316 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
318 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
320 * GraphicsImageXPM.C: ColorHandler moved
322 2002-05-24 Juergen Vigna <jug@sad.it>
325 * GraphicsImage.h: include LString.h first.
327 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
329 * GraphicsCacheItem.h: use more specific smart_ptr header.
330 * GraphicsTypes.h: ditto
331 * GraphicsImage.h: ditto
332 * GraphicsConverter.h: ditto
334 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
336 * GraphicsImageXPM.C: understand convert's use of "opaque"
339 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
341 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
342 GImage::loadableFormats() that ensures that the signal is connected
343 to the derived class' method.
345 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
347 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
348 only work on the string.
350 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
352 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
353 the simple image loader when it encounters colour strings like
356 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
358 * GraphicsCacheItem.C (convertToDisplayFormat):
359 * GraphicsConverter.C (build_script): remove the Alerts when things go
360 wrong as the inset displays the message anyway. Moreover, Alert seems
361 pretty temperamemtal at the moment.
363 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
365 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
367 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
369 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
370 a reference to a temp object that's going out of scope...
372 2002-04-09 Herbert Voss <voss@lyx.org>
374 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
375 LyXLength::inBP instead of inPixels.
377 2002-04-10 Herbert Voss <voss@perce.de>
379 * GraphicsCache.[Ch]:
380 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
381 to read the "Bounding Box" from non (e)ps files.
383 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
385 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
386 the EPS file too, to ensure that the clipped Bounding Box is relative
387 to the original. (From Herbert.)
389 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
391 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
392 variables are initialised. Clean-up parsing of the string (with thanks
395 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
397 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
398 if the file can't be found.
400 * GraphicsParams.h (c-tor): remove string() as default argument.
402 * GraphicsCacheItem.C: a couple of changes as a result.
404 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
406 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
407 path to graphics file.
409 * GraphicsParams.[Ch] (c-tor): now passed filepath.
411 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
413 * most files: ws cleanup
415 * Makefile.am: remove ld -r stuff
417 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
419 * Makefile.am: special rules if partial linking
421 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
423 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
425 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
427 * GraphicsConverter.[Ch] (converted): make first arg const ref.
429 * GraphicsCacheItem.h: doxy change
431 * GraphicsCacheItem.C: ws change
433 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
435 * Makefile.am: if there is no image loading class leveraging the power
436 of the appropriate gui library, then compile the basic alternative
437 found in GraphicsImageXPM.[Ch].
439 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
441 * GraphicsCache.C: change associated with move of initialiseGraphics
444 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
446 * GraphicsParams.[Ch]:
448 * GraphicsImageXPM.C: properly resolve more warnings about comparison
449 between signed and unsigned integer expressions.
451 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
453 * GraphicsCache.C: move connections to the GImage-derived classes to
456 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
458 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
459 conversion, then do that.
461 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
463 * GraphicsCache.C: improve commentary to graphicsInit and where it
466 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
467 that became a memory leak properly. (Let the shared_c_ptr free the
469 (reset, mapcolor): tidy up and introduce a work around for XPM files
470 with crappy color entries. Print out a nice friendly message on what's
471 gone wrong and how to resolve it properly.
473 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
475 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
476 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
478 (unique_color_string): use the correct string c-tor.
480 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
483 * ImageLoaderXPM.[Ch]: removed.
485 * GraphicsConverter.[Ch]:
486 * GraphicsImage.[Ch]:
487 * GraphicsImageXPM.[Ch]:
488 * GraphicsParams.[Ch]:
489 * GraphicsTypes.h: new files.
491 * All files. A total re-write of the graphics cache. The cache now
492 supports asynchronous file conversion and file loading. Images
493 can be cropped, rotated and scaled for display on the LyX screen.
494 The old LyXImage and ImageLoader have been combined in a new class
495 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
498 2002-02-07 Herbert Voss <voss@lyx.org>
500 * GraphicsCacheItem.C: use unzipFile() from support/filetools
502 2002-01-31 Herbert Voss <voss@lyx.org>
504 * GraphicsCacheItem.h: handle filetype without the file extension;
505 getting type from contents; handle zipped files
507 2002-01-27 Herbert Voss <voss@lyx.org>
509 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
511 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
513 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
515 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
517 * GraphicsCacheItem.h: do not include <config.h> in header files
519 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
521 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
522 transparent colour, then set it to the colour of the background.
523 Also take account of the monochrome, grayscale of color
526 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
528 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
529 are different. Thus, don't delete the "to" if it's the original!
531 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
533 * ImageLoadXPM.C: remove setting of alloc colour mask,
534 led to crash as we don't define a callback
536 2001-07-29 Baruch Even <baruch@lyx.org>
538 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
539 colors with closeness of 10000.
541 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
543 2001-07-29 Baruch Even <baruch@lyx.org>
545 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
548 2001-07-23 Baruch Even <baruch@lyx.org>
550 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
551 the image after conversion.
553 2001-07-17 Baruch Even <baruch@lyx.org>
555 * GraphicsCacheItem.h:
556 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
557 from synchronous to asynchronous and to ease the coming changes.
559 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
561 * ImageLoaderXPM.C (runImageLoader): get display information from
564 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
567 * GraphicsCacheItem.C:
569 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
571 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
573 * GraphicsCache.h: inherit privately from noncopyable
574 * ImageLoader.h: ditto
575 * GraphicsCacheItem.h: ditto
577 2001-04-16 Allan Rae <rae@lyx.org>
579 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
580 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
583 2001-04-02 Baruch Even <baruch@lyx.org>
585 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
586 of hard coding ImageMagick.
588 2001-03-10 Baruch Even <baruch@lyx.org>
590 * GraphicsCache.C: Style change from (*it).field to it->field
592 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
594 * GraphicsCache.h: noncopyable is in namespace boost
595 * ImageLoader.h: ditto
596 * GraphicsCacheItem.h: ditto
598 2001-03-07 Baruch Even <baruch@lyx.org>
600 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
601 was false and it's not needed anyhow since the shared_ptr's in the cache
602 will destroy everything on exit.
604 2001-02-28 Baruch Even <baruch@ev-en.org>
607 * GraphicsCache.C: Changed the singleton pattern implementation, the
608 former version "leaked" in the sense that it was not deallocated at
611 2001-02-20 Baruch Even <baruch@ev-en.org>
613 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
614 instead of a pure pointer.
616 * GraphicsCacheItem.[Ch]:
617 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
618 removed the reference counting that was inside. Also fixed a bug where
619 a temporary file wouldn't get erased.
621 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
622 Ownership is now dropped when the caller requests the image_ pointer.
624 2001-02-20 Baruch Even <baruch@ev-en.org>
626 * GraphicsCache.C: Cleared up the confusion on when and how it is
629 * GraphicsCacheItem.C: Indentation change.
631 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
632 figure correctly when the image has been loaded successfully.
634 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
636 * ImageLoader.C: add a "using" directive.
638 * ImageLoader.h: remove extra comma at the end of enum; add an
639 std:: qualifier for vector.
641 2001-01-21 Baruch Even <baruch@ev-en.org>
643 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
644 height in the image itself and minor cleanups.
646 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
647 new ImageLoader class instead of the older Renderer class. This
648 means change of responsibilities.