1 2002-06-17 Herbert Voss <voss@lyx.org>
3 * GraphicsCachItem.C (findTargetFormat): remove the speciell case
4 for old ps-files (Garst). It's now handled by defining a converter and
5 disabling the ps-support of xforms.
7 2002-07-17 Angus Leeming <leeming@lyx.org>
9 Be true to the Pimpl idiom, moving all signals into the respective
10 Impl classes and defining methods to connect them to an outside slot.
11 Const-ify all visible class methods as they act only on a const pimpl_.
13 * GraphicsCache.[Ch] (add, remove): const-ify.
15 * GraphicsCacheItem.[Ch] (startLoading): const-ify.
16 (statusChanged): move the signal into the Impl class.
17 (connect): new method, enabling a listener to connect to this signal.
19 * GraphicsConverter.[Ch]: (startConversion): const-ify.
20 (finishedConversion): move the signal into the Impl class.
21 (connect): new method, enabling a listener to connect to this signal.
23 * GraphicsLoader.[Ch] (reset, startLoading): const-ify.
24 (statusChanged): move the signal into the Impl class.
25 (connect): new method, enabling a listener to connect to this signal.
27 * PreviewLoader.[Ch] (add, remove, startLoading): const-ify.
28 (imageReady): move the signal into the Impl class.
29 (connect): new method, enabling a listener to connect to this signal.
30 (emitSignal): new method, enabling PreviewImage to tell the outside
31 world that the file has been loaded into memory.
33 * Previews.[Ch] (loader, removeLoader, generateBufferPreviews):
37 * GraphicsCacheItem.C:
38 * GraphicsConverter.[Ch]:
42 * PreviewLoader.[Ch]: whitespace clean-up.
44 2002-07-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
46 * PreviewLoader.C (setConverter): remove unused variable
48 * GraphicsImageXPM.C (isDrawable): implement
49 (setPixmap): the opaque color is black, not white
51 2002-07-15 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
53 * GraphicsImageXPM.C (color_none_id):
54 (contains_color_none): use ascii_lowercase instead of lowercase
56 2002-07-16 Angus Leeming <leeming@lyx.org>
58 * PreviewLoader.C: greater use of STL algorithms.
60 * Previews.[Ch]: use const in more places.
61 (generateBufferPreviews): now takes a Buffer const & argument, not a
64 2002-07-15 John Levon <moz@compsoc.man.ac.uk>
66 * GraphicsImage.h: remove getPixmap/X, add isDrawable()
68 2002-07-12 Angus Leeming <leeming@lyx.org>
70 * GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
71 if visible 2 secs after the call to load them is first made.
73 * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
74 BufferView to ascertain whether the inset is visible or not.
76 * Makefile.am: added GraphicsSupport.[Ch].
78 * PreviewImage.[Ch]: use this smart loader.
80 * PreviewLoader.C: don't load generated image files indiscimminantly.
81 Instead emit the imageReady signal and allow the image owner to decide.
83 2002-07-12 John Levon <moz@compsoc.man.ac.uk>
85 * GraphicsCache.C: remove init_graphics()
87 2002-07-09 Angus Leeming <leeming@lyx.org>
89 * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
90 arithmetic when it should be floating.
92 2002-07-09 Angus Leeming <leeming@lyx.org>
94 * PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".
95 Output equation labels as "(#)" if lyxrc preference is set.
96 (setFontScalingFactor): use lyxrc variable preview_scale_factor
97 rather than hard-coding this.
99 2002-07-09 Angus Leeming <leeming@lyx.org>
101 * PreviewLoader.C: Further refactoring of the code. Should now be
104 * PreviewMetrics.[Ch]: removed. Had a v. short shelf life and is now
105 past its sell-by date. The code to read the metrics file is now found
106 as a helper function in PreviewLoader.C.
108 * GraphicsImageXPM.C (scale): use boost::tie.
110 2002-07-08 Herbert Voss <voss@lyx.org>
112 * PreviewLoader.C: use of preview_size_factor to get the right
113 font-size! 0.9 is the default.
115 2002-07-08 Angus Leeming <leeming@lyx.org>
117 * PreviewLoader.C: Add "delayed" and "showlabels" options to the
118 invocation of preview.sty.
119 Perform something of an internal clean-up.
121 2002-07-06 Angus Leeming <leeming@lyx.org>
123 * PreviewLoader.C: ensure that the metrics data is used by the
127 * PreviewImage.C: (Impl d-tor): remove all generated files that still
128 exist (perhaps because the process was curtailed before the images
131 * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
133 2002-07-05 Angus Leeming <leeming@lyx.org>
142 * Previews.C: new files. The previewed LaTeX snippet stuff.
144 * Makefile.am: add these files.
146 2002-07-05 Angus Leeming <leeming@lyx.org>
148 * GraphicsLoader.h: whitespace.
150 2002-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
152 * GraphicsImage.[Ch]: newImage and loadableFormats changed to
153 boost::function from boost::signal.
155 2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
157 * GraphicsConverter.C (convert): do not use ChangeExtension
158 because to_file_base may contain a dot.
160 2002-06-28 Angus Leeming <leeming@lyx.org>
162 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
163 by moving those SignalPtrs into the grfx::Image and grfx::Converter
164 classes where they really belong.
165 Use the Pimpl idiom to hide the class internals from public view.
167 * GraphicsTypes: remove the typedefs, leaving only the enums.
169 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
170 passed a reference to one in the load() method.
172 * GraphicsConverter.[Ch]: totally refactored. An instance of
173 grfx::Converter now represents a single conversion process.
174 Thus grfx::CachItem now has a grfx::Converter * that is set when the
175 conversion is initiated and destroyed on completion.
177 * GraphicsCache.[Ch]:
178 * GraphicsCacheItem.[Ch]:
179 * GraphicsConverter.[Ch]:
180 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
182 Note that I have done this only after making the above changes,
183 so not only should we have a clean, minimal and well documented
184 interface to these classes in the header files, but the class internals
185 should be much clearer too.
188 grfx::GCache -> grfx::Cache,
189 grfx::GCacheItem -> grfx::CacheItem,
190 grfx::GConverter -> grfx::Converter,
191 grfx::GImage -> grfx::Image,
192 grfx::GImageXPM -> grfx::ImageXPM,
193 grfx::GParams -> grfx::Params.
195 2002-06-26 Angus Leeming <leeming@lyx.org>
197 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
198 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
201 2002-06-26 Angus Leeming <leeming@lyx.org>
203 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
204 move the DisplayType enum out of grfx::GParams to here.
206 * GraphicsCacheItem.h: re-write preliminary description to reflect
209 * GraphicsParams.[Ch]:
210 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
211 grfx::DisplayType out of grfx::GParams.
213 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
214 that was in frontends/screen.C and insets/insetgraphics.C into a
215 single, easy-to-use class.
217 * Makefile.am: add these files.
219 2002-06-25 Angus Leeming <leeming@lyx.org>
221 * GraphicsCache.[Ch]:
222 * GraphicsCacheItem.[Ch]:
223 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
224 file into memory. The cache no longer controls the generation of the
225 pixmap. Instead, it just emits a signal when the loading status of an
227 The cache no longer stores InsetGraphics pointers and nor does it
228 assume responsibility for modifying an image (scaling, rotating etc).
229 Instead, that must now be performed elsewhere.
231 2002-06-19 Angus Leeming <leeming@lyx.org>
233 * GraphicsConverter.C: add using std::endl directive.
235 2002-06-17 Herbert Voss <voss@lyx.org>
237 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
238 default when nothing different was found
239 (convertToDisplayFormat): handle zipped files in the right way and
240 choose always convert as a default converter when no other
241 userdefined was found
243 * GraphicsConverter.C: add more lyxerr comments and choose
244 convert when no other userdefined converter was found
246 2002-06-10 Herbert Voss <voss@lyx.org>
248 * GraphicsImageXPM.C (convertTo7chars): get another special color
249 format from convert work in the right way
251 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
253 * GraphicsCache.C: use right colormap incantation
255 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
257 * GraphicsCache.C: use lyx_gui namespace
259 * GraphicsImageXPM.C: back down to using xforms
262 2002-06-07 Angus Leeming <leeming@lyx.org>
264 Fixes needed to compile with Compaq cxx 6.5.
265 * GraphicsConverter.h: forward declare class ConvProcess.
267 * GraphicsImageXPM.C:
268 all c-library variables have been moved into namespace std.
269 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
271 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
273 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
275 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
277 * GraphicsImageXPM.C: SigC to boot::signals changes.
278 (newImage): fix () bug when using new.
280 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
282 * switch from SigC signals to boost::signals.
284 2002-05-29 André Pönitz <poenitz@gmx.net>
286 * GraphicsParam.C: remove unneeded #include, move vomment
288 2002-05-28 André Pönitz <poenitz@gmx.net>
290 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
292 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
294 * GraphicsImageXPM.C: ColorHandler moved
296 2002-05-24 Juergen Vigna <jug@sad.it>
299 * GraphicsImage.h: include LString.h first.
301 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
303 * GraphicsCacheItem.h: use more specific smart_ptr header.
304 * GraphicsTypes.h: ditto
305 * GraphicsImage.h: ditto
306 * GraphicsConverter.h: ditto
308 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
310 * GraphicsImageXPM.C: understand convert's use of "opaque"
313 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
315 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
316 GImage::loadableFormats() that ensures that the signal is connected
317 to the derived class' method.
319 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
321 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
322 only work on the string.
324 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
326 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
327 the simple image loader when it encounters colour strings like
330 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
332 * GraphicsCacheItem.C (convertToDisplayFormat):
333 * GraphicsConverter.C (build_script): remove the Alerts when things go
334 wrong as the inset displays the message anyway. Moreover, Alert seems
335 pretty temperamemtal at the moment.
337 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
339 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
341 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
343 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
344 a reference to a temp object that's going out of scope...
346 2002-04-09 Herbert Voss <voss@lyx.org>
348 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
349 LyXLength::inBP instead of inPixels.
351 2002-04-10 Herbert Voss <voss@perce.de>
353 * GraphicsCache.[Ch]:
354 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
355 to read the "Bounding Box" from non (e)ps files.
357 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
359 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
360 the EPS file too, to ensure that the clipped Bounding Box is relative
361 to the original. (From Herbert.)
363 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
365 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
366 variables are initialised. Clean-up parsing of the string (with thanks
369 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
371 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
372 if the file can't be found.
374 * GraphicsParams.h (c-tor): remove string() as default argument.
376 * GraphicsCacheItem.C: a couple of changes as a result.
378 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
380 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
381 path to graphics file.
383 * GraphicsParams.[Ch] (c-tor): now passed filepath.
385 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
387 * most files: ws cleanup
389 * Makefile.am: remove ld -r stuff
391 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
393 * Makefile.am: special rules if partial linking
395 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
397 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
399 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
401 * GraphicsConverter.[Ch] (converted): make first arg const ref.
403 * GraphicsCacheItem.h: doxy change
405 * GraphicsCacheItem.C: ws change
407 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
409 * Makefile.am: if there is no image loading class leveraging the power
410 of the appropriate gui library, then compile the basic alternative
411 found in GraphicsImageXPM.[Ch].
413 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
415 * GraphicsCache.C: change associated with move of initialiseGraphics
418 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
420 * GraphicsParams.[Ch]:
422 * GraphicsImageXPM.C: properly resolve more warnings about comparison
423 between signed and unsigned integer expressions.
425 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
427 * GraphicsCache.C: move connections to the GImage-derived classes to
430 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
432 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
433 conversion, then do that.
435 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
437 * GraphicsCache.C: improve commentary to graphicsInit and where it
440 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
441 that became a memory leak properly. (Let the shared_c_ptr free the
443 (reset, mapcolor): tidy up and introduce a work around for XPM files
444 with crappy color entries. Print out a nice friendly message on what's
445 gone wrong and how to resolve it properly.
447 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
449 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
450 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
452 (unique_color_string): use the correct string c-tor.
454 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
457 * ImageLoaderXPM.[Ch]: removed.
459 * GraphicsConverter.[Ch]:
460 * GraphicsImage.[Ch]:
461 * GraphicsImageXPM.[Ch]:
462 * GraphicsParams.[Ch]:
463 * GraphicsTypes.h: new files.
465 * All files. A total re-write of the graphics cache. The cache now
466 supports asynchronous file conversion and file loading. Images
467 can be cropped, rotated and scaled for display on the LyX screen.
468 The old LyXImage and ImageLoader have been combined in a new class
469 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
472 2002-02-07 Herbert Voss <voss@lyx.org>
474 * GraphicsCacheItem.C: use unzipFile() from support/filetools
476 2002-01-31 Herbert Voss <voss@lyx.org>
478 * GraphicsCacheItem.h: handle filetype without the file extension;
479 getting type from contents; handle zipped files
481 2002-01-27 Herbert Voss <voss@lyx.org>
483 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
485 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
487 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
489 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
491 * GraphicsCacheItem.h: do not include <config.h> in header files
493 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
495 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
496 transparent colour, then set it to the colour of the background.
497 Also take account of the monochrome, grayscale of color
500 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
502 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
503 are different. Thus, don't delete the "to" if it's the original!
505 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
507 * ImageLoadXPM.C: remove setting of alloc colour mask,
508 led to crash as we don't define a callback
510 2001-07-29 Baruch Even <baruch@lyx.org>
512 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
513 colors with closeness of 10000.
515 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
517 2001-07-29 Baruch Even <baruch@lyx.org>
519 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
522 2001-07-23 Baruch Even <baruch@lyx.org>
524 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
525 the image after conversion.
527 2001-07-17 Baruch Even <baruch@lyx.org>
529 * GraphicsCacheItem.h:
530 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
531 from synchronous to asynchronous and to ease the coming changes.
533 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
535 * ImageLoaderXPM.C (runImageLoader): get display information from
538 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
541 * GraphicsCacheItem.C:
543 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
545 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
547 * GraphicsCache.h: inherit privately from noncopyable
548 * ImageLoader.h: ditto
549 * GraphicsCacheItem.h: ditto
551 2001-04-16 Allan Rae <rae@lyx.org>
553 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
554 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
557 2001-04-02 Baruch Even <baruch@lyx.org>
559 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
560 of hard coding ImageMagick.
562 2001-03-10 Baruch Even <baruch@lyx.org>
564 * GraphicsCache.C: Style change from (*it).field to it->field
566 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
568 * GraphicsCache.h: noncopyable is in namespace boost
569 * ImageLoader.h: ditto
570 * GraphicsCacheItem.h: ditto
572 2001-03-07 Baruch Even <baruch@lyx.org>
574 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
575 was false and it's not needed anyhow since the shared_ptr's in the cache
576 will destroy everything on exit.
578 2001-02-28 Baruch Even <baruch@ev-en.org>
581 * GraphicsCache.C: Changed the singleton pattern implementation, the
582 former version "leaked" in the sense that it was not deallocated at
585 2001-02-20 Baruch Even <baruch@ev-en.org>
587 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
588 instead of a pure pointer.
590 * GraphicsCacheItem.[Ch]:
591 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
592 removed the reference counting that was inside. Also fixed a bug where
593 a temporary file wouldn't get erased.
595 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
596 Ownership is now dropped when the caller requests the image_ pointer.
598 2001-02-20 Baruch Even <baruch@ev-en.org>
600 * GraphicsCache.C: Cleared up the confusion on when and how it is
603 * GraphicsCacheItem.C: Indentation change.
605 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
606 figure correctly when the image has been loaded successfully.
608 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
610 * ImageLoader.C: add a "using" directive.
612 * ImageLoader.h: remove extra comma at the end of enum; add an
613 std:: qualifier for vector.
615 2001-01-21 Baruch Even <baruch@ev-en.org>
617 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
618 height in the image itself and minor cleanups.
620 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
621 new ImageLoader class instead of the older Renderer class. This
622 means change of responsibilities.