1 2002-07-12 Angus Leeming <leeming@lyx.org>
3 * GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
4 if visible 2 secs after the call to load them is first made.
6 * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
7 BufferView to ascertain whether the inset is visible or not.
9 * Makefile.am: added GraphicsSupport.[Ch].
11 * PreviewImage.[Ch]: use this smart loader.
13 * PreviewLoader.C: don't load generated image files indiscimminantly.
14 Instead emit the imageReady signal and allow the image owner to decide.
16 2002-07-12 John Levon <moz@compsoc.man.ac.uk>
18 * GraphicsCache.C: remove init_graphics()
20 2002-07-09 Angus Leeming <leeming@lyx.org>
22 * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
23 arithmetic when it should be floating.
25 2002-07-09 Angus Leeming <leeming@lyx.org>
27 * PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".
28 Output equation labels as "(#)" if lyxrc preference is set.
29 (setFontScalingFactor): use lyxrc variable preview_scale_factor
30 rather than hard-coding this.
32 2002-07-09 Angus Leeming <leeming@lyx.org>
34 * PreviewLoader.C: Further refactoring of the code. Should now be
37 * PreviewMetrics.[Ch]: removed. Had a v. short shelf life and is now
38 past its sell-by date. The code to read the metrics file is now found
39 as a helper function in PreviewLoader.C.
41 * GraphicsImageXPM.C (scale): use boost::tie.
43 2002-07-08 Herbert Voss <voss@lyx.org>
45 * PreviewLoader.C: use of preview_size_factor to get the right
46 font-size! 0.9 is the default.
48 2002-07-08 Angus Leeming <leeming@lyx.org>
50 * PreviewLoader.C: Add "delayed" and "showlabels" options to the
51 invocation of preview.sty.
52 Perform something of an internal clean-up.
54 2002-07-06 Angus Leeming <leeming@lyx.org>
56 * PreviewLoader.C: ensure that the metrics data is used by the
60 * PreviewImage.C: (Impl d-tor): remove all generated files that still
61 exist (perhaps because the process was curtailed before the images
64 * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
66 2002-07-05 Angus Leeming <leeming@lyx.org>
75 * Previews.C: new files. The previewed LaTeX snippet stuff.
77 * Makefile.am: add these files.
79 2002-07-05 Angus Leeming <leeming@lyx.org>
81 * GraphicsLoader.h: whitespace.
83 2002-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
85 * GraphicsImage.[Ch]: newImage and loadableFormats changed to
86 boost::function from boost::signal.
88 2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
90 * GraphicsConverter.C (convert): do not use ChangeExtension
91 because to_file_base may contain a dot.
93 2002-06-28 Angus Leeming <leeming@lyx.org>
95 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
96 by moving those SignalPtrs into the grfx::Image and grfx::Converter
97 classes where they really belong.
98 Use the Pimpl idiom to hide the class internals from public view.
100 * GraphicsTypes: remove the typedefs, leaving only the enums.
102 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
103 passed a reference to one in the load() method.
105 * GraphicsConverter.[Ch]: totally refactored. An instance of
106 grfx::Converter now represents a single conversion process.
107 Thus grfx::CachItem now has a grfx::Converter * that is set when the
108 conversion is initiated and destroyed on completion.
110 * GraphicsCache.[Ch]:
111 * GraphicsCacheItem.[Ch]:
112 * GraphicsConverter.[Ch]:
113 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
115 Note that I have done this only after making the above changes,
116 so not only should we have a clean, minimal and well documented
117 interface to these classes in the header files, but the class internals
118 should be much clearer too.
121 grfx::GCache -> grfx::Cache,
122 grfx::GCacheItem -> grfx::CacheItem,
123 grfx::GConverter -> grfx::Converter,
124 grfx::GImage -> grfx::Image,
125 grfx::GImageXPM -> grfx::ImageXPM,
126 grfx::GParams -> grfx::Params.
128 2002-06-26 Angus Leeming <leeming@lyx.org>
130 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
131 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
134 2002-06-26 Angus Leeming <leeming@lyx.org>
136 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
137 move the DisplayType enum out of grfx::GParams to here.
139 * GraphicsCacheItem.h: re-write preliminary description to reflect
142 * GraphicsParams.[Ch]:
143 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
144 grfx::DisplayType out of grfx::GParams.
146 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
147 that was in frontends/screen.C and insets/insetgraphics.C into a
148 single, easy-to-use class.
150 * Makefile.am: add these files.
152 2002-06-25 Angus Leeming <leeming@lyx.org>
154 * GraphicsCache.[Ch]:
155 * GraphicsCacheItem.[Ch]:
156 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
157 file into memory. The cache no longer controls the generation of the
158 pixmap. Instead, it just emits a signal when the loading status of an
160 The cache no longer stores InsetGraphics pointers and nor does it
161 assume responsibility for modifying an image (scaling, rotating etc).
162 Instead, that must now be performed elsewhere.
164 2002-06-19 Angus Leeming <leeming@lyx.org>
166 * GraphicsConverter.C: add using std::endl directive.
168 2002-06-17 Herbert Voss <voss@lyx.org>
170 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
171 default when nothing different was found
172 (convertToDisplayFormat): handle zipped files in the right way and
173 choose always convert as a default converter when no other
174 userdefined was found
176 * GraphicsConverter.C: add more lyxerr comments and choose
177 convert when no other userdefined converter was found
179 2002-06-10 Herbert Voss <voss@lyx.org>
181 * GraphicsImageXPM.C (convertTo7chars): get another special color
182 format from convert work in the right way
184 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
186 * GraphicsCache.C: use right colormap incantation
188 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
190 * GraphicsCache.C: use lyx_gui namespace
192 * GraphicsImageXPM.C: back down to using xforms
195 2002-06-07 Angus Leeming <leeming@lyx.org>
197 Fixes needed to compile with Compaq cxx 6.5.
198 * GraphicsConverter.h: forward declare class ConvProcess.
200 * GraphicsImageXPM.C:
201 all c-library variables have been moved into namespace std.
202 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
204 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
206 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
208 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
210 * GraphicsImageXPM.C: SigC to boot::signals changes.
211 (newImage): fix () bug when using new.
213 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
215 * switch from SigC signals to boost::signals.
217 2002-05-29 André Pönitz <poenitz@gmx.net>
219 * GraphicsParam.C: remove unneeded #include, move vomment
221 2002-05-28 André Pönitz <poenitz@gmx.net>
223 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
225 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
227 * GraphicsImageXPM.C: ColorHandler moved
229 2002-05-24 Juergen Vigna <jug@sad.it>
232 * GraphicsImage.h: include LString.h first.
234 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
236 * GraphicsCacheItem.h: use more specific smart_ptr header.
237 * GraphicsTypes.h: ditto
238 * GraphicsImage.h: ditto
239 * GraphicsConverter.h: ditto
241 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
243 * GraphicsImageXPM.C: understand convert's use of "opaque"
246 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
248 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
249 GImage::loadableFormats() that ensures that the signal is connected
250 to the derived class' method.
252 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
254 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
255 only work on the string.
257 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
259 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
260 the simple image loader when it encounters colour strings like
263 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
265 * GraphicsCacheItem.C (convertToDisplayFormat):
266 * GraphicsConverter.C (build_script): remove the Alerts when things go
267 wrong as the inset displays the message anyway. Moreover, Alert seems
268 pretty temperamemtal at the moment.
270 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
271 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
273 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
275 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
276 a reference to a temp object that's going out of scope...
278 2002-04-09 Herbert Voss <voss@lyx.org>
280 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
281 LyXLength::inBP instead of inPixels.
283 2002-04-10 Herbert Voss <voss@perce.de>
285 * GraphicsCache.[Ch]:
286 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
287 to read the "Bounding Box" from non (e)ps files.
289 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
291 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
292 the EPS file too, to ensure that the clipped Bounding Box is relative
293 to the original. (From Herbert.)
295 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
297 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
298 variables are initialised. Clean-up parsing of the string (with thanks
301 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
303 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
304 if the file can't be found.
306 * GraphicsParams.h (c-tor): remove string() as default argument.
308 * GraphicsCacheItem.C: a couple of changes as a result.
310 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
312 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
313 path to graphics file.
315 * GraphicsParams.[Ch] (c-tor): now passed filepath.
317 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
319 * most files: ws cleanup
321 * Makefile.am: remove ld -r stuff
323 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
325 * Makefile.am: special rules if partial linking
327 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
329 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
331 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
333 * GraphicsConverter.[Ch] (converted): make first arg const ref.
335 * GraphicsCacheItem.h: doxy change
337 * GraphicsCacheItem.C: ws change
339 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
341 * Makefile.am: if there is no image loading class leveraging the power
342 of the appropriate gui library, then compile the basic alternative
343 found in GraphicsImageXPM.[Ch].
345 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
347 * GraphicsCache.C: change associated with move of initialiseGraphics
350 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
352 * GraphicsParams.[Ch]:
354 * GraphicsImageXPM.C: properly resolve more warnings about comparison
355 between signed and unsigned integer expressions.
357 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
359 * GraphicsCache.C: move connections to the GImage-derived classes to
362 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
364 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
365 conversion, then do that.
367 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
369 * GraphicsCache.C: improve commentary to graphicsInit and where it
372 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
373 that became a memory leak properly. (Let the shared_c_ptr free the
375 (reset, mapcolor): tidy up and introduce a work around for XPM files
376 with crappy color entries. Print out a nice friendly message on what's
377 gone wrong and how to resolve it properly.
379 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
381 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
382 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
384 (unique_color_string): use the correct string c-tor.
386 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
389 * ImageLoaderXPM.[Ch]: removed.
391 * GraphicsConverter.[Ch]:
392 * GraphicsImage.[Ch]:
393 * GraphicsImageXPM.[Ch]:
394 * GraphicsParams.[Ch]:
395 * GraphicsTypes.h: new files.
397 * All files. A total re-write of the graphics cache. The cache now
398 supports asynchronous file conversion and file loading. Images
399 can be cropped, rotated and scaled for display on the LyX screen.
400 The old LyXImage and ImageLoader have been combined in a new class
401 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
404 2002-02-07 Herbert Voss <voss@lyx.org>
406 * GraphicsCacheItem.C: use unzipFile() from support/filetools
408 2002-01-31 Herbert Voss <voss@lyx.org>
410 * GraphicsCacheItem.h: handle filetype without the file extension;
411 getting type from contents; handle zipped files
413 2002-01-27 Herbert Voss <voss@lyx.org>
415 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
417 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
419 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
421 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
423 * GraphicsCacheItem.h: do not include <config.h> in header files
425 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
427 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
428 transparent colour, then set it to the colour of the background.
429 Also take account of the monochrome, grayscale of color
432 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
434 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
435 are different. Thus, don't delete the "to" if it's the original!
437 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
439 * ImageLoadXPM.C: remove setting of alloc colour mask,
440 led to crash as we don't define a callback
442 2001-07-29 Baruch Even <baruch@lyx.org>
444 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
445 colors with closeness of 10000.
447 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
449 2001-07-29 Baruch Even <baruch@lyx.org>
451 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
454 2001-07-23 Baruch Even <baruch@lyx.org>
456 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
457 the image after conversion.
459 2001-07-17 Baruch Even <baruch@lyx.org>
461 * GraphicsCacheItem.h:
462 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
463 from synchronous to asynchronous and to ease the coming changes.
465 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
467 * ImageLoaderXPM.C (runImageLoader): get display information from
470 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
473 * GraphicsCacheItem.C:
475 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
477 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
479 * GraphicsCache.h: inherit privately from noncopyable
480 * ImageLoader.h: ditto
481 * GraphicsCacheItem.h: ditto
483 2001-04-16 Allan Rae <rae@lyx.org>
485 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
486 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
489 2001-04-02 Baruch Even <baruch@lyx.org>
491 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
492 of hard coding ImageMagick.
494 2001-03-10 Baruch Even <baruch@lyx.org>
496 * GraphicsCache.C: Style change from (*it).field to it->field
498 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
500 * GraphicsCache.h: noncopyable is in namespace boost
501 * ImageLoader.h: ditto
502 * GraphicsCacheItem.h: ditto
504 2001-03-07 Baruch Even <baruch@lyx.org>
506 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
507 was false and it's not needed anyhow since the shared_ptr's in the cache
508 will destroy everything on exit.
510 2001-02-28 Baruch Even <baruch@ev-en.org>
513 * GraphicsCache.C: Changed the singleton pattern implementation, the
514 former version "leaked" in the sense that it was not deallocated at
517 2001-02-20 Baruch Even <baruch@ev-en.org>
519 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
520 instead of a pure pointer.
522 * GraphicsCacheItem.[Ch]:
523 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
524 removed the reference counting that was inside. Also fixed a bug where
525 a temporary file wouldn't get erased.
527 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
528 Ownership is now dropped when the caller requests the image_ pointer.
530 2001-02-20 Baruch Even <baruch@ev-en.org>
532 * GraphicsCache.C: Cleared up the confusion on when and how it is
535 * GraphicsCacheItem.C: Indentation change.
537 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
538 figure correctly when the image has been loaded successfully.
540 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
542 * ImageLoader.C: add a "using" directive.
544 * ImageLoader.h: remove extra comma at the end of enum; add an
545 std:: qualifier for vector.
547 2001-01-21 Baruch Even <baruch@ev-en.org>
549 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
550 height in the image itself and minor cleanups.
552 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
553 new ImageLoader class instead of the older Renderer class. This
554 means change of responsibilities.