1 2002-07-18 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
3 * GraphicsCacheItem.C (reset): use erase() instead of clear() for
6 2002-07-18 Angus Leeming <leeming@lyx.org>
8 * GraphicsCacheItem.[Ch]: add a FileMonitor variable to the the Impl
10 (startMonitoring, monitoring, checksum): new methods to interact with
13 * GraphicsLoader.[Ch] (startMonitoring, monitoring, checksum): new
14 methods invoking the CacheItem methods of the same name.
15 (resetFile): if monitoring and the file changes, start monitoring this
18 2002-07-17 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
20 * Makefile.am: remove FileMonitor.[Ch]
22 2002-06-17 Herbert Voss <voss@lyx.org>
24 * GraphicsCachItem.C (findTargetFormat): remove the speciell case
25 for old ps-files (Garst). It's now handled by defining a converter and
26 disabling the ps-support of xforms.
28 2002-07-17 Angus Leeming <leeming@lyx.org>
30 Be true to the Pimpl idiom, moving all signals into the respective
31 Impl classes and defining methods to connect them to an outside slot.
32 Const-ify all visible class methods as they act only on a const pimpl_.
34 * GraphicsCache.[Ch] (add, remove): const-ify.
36 * GraphicsCacheItem.[Ch] (startLoading): const-ify.
37 (statusChanged): move the signal into the Impl class.
38 (connect): new method, enabling a listener to connect to this signal.
40 * GraphicsConverter.[Ch]: (startConversion): const-ify.
41 (finishedConversion): move the signal into the Impl class.
42 (connect): new method, enabling a listener to connect to this signal.
44 * GraphicsLoader.[Ch] (reset, startLoading): const-ify.
45 (statusChanged): move the signal into the Impl class.
46 (connect): new method, enabling a listener to connect to this signal.
48 * PreviewLoader.[Ch] (add, remove, startLoading): const-ify.
49 (imageReady): move the signal into the Impl class.
50 (connect): new method, enabling a listener to connect to this signal.
51 (emitSignal): new method, enabling PreviewImage to tell the outside
52 world that the file has been loaded into memory.
54 * Previews.[Ch] (loader, removeLoader, generateBufferPreviews):
58 * GraphicsCacheItem.C:
59 * GraphicsConverter.[Ch]:
63 * PreviewLoader.[Ch]: whitespace clean-up.
65 2002-07-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
67 * PreviewLoader.C (setConverter): remove unused variable
69 * GraphicsImageXPM.C (isDrawable): implement
70 (setPixmap): the opaque color is black, not white
72 2002-07-15 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
74 * GraphicsImageXPM.C (color_none_id):
75 (contains_color_none): use ascii_lowercase instead of lowercase
77 2002-07-16 Angus Leeming <leeming@lyx.org>
79 * PreviewLoader.C: greater use of STL algorithms.
81 * Previews.[Ch]: use const in more places.
82 (generateBufferPreviews): now takes a Buffer const & argument, not a
85 2002-07-15 John Levon <moz@compsoc.man.ac.uk>
87 * GraphicsImage.h: remove getPixmap/X, add isDrawable()
89 2002-07-12 Angus Leeming <leeming@lyx.org>
91 * GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
92 if visible 2 secs after the call to load them is first made.
94 * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
95 BufferView to ascertain whether the inset is visible or not.
97 * Makefile.am: added GraphicsSupport.[Ch].
99 * PreviewImage.[Ch]: use this smart loader.
101 * PreviewLoader.C: don't load generated image files indiscimminantly.
102 Instead emit the imageReady signal and allow the image owner to decide.
104 2002-07-12 John Levon <moz@compsoc.man.ac.uk>
106 * GraphicsCache.C: remove init_graphics()
108 2002-07-09 Angus Leeming <leeming@lyx.org>
110 * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
111 arithmetic when it should be floating.
113 2002-07-09 Angus Leeming <leeming@lyx.org>
115 * PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".
116 Output equation labels as "(#)" if lyxrc preference is set.
117 (setFontScalingFactor): use lyxrc variable preview_scale_factor
118 rather than hard-coding this.
120 2002-07-09 Angus Leeming <leeming@lyx.org>
122 * PreviewLoader.C: Further refactoring of the code. Should now be
125 * PreviewMetrics.[Ch]: removed. Had a v. short shelf life and is now
126 past its sell-by date. The code to read the metrics file is now found
127 as a helper function in PreviewLoader.C.
129 * GraphicsImageXPM.C (scale): use boost::tie.
131 2002-07-08 Herbert Voss <voss@lyx.org>
133 * PreviewLoader.C: use of preview_size_factor to get the right
134 font-size! 0.9 is the default.
136 2002-07-08 Angus Leeming <leeming@lyx.org>
138 * PreviewLoader.C: Add "delayed" and "showlabels" options to the
139 invocation of preview.sty.
140 Perform something of an internal clean-up.
142 2002-07-06 Angus Leeming <leeming@lyx.org>
144 * PreviewLoader.C: ensure that the metrics data is used by the
148 * PreviewImage.C: (Impl d-tor): remove all generated files that still
149 exist (perhaps because the process was curtailed before the images
152 * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
154 2002-07-05 Angus Leeming <leeming@lyx.org>
163 * Previews.C: new files. The previewed LaTeX snippet stuff.
165 * Makefile.am: add these files.
167 2002-07-05 Angus Leeming <leeming@lyx.org>
169 * GraphicsLoader.h: whitespace.
171 2002-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
173 * GraphicsImage.[Ch]: newImage and loadableFormats changed to
174 boost::function from boost::signal.
176 2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
178 * GraphicsConverter.C (convert): do not use ChangeExtension
179 because to_file_base may contain a dot.
181 2002-06-28 Angus Leeming <leeming@lyx.org>
183 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
184 by moving those SignalPtrs into the grfx::Image and grfx::Converter
185 classes where they really belong.
186 Use the Pimpl idiom to hide the class internals from public view.
188 * GraphicsTypes: remove the typedefs, leaving only the enums.
190 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
191 passed a reference to one in the load() method.
193 * GraphicsConverter.[Ch]: totally refactored. An instance of
194 grfx::Converter now represents a single conversion process.
195 Thus grfx::CachItem now has a grfx::Converter * that is set when the
196 conversion is initiated and destroyed on completion.
198 * GraphicsCache.[Ch]:
199 * GraphicsCacheItem.[Ch]:
200 * GraphicsConverter.[Ch]:
201 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
203 Note that I have done this only after making the above changes,
204 so not only should we have a clean, minimal and well documented
205 interface to these classes in the header files, but the class internals
206 should be much clearer too.
209 grfx::GCache -> grfx::Cache,
210 grfx::GCacheItem -> grfx::CacheItem,
211 grfx::GConverter -> grfx::Converter,
212 grfx::GImage -> grfx::Image,
213 grfx::GImageXPM -> grfx::ImageXPM,
214 grfx::GParams -> grfx::Params.
216 2002-06-26 Angus Leeming <leeming@lyx.org>
218 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
219 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
222 2002-06-26 Angus Leeming <leeming@lyx.org>
224 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
225 move the DisplayType enum out of grfx::GParams to here.
227 * GraphicsCacheItem.h: re-write preliminary description to reflect
230 * GraphicsParams.[Ch]:
231 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
232 grfx::DisplayType out of grfx::GParams.
234 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
235 that was in frontends/screen.C and insets/insetgraphics.C into a
236 single, easy-to-use class.
238 * Makefile.am: add these files.
240 2002-06-25 Angus Leeming <leeming@lyx.org>
242 * GraphicsCache.[Ch]:
243 * GraphicsCacheItem.[Ch]:
244 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
245 file into memory. The cache no longer controls the generation of the
246 pixmap. Instead, it just emits a signal when the loading status of an
248 The cache no longer stores InsetGraphics pointers and nor does it
249 assume responsibility for modifying an image (scaling, rotating etc).
250 Instead, that must now be performed elsewhere.
252 2002-06-19 Angus Leeming <leeming@lyx.org>
254 * GraphicsConverter.C: add using std::endl directive.
256 2002-06-17 Herbert Voss <voss@lyx.org>
258 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
259 default when nothing different was found
260 (convertToDisplayFormat): handle zipped files in the right way and
261 choose always convert as a default converter when no other
262 userdefined was found
264 * GraphicsConverter.C: add more lyxerr comments and choose
265 convert when no other userdefined converter was found
267 2002-06-10 Herbert Voss <voss@lyx.org>
269 * GraphicsImageXPM.C (convertTo7chars): get another special color
270 format from convert work in the right way
272 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
274 * GraphicsCache.C: use right colormap incantation
276 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
278 * GraphicsCache.C: use lyx_gui namespace
280 * GraphicsImageXPM.C: back down to using xforms
283 2002-06-07 Angus Leeming <leeming@lyx.org>
285 Fixes needed to compile with Compaq cxx 6.5.
286 * GraphicsConverter.h: forward declare class ConvProcess.
288 * GraphicsImageXPM.C:
289 all c-library variables have been moved into namespace std.
290 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
292 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
294 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
296 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
298 * GraphicsImageXPM.C: SigC to boot::signals changes.
299 (newImage): fix () bug when using new.
301 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
303 * switch from SigC signals to boost::signals.
305 2002-05-29 André Pönitz <poenitz@gmx.net>
307 * GraphicsParam.C: remove unneeded #include, move vomment
309 2002-05-28 André Pönitz <poenitz@gmx.net>
311 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
313 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
315 * GraphicsImageXPM.C: ColorHandler moved
317 2002-05-24 Juergen Vigna <jug@sad.it>
320 * GraphicsImage.h: include LString.h first.
322 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
324 * GraphicsCacheItem.h: use more specific smart_ptr header.
325 * GraphicsTypes.h: ditto
326 * GraphicsImage.h: ditto
327 * GraphicsConverter.h: ditto
329 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
331 * GraphicsImageXPM.C: understand convert's use of "opaque"
334 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
336 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
337 GImage::loadableFormats() that ensures that the signal is connected
338 to the derived class' method.
340 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
342 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
343 only work on the string.
345 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
347 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
348 the simple image loader when it encounters colour strings like
351 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
353 * GraphicsCacheItem.C (convertToDisplayFormat):
354 * GraphicsConverter.C (build_script): remove the Alerts when things go
355 wrong as the inset displays the message anyway. Moreover, Alert seems
356 pretty temperamemtal at the moment.
358 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
360 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
362 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
364 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
365 a reference to a temp object that's going out of scope...
367 2002-04-09 Herbert Voss <voss@lyx.org>
369 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
370 LyXLength::inBP instead of inPixels.
372 2002-04-10 Herbert Voss <voss@perce.de>
374 * GraphicsCache.[Ch]:
375 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
376 to read the "Bounding Box" from non (e)ps files.
378 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
380 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
381 the EPS file too, to ensure that the clipped Bounding Box is relative
382 to the original. (From Herbert.)
384 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
386 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
387 variables are initialised. Clean-up parsing of the string (with thanks
390 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
392 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
393 if the file can't be found.
395 * GraphicsParams.h (c-tor): remove string() as default argument.
397 * GraphicsCacheItem.C: a couple of changes as a result.
399 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
401 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
402 path to graphics file.
404 * GraphicsParams.[Ch] (c-tor): now passed filepath.
406 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
408 * most files: ws cleanup
410 * Makefile.am: remove ld -r stuff
412 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
414 * Makefile.am: special rules if partial linking
416 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
418 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
420 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
422 * GraphicsConverter.[Ch] (converted): make first arg const ref.
424 * GraphicsCacheItem.h: doxy change
426 * GraphicsCacheItem.C: ws change
428 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
430 * Makefile.am: if there is no image loading class leveraging the power
431 of the appropriate gui library, then compile the basic alternative
432 found in GraphicsImageXPM.[Ch].
434 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
436 * GraphicsCache.C: change associated with move of initialiseGraphics
439 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
441 * GraphicsParams.[Ch]:
443 * GraphicsImageXPM.C: properly resolve more warnings about comparison
444 between signed and unsigned integer expressions.
446 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
448 * GraphicsCache.C: move connections to the GImage-derived classes to
451 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
453 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
454 conversion, then do that.
456 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
458 * GraphicsCache.C: improve commentary to graphicsInit and where it
461 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
462 that became a memory leak properly. (Let the shared_c_ptr free the
464 (reset, mapcolor): tidy up and introduce a work around for XPM files
465 with crappy color entries. Print out a nice friendly message on what's
466 gone wrong and how to resolve it properly.
468 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
470 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
471 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
473 (unique_color_string): use the correct string c-tor.
475 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
478 * ImageLoaderXPM.[Ch]: removed.
480 * GraphicsConverter.[Ch]:
481 * GraphicsImage.[Ch]:
482 * GraphicsImageXPM.[Ch]:
483 * GraphicsParams.[Ch]:
484 * GraphicsTypes.h: new files.
486 * All files. A total re-write of the graphics cache. The cache now
487 supports asynchronous file conversion and file loading. Images
488 can be cropped, rotated and scaled for display on the LyX screen.
489 The old LyXImage and ImageLoader have been combined in a new class
490 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
493 2002-02-07 Herbert Voss <voss@lyx.org>
495 * GraphicsCacheItem.C: use unzipFile() from support/filetools
497 2002-01-31 Herbert Voss <voss@lyx.org>
499 * GraphicsCacheItem.h: handle filetype without the file extension;
500 getting type from contents; handle zipped files
502 2002-01-27 Herbert Voss <voss@lyx.org>
504 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
506 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
508 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
510 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
512 * GraphicsCacheItem.h: do not include <config.h> in header files
514 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
516 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
517 transparent colour, then set it to the colour of the background.
518 Also take account of the monochrome, grayscale of color
521 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
523 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
524 are different. Thus, don't delete the "to" if it's the original!
526 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
528 * ImageLoadXPM.C: remove setting of alloc colour mask,
529 led to crash as we don't define a callback
531 2001-07-29 Baruch Even <baruch@lyx.org>
533 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
534 colors with closeness of 10000.
536 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
538 2001-07-29 Baruch Even <baruch@lyx.org>
540 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
543 2001-07-23 Baruch Even <baruch@lyx.org>
545 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
546 the image after conversion.
548 2001-07-17 Baruch Even <baruch@lyx.org>
550 * GraphicsCacheItem.h:
551 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
552 from synchronous to asynchronous and to ease the coming changes.
554 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
556 * ImageLoaderXPM.C (runImageLoader): get display information from
559 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
562 * GraphicsCacheItem.C:
564 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
566 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
568 * GraphicsCache.h: inherit privately from noncopyable
569 * ImageLoader.h: ditto
570 * GraphicsCacheItem.h: ditto
572 2001-04-16 Allan Rae <rae@lyx.org>
574 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
575 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
578 2001-04-02 Baruch Even <baruch@lyx.org>
580 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
581 of hard coding ImageMagick.
583 2001-03-10 Baruch Even <baruch@lyx.org>
585 * GraphicsCache.C: Style change from (*it).field to it->field
587 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
589 * GraphicsCache.h: noncopyable is in namespace boost
590 * ImageLoader.h: ditto
591 * GraphicsCacheItem.h: ditto
593 2001-03-07 Baruch Even <baruch@lyx.org>
595 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
596 was false and it's not needed anyhow since the shared_ptr's in the cache
597 will destroy everything on exit.
599 2001-02-28 Baruch Even <baruch@ev-en.org>
602 * GraphicsCache.C: Changed the singleton pattern implementation, the
603 former version "leaked" in the sense that it was not deallocated at
606 2001-02-20 Baruch Even <baruch@ev-en.org>
608 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
609 instead of a pure pointer.
611 * GraphicsCacheItem.[Ch]:
612 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
613 removed the reference counting that was inside. Also fixed a bug where
614 a temporary file wouldn't get erased.
616 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
617 Ownership is now dropped when the caller requests the image_ pointer.
619 2001-02-20 Baruch Even <baruch@ev-en.org>
621 * GraphicsCache.C: Cleared up the confusion on when and how it is
624 * GraphicsCacheItem.C: Indentation change.
626 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
627 figure correctly when the image has been loaded successfully.
629 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
631 * ImageLoader.C: add a "using" directive.
633 * ImageLoader.h: remove extra comma at the end of enum; add an
634 std:: qualifier for vector.
636 2001-01-21 Baruch Even <baruch@ev-en.org>
638 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
639 height in the image itself and minor cleanups.
641 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
642 new ImageLoader class instead of the older Renderer class. This
643 means change of responsibilities.