1 2002-07-17 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
3 * Makefile.am: remove FileMonitor.[Ch]
5 2002-06-17 Herbert Voss <voss@lyx.org>
7 * GraphicsCachItem.C (findTargetFormat): remove the speciell case
8 for old ps-files (Garst). It's now handled by defining a converter and
9 disabling the ps-support of xforms.
11 2002-07-17 Angus Leeming <leeming@lyx.org>
13 Be true to the Pimpl idiom, moving all signals into the respective
14 Impl classes and defining methods to connect them to an outside slot.
15 Const-ify all visible class methods as they act only on a const pimpl_.
17 * GraphicsCache.[Ch] (add, remove): const-ify.
19 * GraphicsCacheItem.[Ch] (startLoading): const-ify.
20 (statusChanged): move the signal into the Impl class.
21 (connect): new method, enabling a listener to connect to this signal.
23 * GraphicsConverter.[Ch]: (startConversion): const-ify.
24 (finishedConversion): move the signal into the Impl class.
25 (connect): new method, enabling a listener to connect to this signal.
27 * GraphicsLoader.[Ch] (reset, startLoading): const-ify.
28 (statusChanged): move the signal into the Impl class.
29 (connect): new method, enabling a listener to connect to this signal.
31 * PreviewLoader.[Ch] (add, remove, startLoading): const-ify.
32 (imageReady): move the signal into the Impl class.
33 (connect): new method, enabling a listener to connect to this signal.
34 (emitSignal): new method, enabling PreviewImage to tell the outside
35 world that the file has been loaded into memory.
37 * Previews.[Ch] (loader, removeLoader, generateBufferPreviews):
41 * GraphicsCacheItem.C:
42 * GraphicsConverter.[Ch]:
46 * PreviewLoader.[Ch]: whitespace clean-up.
48 2002-07-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
50 * PreviewLoader.C (setConverter): remove unused variable
52 * GraphicsImageXPM.C (isDrawable): implement
53 (setPixmap): the opaque color is black, not white
55 2002-07-15 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
57 * GraphicsImageXPM.C (color_none_id):
58 (contains_color_none): use ascii_lowercase instead of lowercase
60 2002-07-16 Angus Leeming <leeming@lyx.org>
62 * PreviewLoader.C: greater use of STL algorithms.
64 * Previews.[Ch]: use const in more places.
65 (generateBufferPreviews): now takes a Buffer const & argument, not a
68 2002-07-15 John Levon <moz@compsoc.man.ac.uk>
70 * GraphicsImage.h: remove getPixmap/X, add isDrawable()
72 2002-07-12 Angus Leeming <leeming@lyx.org>
74 * GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
75 if visible 2 secs after the call to load them is first made.
77 * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
78 BufferView to ascertain whether the inset is visible or not.
80 * Makefile.am: added GraphicsSupport.[Ch].
82 * PreviewImage.[Ch]: use this smart loader.
84 * PreviewLoader.C: don't load generated image files indiscimminantly.
85 Instead emit the imageReady signal and allow the image owner to decide.
87 2002-07-12 John Levon <moz@compsoc.man.ac.uk>
89 * GraphicsCache.C: remove init_graphics()
91 2002-07-09 Angus Leeming <leeming@lyx.org>
93 * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
94 arithmetic when it should be floating.
96 2002-07-09 Angus Leeming <leeming@lyx.org>
98 * PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".
99 Output equation labels as "(#)" if lyxrc preference is set.
100 (setFontScalingFactor): use lyxrc variable preview_scale_factor
101 rather than hard-coding this.
103 2002-07-09 Angus Leeming <leeming@lyx.org>
105 * PreviewLoader.C: Further refactoring of the code. Should now be
108 * PreviewMetrics.[Ch]: removed. Had a v. short shelf life and is now
109 past its sell-by date. The code to read the metrics file is now found
110 as a helper function in PreviewLoader.C.
112 * GraphicsImageXPM.C (scale): use boost::tie.
114 2002-07-08 Herbert Voss <voss@lyx.org>
116 * PreviewLoader.C: use of preview_size_factor to get the right
117 font-size! 0.9 is the default.
119 2002-07-08 Angus Leeming <leeming@lyx.org>
121 * PreviewLoader.C: Add "delayed" and "showlabels" options to the
122 invocation of preview.sty.
123 Perform something of an internal clean-up.
125 2002-07-06 Angus Leeming <leeming@lyx.org>
127 * PreviewLoader.C: ensure that the metrics data is used by the
131 * PreviewImage.C: (Impl d-tor): remove all generated files that still
132 exist (perhaps because the process was curtailed before the images
135 * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
137 2002-07-05 Angus Leeming <leeming@lyx.org>
146 * Previews.C: new files. The previewed LaTeX snippet stuff.
148 * Makefile.am: add these files.
150 2002-07-05 Angus Leeming <leeming@lyx.org>
152 * GraphicsLoader.h: whitespace.
154 2002-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
156 * GraphicsImage.[Ch]: newImage and loadableFormats changed to
157 boost::function from boost::signal.
159 2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
161 * GraphicsConverter.C (convert): do not use ChangeExtension
162 because to_file_base may contain a dot.
164 2002-06-28 Angus Leeming <leeming@lyx.org>
166 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
167 by moving those SignalPtrs into the grfx::Image and grfx::Converter
168 classes where they really belong.
169 Use the Pimpl idiom to hide the class internals from public view.
171 * GraphicsTypes: remove the typedefs, leaving only the enums.
173 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
174 passed a reference to one in the load() method.
176 * GraphicsConverter.[Ch]: totally refactored. An instance of
177 grfx::Converter now represents a single conversion process.
178 Thus grfx::CachItem now has a grfx::Converter * that is set when the
179 conversion is initiated and destroyed on completion.
181 * GraphicsCache.[Ch]:
182 * GraphicsCacheItem.[Ch]:
183 * GraphicsConverter.[Ch]:
184 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
186 Note that I have done this only after making the above changes,
187 so not only should we have a clean, minimal and well documented
188 interface to these classes in the header files, but the class internals
189 should be much clearer too.
192 grfx::GCache -> grfx::Cache,
193 grfx::GCacheItem -> grfx::CacheItem,
194 grfx::GConverter -> grfx::Converter,
195 grfx::GImage -> grfx::Image,
196 grfx::GImageXPM -> grfx::ImageXPM,
197 grfx::GParams -> grfx::Params.
199 2002-06-26 Angus Leeming <leeming@lyx.org>
201 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
202 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
205 2002-06-26 Angus Leeming <leeming@lyx.org>
207 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
208 move the DisplayType enum out of grfx::GParams to here.
210 * GraphicsCacheItem.h: re-write preliminary description to reflect
213 * GraphicsParams.[Ch]:
214 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
215 grfx::DisplayType out of grfx::GParams.
217 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
218 that was in frontends/screen.C and insets/insetgraphics.C into a
219 single, easy-to-use class.
221 * Makefile.am: add these files.
223 2002-06-25 Angus Leeming <leeming@lyx.org>
225 * GraphicsCache.[Ch]:
226 * GraphicsCacheItem.[Ch]:
227 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
228 file into memory. The cache no longer controls the generation of the
229 pixmap. Instead, it just emits a signal when the loading status of an
231 The cache no longer stores InsetGraphics pointers and nor does it
232 assume responsibility for modifying an image (scaling, rotating etc).
233 Instead, that must now be performed elsewhere.
235 2002-06-19 Angus Leeming <leeming@lyx.org>
237 * GraphicsConverter.C: add using std::endl directive.
239 2002-06-17 Herbert Voss <voss@lyx.org>
241 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
242 default when nothing different was found
243 (convertToDisplayFormat): handle zipped files in the right way and
244 choose always convert as a default converter when no other
245 userdefined was found
247 * GraphicsConverter.C: add more lyxerr comments and choose
248 convert when no other userdefined converter was found
250 2002-06-10 Herbert Voss <voss@lyx.org>
252 * GraphicsImageXPM.C (convertTo7chars): get another special color
253 format from convert work in the right way
255 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
257 * GraphicsCache.C: use right colormap incantation
259 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
261 * GraphicsCache.C: use lyx_gui namespace
263 * GraphicsImageXPM.C: back down to using xforms
266 2002-06-07 Angus Leeming <leeming@lyx.org>
268 Fixes needed to compile with Compaq cxx 6.5.
269 * GraphicsConverter.h: forward declare class ConvProcess.
271 * GraphicsImageXPM.C:
272 all c-library variables have been moved into namespace std.
273 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
275 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
277 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
279 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
281 * GraphicsImageXPM.C: SigC to boot::signals changes.
282 (newImage): fix () bug when using new.
284 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
286 * switch from SigC signals to boost::signals.
288 2002-05-29 André Pönitz <poenitz@gmx.net>
290 * GraphicsParam.C: remove unneeded #include, move vomment
292 2002-05-28 André Pönitz <poenitz@gmx.net>
294 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
296 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
298 * GraphicsImageXPM.C: ColorHandler moved
300 2002-05-24 Juergen Vigna <jug@sad.it>
303 * GraphicsImage.h: include LString.h first.
305 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
307 * GraphicsCacheItem.h: use more specific smart_ptr header.
308 * GraphicsTypes.h: ditto
309 * GraphicsImage.h: ditto
310 * GraphicsConverter.h: ditto
312 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
314 * GraphicsImageXPM.C: understand convert's use of "opaque"
317 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
319 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
320 GImage::loadableFormats() that ensures that the signal is connected
321 to the derived class' method.
323 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
325 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
326 only work on the string.
328 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
330 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
331 the simple image loader when it encounters colour strings like
334 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
336 * GraphicsCacheItem.C (convertToDisplayFormat):
337 * GraphicsConverter.C (build_script): remove the Alerts when things go
338 wrong as the inset displays the message anyway. Moreover, Alert seems
339 pretty temperamemtal at the moment.
341 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
343 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
345 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
347 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
348 a reference to a temp object that's going out of scope...
350 2002-04-09 Herbert Voss <voss@lyx.org>
352 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
353 LyXLength::inBP instead of inPixels.
355 2002-04-10 Herbert Voss <voss@perce.de>
357 * GraphicsCache.[Ch]:
358 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
359 to read the "Bounding Box" from non (e)ps files.
361 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
363 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
364 the EPS file too, to ensure that the clipped Bounding Box is relative
365 to the original. (From Herbert.)
367 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
369 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
370 variables are initialised. Clean-up parsing of the string (with thanks
373 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
375 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
376 if the file can't be found.
378 * GraphicsParams.h (c-tor): remove string() as default argument.
380 * GraphicsCacheItem.C: a couple of changes as a result.
382 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
384 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
385 path to graphics file.
387 * GraphicsParams.[Ch] (c-tor): now passed filepath.
389 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
391 * most files: ws cleanup
393 * Makefile.am: remove ld -r stuff
395 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
397 * Makefile.am: special rules if partial linking
399 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
401 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
403 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
405 * GraphicsConverter.[Ch] (converted): make first arg const ref.
407 * GraphicsCacheItem.h: doxy change
409 * GraphicsCacheItem.C: ws change
411 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
413 * Makefile.am: if there is no image loading class leveraging the power
414 of the appropriate gui library, then compile the basic alternative
415 found in GraphicsImageXPM.[Ch].
417 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
419 * GraphicsCache.C: change associated with move of initialiseGraphics
422 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
424 * GraphicsParams.[Ch]:
426 * GraphicsImageXPM.C: properly resolve more warnings about comparison
427 between signed and unsigned integer expressions.
429 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
431 * GraphicsCache.C: move connections to the GImage-derived classes to
434 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
436 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
437 conversion, then do that.
439 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
441 * GraphicsCache.C: improve commentary to graphicsInit and where it
444 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
445 that became a memory leak properly. (Let the shared_c_ptr free the
447 (reset, mapcolor): tidy up and introduce a work around for XPM files
448 with crappy color entries. Print out a nice friendly message on what's
449 gone wrong and how to resolve it properly.
451 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
453 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
454 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
456 (unique_color_string): use the correct string c-tor.
458 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
461 * ImageLoaderXPM.[Ch]: removed.
463 * GraphicsConverter.[Ch]:
464 * GraphicsImage.[Ch]:
465 * GraphicsImageXPM.[Ch]:
466 * GraphicsParams.[Ch]:
467 * GraphicsTypes.h: new files.
469 * All files. A total re-write of the graphics cache. The cache now
470 supports asynchronous file conversion and file loading. Images
471 can be cropped, rotated and scaled for display on the LyX screen.
472 The old LyXImage and ImageLoader have been combined in a new class
473 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
476 2002-02-07 Herbert Voss <voss@lyx.org>
478 * GraphicsCacheItem.C: use unzipFile() from support/filetools
480 2002-01-31 Herbert Voss <voss@lyx.org>
482 * GraphicsCacheItem.h: handle filetype without the file extension;
483 getting type from contents; handle zipped files
485 2002-01-27 Herbert Voss <voss@lyx.org>
487 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
489 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
491 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
493 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
495 * GraphicsCacheItem.h: do not include <config.h> in header files
497 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
499 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
500 transparent colour, then set it to the colour of the background.
501 Also take account of the monochrome, grayscale of color
504 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
506 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
507 are different. Thus, don't delete the "to" if it's the original!
509 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
511 * ImageLoadXPM.C: remove setting of alloc colour mask,
512 led to crash as we don't define a callback
514 2001-07-29 Baruch Even <baruch@lyx.org>
516 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
517 colors with closeness of 10000.
519 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
521 2001-07-29 Baruch Even <baruch@lyx.org>
523 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
526 2001-07-23 Baruch Even <baruch@lyx.org>
528 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
529 the image after conversion.
531 2001-07-17 Baruch Even <baruch@lyx.org>
533 * GraphicsCacheItem.h:
534 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
535 from synchronous to asynchronous and to ease the coming changes.
537 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
539 * ImageLoaderXPM.C (runImageLoader): get display information from
542 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
545 * GraphicsCacheItem.C:
547 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
549 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
551 * GraphicsCache.h: inherit privately from noncopyable
552 * ImageLoader.h: ditto
553 * GraphicsCacheItem.h: ditto
555 2001-04-16 Allan Rae <rae@lyx.org>
557 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
558 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
561 2001-04-02 Baruch Even <baruch@lyx.org>
563 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
564 of hard coding ImageMagick.
566 2001-03-10 Baruch Even <baruch@lyx.org>
568 * GraphicsCache.C: Style change from (*it).field to it->field
570 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
572 * GraphicsCache.h: noncopyable is in namespace boost
573 * ImageLoader.h: ditto
574 * GraphicsCacheItem.h: ditto
576 2001-03-07 Baruch Even <baruch@lyx.org>
578 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
579 was false and it's not needed anyhow since the shared_ptr's in the cache
580 will destroy everything on exit.
582 2001-02-28 Baruch Even <baruch@ev-en.org>
585 * GraphicsCache.C: Changed the singleton pattern implementation, the
586 former version "leaked" in the sense that it was not deallocated at
589 2001-02-20 Baruch Even <baruch@ev-en.org>
591 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
592 instead of a pure pointer.
594 * GraphicsCacheItem.[Ch]:
595 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
596 removed the reference counting that was inside. Also fixed a bug where
597 a temporary file wouldn't get erased.
599 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
600 Ownership is now dropped when the caller requests the image_ pointer.
602 2001-02-20 Baruch Even <baruch@ev-en.org>
604 * GraphicsCache.C: Cleared up the confusion on when and how it is
607 * GraphicsCacheItem.C: Indentation change.
609 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
610 figure correctly when the image has been loaded successfully.
612 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
614 * ImageLoader.C: add a "using" directive.
616 * ImageLoader.h: remove extra comma at the end of enum; add an
617 std:: qualifier for vector.
619 2001-01-21 Baruch Even <baruch@ev-en.org>
621 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
622 height in the image itself and minor cleanups.
624 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
625 new ImageLoader class instead of the older Renderer class. This
626 means change of responsibilities.