1 2002-07-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
3 * PreviewLoader.C (startLoading): pass an interger as resolution
4 to the lyxpreview converter
6 * GraphicsParams.C: include <cstdlib>
8 2002-07-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
10 * PreviewLoader.C (startLoading): use LibScriptSearch to find the
11 preview converter script
13 2002-07-18 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
15 * GraphicsCacheItem.C (reset): use erase() instead of clear() for
18 2002-07-18 Angus Leeming <leeming@lyx.org>
20 * GraphicsCacheItem.[Ch]: add a FileMonitor variable to the the Impl
22 (startMonitoring, monitoring, checksum): new methods to interact with
25 * GraphicsLoader.[Ch] (startMonitoring, monitoring, checksum): new
26 methods invoking the CacheItem methods of the same name.
27 (resetFile): if monitoring and the file changes, start monitoring this
30 2002-07-17 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
32 * Makefile.am: remove FileMonitor.[Ch]
34 2002-06-17 Herbert Voss <voss@lyx.org>
36 * GraphicsCachItem.C (findTargetFormat): remove the speciell case
37 for old ps-files (Garst). It's now handled by defining a converter and
38 disabling the ps-support of xforms.
40 2002-07-17 Angus Leeming <leeming@lyx.org>
42 Be true to the Pimpl idiom, moving all signals into the respective
43 Impl classes and defining methods to connect them to an outside slot.
44 Const-ify all visible class methods as they act only on a const pimpl_.
46 * GraphicsCache.[Ch] (add, remove): const-ify.
48 * GraphicsCacheItem.[Ch] (startLoading): const-ify.
49 (statusChanged): move the signal into the Impl class.
50 (connect): new method, enabling a listener to connect to this signal.
52 * GraphicsConverter.[Ch]: (startConversion): const-ify.
53 (finishedConversion): move the signal into the Impl class.
54 (connect): new method, enabling a listener to connect to this signal.
56 * GraphicsLoader.[Ch] (reset, startLoading): const-ify.
57 (statusChanged): move the signal into the Impl class.
58 (connect): new method, enabling a listener to connect to this signal.
60 * PreviewLoader.[Ch] (add, remove, startLoading): const-ify.
61 (imageReady): move the signal into the Impl class.
62 (connect): new method, enabling a listener to connect to this signal.
63 (emitSignal): new method, enabling PreviewImage to tell the outside
64 world that the file has been loaded into memory.
66 * Previews.[Ch] (loader, removeLoader, generateBufferPreviews):
70 * GraphicsCacheItem.C:
71 * GraphicsConverter.[Ch]:
75 * PreviewLoader.[Ch]: whitespace clean-up.
77 2002-07-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
79 * PreviewLoader.C (setConverter): remove unused variable
81 * GraphicsImageXPM.C (isDrawable): implement
82 (setPixmap): the opaque color is black, not white
84 2002-07-15 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
86 * GraphicsImageXPM.C (color_none_id):
87 (contains_color_none): use ascii_lowercase instead of lowercase
89 2002-07-16 Angus Leeming <leeming@lyx.org>
91 * PreviewLoader.C: greater use of STL algorithms.
93 * Previews.[Ch]: use const in more places.
94 (generateBufferPreviews): now takes a Buffer const & argument, not a
97 2002-07-15 John Levon <moz@compsoc.man.ac.uk>
99 * GraphicsImage.h: remove getPixmap/X, add isDrawable()
101 2002-07-12 Angus Leeming <leeming@lyx.org>
103 * GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
104 if visible 2 secs after the call to load them is first made.
106 * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
107 BufferView to ascertain whether the inset is visible or not.
109 * Makefile.am: added GraphicsSupport.[Ch].
111 * PreviewImage.[Ch]: use this smart loader.
113 * PreviewLoader.C: don't load generated image files indiscimminantly.
114 Instead emit the imageReady signal and allow the image owner to decide.
116 2002-07-12 John Levon <moz@compsoc.man.ac.uk>
118 * GraphicsCache.C: remove init_graphics()
120 2002-07-09 Angus Leeming <leeming@lyx.org>
122 * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
123 arithmetic when it should be floating.
125 2002-07-09 Angus Leeming <leeming@lyx.org>
127 * PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".
128 Output equation labels as "(#)" if lyxrc preference is set.
129 (setFontScalingFactor): use lyxrc variable preview_scale_factor
130 rather than hard-coding this.
132 2002-07-09 Angus Leeming <leeming@lyx.org>
134 * PreviewLoader.C: Further refactoring of the code. Should now be
137 * PreviewMetrics.[Ch]: removed. Had a v. short shelf life and is now
138 past its sell-by date. The code to read the metrics file is now found
139 as a helper function in PreviewLoader.C.
141 * GraphicsImageXPM.C (scale): use boost::tie.
143 2002-07-08 Herbert Voss <voss@lyx.org>
145 * PreviewLoader.C: use of preview_size_factor to get the right
146 font-size! 0.9 is the default.
148 2002-07-08 Angus Leeming <leeming@lyx.org>
150 * PreviewLoader.C: Add "delayed" and "showlabels" options to the
151 invocation of preview.sty.
152 Perform something of an internal clean-up.
154 2002-07-06 Angus Leeming <leeming@lyx.org>
156 * PreviewLoader.C: ensure that the metrics data is used by the
160 * PreviewImage.C: (Impl d-tor): remove all generated files that still
161 exist (perhaps because the process was curtailed before the images
164 * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
166 2002-07-05 Angus Leeming <leeming@lyx.org>
175 * Previews.C: new files. The previewed LaTeX snippet stuff.
177 * Makefile.am: add these files.
179 2002-07-05 Angus Leeming <leeming@lyx.org>
181 * GraphicsLoader.h: whitespace.
183 2002-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
185 * GraphicsImage.[Ch]: newImage and loadableFormats changed to
186 boost::function from boost::signal.
188 2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
190 * GraphicsConverter.C (convert): do not use ChangeExtension
191 because to_file_base may contain a dot.
193 2002-06-28 Angus Leeming <leeming@lyx.org>
195 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
196 by moving those SignalPtrs into the grfx::Image and grfx::Converter
197 classes where they really belong.
198 Use the Pimpl idiom to hide the class internals from public view.
200 * GraphicsTypes: remove the typedefs, leaving only the enums.
202 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
203 passed a reference to one in the load() method.
205 * GraphicsConverter.[Ch]: totally refactored. An instance of
206 grfx::Converter now represents a single conversion process.
207 Thus grfx::CachItem now has a grfx::Converter * that is set when the
208 conversion is initiated and destroyed on completion.
210 * GraphicsCache.[Ch]:
211 * GraphicsCacheItem.[Ch]:
212 * GraphicsConverter.[Ch]:
213 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
215 Note that I have done this only after making the above changes,
216 so not only should we have a clean, minimal and well documented
217 interface to these classes in the header files, but the class internals
218 should be much clearer too.
221 grfx::GCache -> grfx::Cache,
222 grfx::GCacheItem -> grfx::CacheItem,
223 grfx::GConverter -> grfx::Converter,
224 grfx::GImage -> grfx::Image,
225 grfx::GImageXPM -> grfx::ImageXPM,
226 grfx::GParams -> grfx::Params.
228 2002-06-26 Angus Leeming <leeming@lyx.org>
230 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
231 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
234 2002-06-26 Angus Leeming <leeming@lyx.org>
236 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
237 move the DisplayType enum out of grfx::GParams to here.
239 * GraphicsCacheItem.h: re-write preliminary description to reflect
242 * GraphicsParams.[Ch]:
243 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
244 grfx::DisplayType out of grfx::GParams.
246 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
247 that was in frontends/screen.C and insets/insetgraphics.C into a
248 single, easy-to-use class.
250 * Makefile.am: add these files.
252 2002-06-25 Angus Leeming <leeming@lyx.org>
254 * GraphicsCache.[Ch]:
255 * GraphicsCacheItem.[Ch]:
256 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
257 file into memory. The cache no longer controls the generation of the
258 pixmap. Instead, it just emits a signal when the loading status of an
260 The cache no longer stores InsetGraphics pointers and nor does it
261 assume responsibility for modifying an image (scaling, rotating etc).
262 Instead, that must now be performed elsewhere.
264 2002-06-19 Angus Leeming <leeming@lyx.org>
266 * GraphicsConverter.C: add using std::endl directive.
268 2002-06-17 Herbert Voss <voss@lyx.org>
270 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
271 default when nothing different was found
272 (convertToDisplayFormat): handle zipped files in the right way and
273 choose always convert as a default converter when no other
274 userdefined was found
276 * GraphicsConverter.C: add more lyxerr comments and choose
277 convert when no other userdefined converter was found
279 2002-06-10 Herbert Voss <voss@lyx.org>
281 * GraphicsImageXPM.C (convertTo7chars): get another special color
282 format from convert work in the right way
284 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
286 * GraphicsCache.C: use right colormap incantation
288 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
290 * GraphicsCache.C: use lyx_gui namespace
292 * GraphicsImageXPM.C: back down to using xforms
295 2002-06-07 Angus Leeming <leeming@lyx.org>
297 Fixes needed to compile with Compaq cxx 6.5.
298 * GraphicsConverter.h: forward declare class ConvProcess.
300 * GraphicsImageXPM.C:
301 all c-library variables have been moved into namespace std.
302 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
304 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
306 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
308 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
310 * GraphicsImageXPM.C: SigC to boot::signals changes.
311 (newImage): fix () bug when using new.
313 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
315 * switch from SigC signals to boost::signals.
317 2002-05-29 André Pönitz <poenitz@gmx.net>
319 * GraphicsParam.C: remove unneeded #include, move vomment
321 2002-05-28 André Pönitz <poenitz@gmx.net>
323 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
325 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
327 * GraphicsImageXPM.C: ColorHandler moved
329 2002-05-24 Juergen Vigna <jug@sad.it>
332 * GraphicsImage.h: include LString.h first.
334 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
336 * GraphicsCacheItem.h: use more specific smart_ptr header.
337 * GraphicsTypes.h: ditto
338 * GraphicsImage.h: ditto
339 * GraphicsConverter.h: ditto
341 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
343 * GraphicsImageXPM.C: understand convert's use of "opaque"
346 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
348 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
349 GImage::loadableFormats() that ensures that the signal is connected
350 to the derived class' method.
352 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
354 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
355 only work on the string.
357 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
359 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
360 the simple image loader when it encounters colour strings like
363 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
365 * GraphicsCacheItem.C (convertToDisplayFormat):
366 * GraphicsConverter.C (build_script): remove the Alerts when things go
367 wrong as the inset displays the message anyway. Moreover, Alert seems
368 pretty temperamemtal at the moment.
370 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
372 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
374 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
376 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
377 a reference to a temp object that's going out of scope...
379 2002-04-09 Herbert Voss <voss@lyx.org>
381 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
382 LyXLength::inBP instead of inPixels.
384 2002-04-10 Herbert Voss <voss@perce.de>
386 * GraphicsCache.[Ch]:
387 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
388 to read the "Bounding Box" from non (e)ps files.
390 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
392 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
393 the EPS file too, to ensure that the clipped Bounding Box is relative
394 to the original. (From Herbert.)
396 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
398 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
399 variables are initialised. Clean-up parsing of the string (with thanks
402 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
404 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
405 if the file can't be found.
407 * GraphicsParams.h (c-tor): remove string() as default argument.
409 * GraphicsCacheItem.C: a couple of changes as a result.
411 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
413 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
414 path to graphics file.
416 * GraphicsParams.[Ch] (c-tor): now passed filepath.
418 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
420 * most files: ws cleanup
422 * Makefile.am: remove ld -r stuff
424 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
426 * Makefile.am: special rules if partial linking
428 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
430 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
432 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
434 * GraphicsConverter.[Ch] (converted): make first arg const ref.
436 * GraphicsCacheItem.h: doxy change
438 * GraphicsCacheItem.C: ws change
440 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
442 * Makefile.am: if there is no image loading class leveraging the power
443 of the appropriate gui library, then compile the basic alternative
444 found in GraphicsImageXPM.[Ch].
446 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
448 * GraphicsCache.C: change associated with move of initialiseGraphics
451 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
453 * GraphicsParams.[Ch]:
455 * GraphicsImageXPM.C: properly resolve more warnings about comparison
456 between signed and unsigned integer expressions.
458 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
460 * GraphicsCache.C: move connections to the GImage-derived classes to
463 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
465 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
466 conversion, then do that.
468 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
470 * GraphicsCache.C: improve commentary to graphicsInit and where it
473 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
474 that became a memory leak properly. (Let the shared_c_ptr free the
476 (reset, mapcolor): tidy up and introduce a work around for XPM files
477 with crappy color entries. Print out a nice friendly message on what's
478 gone wrong and how to resolve it properly.
480 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
482 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
483 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
485 (unique_color_string): use the correct string c-tor.
487 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
490 * ImageLoaderXPM.[Ch]: removed.
492 * GraphicsConverter.[Ch]:
493 * GraphicsImage.[Ch]:
494 * GraphicsImageXPM.[Ch]:
495 * GraphicsParams.[Ch]:
496 * GraphicsTypes.h: new files.
498 * All files. A total re-write of the graphics cache. The cache now
499 supports asynchronous file conversion and file loading. Images
500 can be cropped, rotated and scaled for display on the LyX screen.
501 The old LyXImage and ImageLoader have been combined in a new class
502 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
505 2002-02-07 Herbert Voss <voss@lyx.org>
507 * GraphicsCacheItem.C: use unzipFile() from support/filetools
509 2002-01-31 Herbert Voss <voss@lyx.org>
511 * GraphicsCacheItem.h: handle filetype without the file extension;
512 getting type from contents; handle zipped files
514 2002-01-27 Herbert Voss <voss@lyx.org>
516 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
518 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
520 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
522 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
524 * GraphicsCacheItem.h: do not include <config.h> in header files
526 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
528 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
529 transparent colour, then set it to the colour of the background.
530 Also take account of the monochrome, grayscale of color
533 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
535 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
536 are different. Thus, don't delete the "to" if it's the original!
538 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
540 * ImageLoadXPM.C: remove setting of alloc colour mask,
541 led to crash as we don't define a callback
543 2001-07-29 Baruch Even <baruch@lyx.org>
545 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
546 colors with closeness of 10000.
548 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
550 2001-07-29 Baruch Even <baruch@lyx.org>
552 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
555 2001-07-23 Baruch Even <baruch@lyx.org>
557 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
558 the image after conversion.
560 2001-07-17 Baruch Even <baruch@lyx.org>
562 * GraphicsCacheItem.h:
563 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
564 from synchronous to asynchronous and to ease the coming changes.
566 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
568 * ImageLoaderXPM.C (runImageLoader): get display information from
571 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
574 * GraphicsCacheItem.C:
576 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
578 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
580 * GraphicsCache.h: inherit privately from noncopyable
581 * ImageLoader.h: ditto
582 * GraphicsCacheItem.h: ditto
584 2001-04-16 Allan Rae <rae@lyx.org>
586 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
587 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
590 2001-04-02 Baruch Even <baruch@lyx.org>
592 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
593 of hard coding ImageMagick.
595 2001-03-10 Baruch Even <baruch@lyx.org>
597 * GraphicsCache.C: Style change from (*it).field to it->field
599 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
601 * GraphicsCache.h: noncopyable is in namespace boost
602 * ImageLoader.h: ditto
603 * GraphicsCacheItem.h: ditto
605 2001-03-07 Baruch Even <baruch@lyx.org>
607 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
608 was false and it's not needed anyhow since the shared_ptr's in the cache
609 will destroy everything on exit.
611 2001-02-28 Baruch Even <baruch@ev-en.org>
614 * GraphicsCache.C: Changed the singleton pattern implementation, the
615 former version "leaked" in the sense that it was not deallocated at
618 2001-02-20 Baruch Even <baruch@ev-en.org>
620 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
621 instead of a pure pointer.
623 * GraphicsCacheItem.[Ch]:
624 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
625 removed the reference counting that was inside. Also fixed a bug where
626 a temporary file wouldn't get erased.
628 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
629 Ownership is now dropped when the caller requests the image_ pointer.
631 2001-02-20 Baruch Even <baruch@ev-en.org>
633 * GraphicsCache.C: Cleared up the confusion on when and how it is
636 * GraphicsCacheItem.C: Indentation change.
638 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
639 figure correctly when the image has been loaded successfully.
641 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
643 * ImageLoader.C: add a "using" directive.
645 * ImageLoader.h: remove extra comma at the end of enum; add an
646 std:: qualifier for vector.
648 2001-01-21 Baruch Even <baruch@ev-en.org>
650 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
651 height in the image itself and minor cleanups.
653 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
654 new ImageLoader class instead of the older Renderer class. This
655 means change of responsibilities.