1 2002-07-17 Angus Leeming <leeming@lyx.org>
3 Be true to the Pimpl idiom, moving all signals into the respective
4 Impl classes and defining methods to connect them to an outside slot.
5 Const-ify all visible class methods as they act only on a const pimpl_.
7 * GraphicsCache.[Ch] (add, remove): const-ify.
9 * GraphicsCacheItem.[Ch] (startLoading): const-ify.
10 (statusChanged): move the signal into the Impl class.
11 (connect): new method, enabling a listener to connect to this signal.
13 * GraphicsConverter.[Ch]: (startConversion): const-ify.
14 (finishedConversion): move the signal into the Impl class.
15 (connect): new method, enabling a listener to connect to this signal.
17 * GraphicsLoader.[Ch] (reset, startLoading): const-ify.
18 (statusChanged): move the signal into the Impl class.
19 (connect): new method, enabling a listener to connect to this signal.
21 * PreviewLoader.[Ch] (add, remove, startLoading): const-ify.
22 (imageReady): move the signal into the Impl class.
23 (connect): new method, enabling a listener to connect to this signal.
24 (emitSignal): new method, enabling PreviewImage to tell the outside
25 world that the file has been loaded into memory.
27 * Previews.[Ch] (loader, removeLoader, generateBufferPreviews):
31 * GraphicsCacheItem.C:
32 * GraphicsConverter.[Ch]:
36 * PreviewLoader.[Ch]: whitespace clean-up.
38 2002-07-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
40 * PreviewLoader.C (setConverter): remove unused variable
42 * GraphicsImageXPM.C (isDrawable): implement
43 (setPixmap): the opaque color is black, not white
45 2002-07-15 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
47 * GraphicsImageXPM.C (color_none_id):
48 (contains_color_none): use ascii_lowercase instead of lowercase
50 2002-07-16 Angus Leeming <leeming@lyx.org>
52 * PreviewLoader.C: greater use of STL algorithms.
54 * Previews.[Ch]: use const in more places.
55 (generateBufferPreviews): now takes a Buffer const & argument, not a
58 2002-07-15 John Levon <moz@compsoc.man.ac.uk>
60 * GraphicsImage.h: remove getPixmap/X, add isDrawable()
62 2002-07-12 Angus Leeming <leeming@lyx.org>
64 * GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
65 if visible 2 secs after the call to load them is first made.
67 * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
68 BufferView to ascertain whether the inset is visible or not.
70 * Makefile.am: added GraphicsSupport.[Ch].
72 * PreviewImage.[Ch]: use this smart loader.
74 * PreviewLoader.C: don't load generated image files indiscimminantly.
75 Instead emit the imageReady signal and allow the image owner to decide.
77 2002-07-12 John Levon <moz@compsoc.man.ac.uk>
79 * GraphicsCache.C: remove init_graphics()
81 2002-07-09 Angus Leeming <leeming@lyx.org>
83 * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
84 arithmetic when it should be floating.
86 2002-07-09 Angus Leeming <leeming@lyx.org>
88 * PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".
89 Output equation labels as "(#)" if lyxrc preference is set.
90 (setFontScalingFactor): use lyxrc variable preview_scale_factor
91 rather than hard-coding this.
93 2002-07-09 Angus Leeming <leeming@lyx.org>
95 * PreviewLoader.C: Further refactoring of the code. Should now be
98 * PreviewMetrics.[Ch]: removed. Had a v. short shelf life and is now
99 past its sell-by date. The code to read the metrics file is now found
100 as a helper function in PreviewLoader.C.
102 * GraphicsImageXPM.C (scale): use boost::tie.
104 2002-07-08 Herbert Voss <voss@lyx.org>
106 * PreviewLoader.C: use of preview_size_factor to get the right
107 font-size! 0.9 is the default.
109 2002-07-08 Angus Leeming <leeming@lyx.org>
111 * PreviewLoader.C: Add "delayed" and "showlabels" options to the
112 invocation of preview.sty.
113 Perform something of an internal clean-up.
115 2002-07-06 Angus Leeming <leeming@lyx.org>
117 * PreviewLoader.C: ensure that the metrics data is used by the
121 * PreviewImage.C: (Impl d-tor): remove all generated files that still
122 exist (perhaps because the process was curtailed before the images
125 * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
127 2002-07-05 Angus Leeming <leeming@lyx.org>
136 * Previews.C: new files. The previewed LaTeX snippet stuff.
138 * Makefile.am: add these files.
140 2002-07-05 Angus Leeming <leeming@lyx.org>
142 * GraphicsLoader.h: whitespace.
144 2002-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
146 * GraphicsImage.[Ch]: newImage and loadableFormats changed to
147 boost::function from boost::signal.
149 2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
151 * GraphicsConverter.C (convert): do not use ChangeExtension
152 because to_file_base may contain a dot.
154 2002-06-28 Angus Leeming <leeming@lyx.org>
156 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
157 by moving those SignalPtrs into the grfx::Image and grfx::Converter
158 classes where they really belong.
159 Use the Pimpl idiom to hide the class internals from public view.
161 * GraphicsTypes: remove the typedefs, leaving only the enums.
163 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
164 passed a reference to one in the load() method.
166 * GraphicsConverter.[Ch]: totally refactored. An instance of
167 grfx::Converter now represents a single conversion process.
168 Thus grfx::CachItem now has a grfx::Converter * that is set when the
169 conversion is initiated and destroyed on completion.
171 * GraphicsCache.[Ch]:
172 * GraphicsCacheItem.[Ch]:
173 * GraphicsConverter.[Ch]:
174 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
176 Note that I have done this only after making the above changes,
177 so not only should we have a clean, minimal and well documented
178 interface to these classes in the header files, but the class internals
179 should be much clearer too.
182 grfx::GCache -> grfx::Cache,
183 grfx::GCacheItem -> grfx::CacheItem,
184 grfx::GConverter -> grfx::Converter,
185 grfx::GImage -> grfx::Image,
186 grfx::GImageXPM -> grfx::ImageXPM,
187 grfx::GParams -> grfx::Params.
189 2002-06-26 Angus Leeming <leeming@lyx.org>
191 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
192 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
195 2002-06-26 Angus Leeming <leeming@lyx.org>
197 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
198 move the DisplayType enum out of grfx::GParams to here.
200 * GraphicsCacheItem.h: re-write preliminary description to reflect
203 * GraphicsParams.[Ch]:
204 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
205 grfx::DisplayType out of grfx::GParams.
207 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
208 that was in frontends/screen.C and insets/insetgraphics.C into a
209 single, easy-to-use class.
211 * Makefile.am: add these files.
213 2002-06-25 Angus Leeming <leeming@lyx.org>
215 * GraphicsCache.[Ch]:
216 * GraphicsCacheItem.[Ch]:
217 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
218 file into memory. The cache no longer controls the generation of the
219 pixmap. Instead, it just emits a signal when the loading status of an
221 The cache no longer stores InsetGraphics pointers and nor does it
222 assume responsibility for modifying an image (scaling, rotating etc).
223 Instead, that must now be performed elsewhere.
225 2002-06-19 Angus Leeming <leeming@lyx.org>
227 * GraphicsConverter.C: add using std::endl directive.
229 2002-06-17 Herbert Voss <voss@lyx.org>
231 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
232 default when nothing different was found
233 (convertToDisplayFormat): handle zipped files in the right way and
234 choose always convert as a default converter when no other
235 userdefined was found
237 * GraphicsConverter.C: add more lyxerr comments and choose
238 convert when no other userdefined converter was found
240 2002-06-10 Herbert Voss <voss@lyx.org>
242 * GraphicsImageXPM.C (convertTo7chars): get another special color
243 format from convert work in the right way
245 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
247 * GraphicsCache.C: use right colormap incantation
249 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
251 * GraphicsCache.C: use lyx_gui namespace
253 * GraphicsImageXPM.C: back down to using xforms
256 2002-06-07 Angus Leeming <leeming@lyx.org>
258 Fixes needed to compile with Compaq cxx 6.5.
259 * GraphicsConverter.h: forward declare class ConvProcess.
261 * GraphicsImageXPM.C:
262 all c-library variables have been moved into namespace std.
263 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
265 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
267 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
269 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
271 * GraphicsImageXPM.C: SigC to boot::signals changes.
272 (newImage): fix () bug when using new.
274 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
276 * switch from SigC signals to boost::signals.
278 2002-05-29 André Pönitz <poenitz@gmx.net>
280 * GraphicsParam.C: remove unneeded #include, move vomment
282 2002-05-28 André Pönitz <poenitz@gmx.net>
284 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
286 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
288 * GraphicsImageXPM.C: ColorHandler moved
290 2002-05-24 Juergen Vigna <jug@sad.it>
293 * GraphicsImage.h: include LString.h first.
295 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
297 * GraphicsCacheItem.h: use more specific smart_ptr header.
298 * GraphicsTypes.h: ditto
299 * GraphicsImage.h: ditto
300 * GraphicsConverter.h: ditto
302 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
304 * GraphicsImageXPM.C: understand convert's use of "opaque"
307 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
309 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
310 GImage::loadableFormats() that ensures that the signal is connected
311 to the derived class' method.
313 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
315 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
316 only work on the string.
318 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
320 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
321 the simple image loader when it encounters colour strings like
324 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
326 * GraphicsCacheItem.C (convertToDisplayFormat):
327 * GraphicsConverter.C (build_script): remove the Alerts when things go
328 wrong as the inset displays the message anyway. Moreover, Alert seems
329 pretty temperamemtal at the moment.
331 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
333 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
335 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
337 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
338 a reference to a temp object that's going out of scope...
340 2002-04-09 Herbert Voss <voss@lyx.org>
342 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
343 LyXLength::inBP instead of inPixels.
345 2002-04-10 Herbert Voss <voss@perce.de>
347 * GraphicsCache.[Ch]:
348 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
349 to read the "Bounding Box" from non (e)ps files.
351 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
353 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
354 the EPS file too, to ensure that the clipped Bounding Box is relative
355 to the original. (From Herbert.)
357 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
359 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
360 variables are initialised. Clean-up parsing of the string (with thanks
363 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
365 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
366 if the file can't be found.
368 * GraphicsParams.h (c-tor): remove string() as default argument.
370 * GraphicsCacheItem.C: a couple of changes as a result.
372 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
374 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
375 path to graphics file.
377 * GraphicsParams.[Ch] (c-tor): now passed filepath.
379 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
381 * most files: ws cleanup
383 * Makefile.am: remove ld -r stuff
385 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
387 * Makefile.am: special rules if partial linking
389 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
391 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
393 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
395 * GraphicsConverter.[Ch] (converted): make first arg const ref.
397 * GraphicsCacheItem.h: doxy change
399 * GraphicsCacheItem.C: ws change
401 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
403 * Makefile.am: if there is no image loading class leveraging the power
404 of the appropriate gui library, then compile the basic alternative
405 found in GraphicsImageXPM.[Ch].
407 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
409 * GraphicsCache.C: change associated with move of initialiseGraphics
412 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
414 * GraphicsParams.[Ch]:
416 * GraphicsImageXPM.C: properly resolve more warnings about comparison
417 between signed and unsigned integer expressions.
419 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
421 * GraphicsCache.C: move connections to the GImage-derived classes to
424 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
426 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
427 conversion, then do that.
429 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
431 * GraphicsCache.C: improve commentary to graphicsInit and where it
434 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
435 that became a memory leak properly. (Let the shared_c_ptr free the
437 (reset, mapcolor): tidy up and introduce a work around for XPM files
438 with crappy color entries. Print out a nice friendly message on what's
439 gone wrong and how to resolve it properly.
441 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
443 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
444 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
446 (unique_color_string): use the correct string c-tor.
448 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
451 * ImageLoaderXPM.[Ch]: removed.
453 * GraphicsConverter.[Ch]:
454 * GraphicsImage.[Ch]:
455 * GraphicsImageXPM.[Ch]:
456 * GraphicsParams.[Ch]:
457 * GraphicsTypes.h: new files.
459 * All files. A total re-write of the graphics cache. The cache now
460 supports asynchronous file conversion and file loading. Images
461 can be cropped, rotated and scaled for display on the LyX screen.
462 The old LyXImage and ImageLoader have been combined in a new class
463 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
466 2002-02-07 Herbert Voss <voss@lyx.org>
468 * GraphicsCacheItem.C: use unzipFile() from support/filetools
470 2002-01-31 Herbert Voss <voss@lyx.org>
472 * GraphicsCacheItem.h: handle filetype without the file extension;
473 getting type from contents; handle zipped files
475 2002-01-27 Herbert Voss <voss@lyx.org>
477 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
479 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
481 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
483 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
485 * GraphicsCacheItem.h: do not include <config.h> in header files
487 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
489 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
490 transparent colour, then set it to the colour of the background.
491 Also take account of the monochrome, grayscale of color
494 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
496 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
497 are different. Thus, don't delete the "to" if it's the original!
499 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
501 * ImageLoadXPM.C: remove setting of alloc colour mask,
502 led to crash as we don't define a callback
504 2001-07-29 Baruch Even <baruch@lyx.org>
506 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
507 colors with closeness of 10000.
509 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
511 2001-07-29 Baruch Even <baruch@lyx.org>
513 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
516 2001-07-23 Baruch Even <baruch@lyx.org>
518 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
519 the image after conversion.
521 2001-07-17 Baruch Even <baruch@lyx.org>
523 * GraphicsCacheItem.h:
524 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
525 from synchronous to asynchronous and to ease the coming changes.
527 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
529 * ImageLoaderXPM.C (runImageLoader): get display information from
532 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
535 * GraphicsCacheItem.C:
537 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
539 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
541 * GraphicsCache.h: inherit privately from noncopyable
542 * ImageLoader.h: ditto
543 * GraphicsCacheItem.h: ditto
545 2001-04-16 Allan Rae <rae@lyx.org>
547 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
548 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
551 2001-04-02 Baruch Even <baruch@lyx.org>
553 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
554 of hard coding ImageMagick.
556 2001-03-10 Baruch Even <baruch@lyx.org>
558 * GraphicsCache.C: Style change from (*it).field to it->field
560 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
562 * GraphicsCache.h: noncopyable is in namespace boost
563 * ImageLoader.h: ditto
564 * GraphicsCacheItem.h: ditto
566 2001-03-07 Baruch Even <baruch@lyx.org>
568 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
569 was false and it's not needed anyhow since the shared_ptr's in the cache
570 will destroy everything on exit.
572 2001-02-28 Baruch Even <baruch@ev-en.org>
575 * GraphicsCache.C: Changed the singleton pattern implementation, the
576 former version "leaked" in the sense that it was not deallocated at
579 2001-02-20 Baruch Even <baruch@ev-en.org>
581 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
582 instead of a pure pointer.
584 * GraphicsCacheItem.[Ch]:
585 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
586 removed the reference counting that was inside. Also fixed a bug where
587 a temporary file wouldn't get erased.
589 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
590 Ownership is now dropped when the caller requests the image_ pointer.
592 2001-02-20 Baruch Even <baruch@ev-en.org>
594 * GraphicsCache.C: Cleared up the confusion on when and how it is
597 * GraphicsCacheItem.C: Indentation change.
599 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
600 figure correctly when the image has been loaded successfully.
602 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
604 * ImageLoader.C: add a "using" directive.
606 * ImageLoader.h: remove extra comma at the end of enum; add an
607 std:: qualifier for vector.
609 2001-01-21 Baruch Even <baruch@ev-en.org>
611 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
612 height in the image itself and minor cleanups.
614 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
615 new ImageLoader class instead of the older Renderer class. This
616 means change of responsibilities.