1 2002-07-21 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
3 * PreviewLoader.C: use BufferParams::getLyXTextClass
5 2002-07-21 Herbert Voss <voss@lyx.org>
7 * GraphicsImage.C: get the LyXAspectRatio run.
9 * GraphicsParams.[Ch]: add bool keepLyXXAspectRatio
11 2002-07-20 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
13 * PreviewLoader.C (startLoading): pass an interger as resolution
14 to the lyxpreview converter
16 * GraphicsParams.C: include <cstdlib>
18 2002-07-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
20 * PreviewLoader.C (startLoading): use LibScriptSearch to find the
21 preview converter script
23 2002-07-18 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
25 * GraphicsCacheItem.C (reset): use erase() instead of clear() for
28 2002-07-18 Angus Leeming <leeming@lyx.org>
30 * GraphicsCacheItem.[Ch]: add a FileMonitor variable to the the Impl
32 (startMonitoring, monitoring, checksum): new methods to interact with
35 * GraphicsLoader.[Ch] (startMonitoring, monitoring, checksum): new
36 methods invoking the CacheItem methods of the same name.
37 (resetFile): if monitoring and the file changes, start monitoring this
40 2002-07-17 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
42 * Makefile.am: remove FileMonitor.[Ch]
44 2002-06-17 Herbert Voss <voss@lyx.org>
46 * GraphicsCachItem.C (findTargetFormat): remove the speciell case
47 for old ps-files (Garst). It's now handled by defining a converter and
48 disabling the ps-support of xforms.
50 2002-07-17 Angus Leeming <leeming@lyx.org>
52 Be true to the Pimpl idiom, moving all signals into the respective
53 Impl classes and defining methods to connect them to an outside slot.
54 Const-ify all visible class methods as they act only on a const pimpl_.
56 * GraphicsCache.[Ch] (add, remove): const-ify.
58 * GraphicsCacheItem.[Ch] (startLoading): const-ify.
59 (statusChanged): move the signal into the Impl class.
60 (connect): new method, enabling a listener to connect to this signal.
62 * GraphicsConverter.[Ch]: (startConversion): const-ify.
63 (finishedConversion): move the signal into the Impl class.
64 (connect): new method, enabling a listener to connect to this signal.
66 * GraphicsLoader.[Ch] (reset, startLoading): const-ify.
67 (statusChanged): move the signal into the Impl class.
68 (connect): new method, enabling a listener to connect to this signal.
70 * PreviewLoader.[Ch] (add, remove, startLoading): const-ify.
71 (imageReady): move the signal into the Impl class.
72 (connect): new method, enabling a listener to connect to this signal.
73 (emitSignal): new method, enabling PreviewImage to tell the outside
74 world that the file has been loaded into memory.
76 * Previews.[Ch] (loader, removeLoader, generateBufferPreviews):
80 * GraphicsCacheItem.C:
81 * GraphicsConverter.[Ch]:
85 * PreviewLoader.[Ch]: whitespace clean-up.
87 2002-07-16 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
89 * PreviewLoader.C (setConverter): remove unused variable
91 * GraphicsImageXPM.C (isDrawable): implement
92 (setPixmap): the opaque color is black, not white
94 2002-07-15 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
96 * GraphicsImageXPM.C (color_none_id):
97 (contains_color_none): use ascii_lowercase instead of lowercase
99 2002-07-16 Angus Leeming <leeming@lyx.org>
101 * PreviewLoader.C: greater use of STL algorithms.
103 * Previews.[Ch]: use const in more places.
104 (generateBufferPreviews): now takes a Buffer const & argument, not a
107 2002-07-15 John Levon <moz@compsoc.man.ac.uk>
109 * GraphicsImage.h: remove getPixmap/X, add isDrawable()
111 2002-07-12 Angus Leeming <leeming@lyx.org>
113 * GraphicsLoader.[Ch]: smart loading of images. Images are loaded only
114 if visible 2 secs after the call to load them is first made.
116 * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
117 BufferView to ascertain whether the inset is visible or not.
119 * Makefile.am: added GraphicsSupport.[Ch].
121 * PreviewImage.[Ch]: use this smart loader.
123 * PreviewLoader.C: don't load generated image files indiscimminantly.
124 Instead emit the imageReady signal and allow the image owner to decide.
126 2002-07-12 John Levon <moz@compsoc.man.ac.uk>
128 * GraphicsCache.C: remove init_graphics()
130 2002-07-09 Angus Leeming <leeming@lyx.org>
132 * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
133 arithmetic when it should be floating.
135 2002-07-09 Angus Leeming <leeming@lyx.org>
137 * PreviewLoader.C (startLoading): prepend LaTeX file with "\batchmode".
138 Output equation labels as "(#)" if lyxrc preference is set.
139 (setFontScalingFactor): use lyxrc variable preview_scale_factor
140 rather than hard-coding this.
142 2002-07-09 Angus Leeming <leeming@lyx.org>
144 * PreviewLoader.C: Further refactoring of the code. Should now be
147 * PreviewMetrics.[Ch]: removed. Had a v. short shelf life and is now
148 past its sell-by date. The code to read the metrics file is now found
149 as a helper function in PreviewLoader.C.
151 * GraphicsImageXPM.C (scale): use boost::tie.
153 2002-07-08 Herbert Voss <voss@lyx.org>
155 * PreviewLoader.C: use of preview_size_factor to get the right
156 font-size! 0.9 is the default.
158 2002-07-08 Angus Leeming <leeming@lyx.org>
160 * PreviewLoader.C: Add "delayed" and "showlabels" options to the
161 invocation of preview.sty.
162 Perform something of an internal clean-up.
164 2002-07-06 Angus Leeming <leeming@lyx.org>
166 * PreviewLoader.C: ensure that the metrics data is used by the
170 * PreviewImage.C: (Impl d-tor): remove all generated files that still
171 exist (perhaps because the process was curtailed before the images
174 * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
176 2002-07-05 Angus Leeming <leeming@lyx.org>
185 * Previews.C: new files. The previewed LaTeX snippet stuff.
187 * Makefile.am: add these files.
189 2002-07-05 Angus Leeming <leeming@lyx.org>
191 * GraphicsLoader.h: whitespace.
193 2002-07-04 Lars Gullik Bjønnes <larsbj@birdstep.com>
195 * GraphicsImage.[Ch]: newImage and loadableFormats changed to
196 boost::function from boost::signal.
198 2002-07-01 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
200 * GraphicsConverter.C (convert): do not use ChangeExtension
201 because to_file_base may contain a dot.
203 2002-06-28 Angus Leeming <leeming@lyx.org>
205 * GraphicsCacheItem.[Ch]: refactor some of the more convoluted logic
206 by moving those SignalPtrs into the grfx::Image and grfx::Converter
207 classes where they really belong.
208 Use the Pimpl idiom to hide the class internals from public view.
210 * GraphicsTypes: remove the typedefs, leaving only the enums.
212 * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
213 passed a reference to one in the load() method.
215 * GraphicsConverter.[Ch]: totally refactored. An instance of
216 grfx::Converter now represents a single conversion process.
217 Thus grfx::CachItem now has a grfx::Converter * that is set when the
218 conversion is initiated and destroyed on completion.
220 * GraphicsCache.[Ch]:
221 * GraphicsCacheItem.[Ch]:
222 * GraphicsConverter.[Ch]:
223 * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
225 Note that I have done this only after making the above changes,
226 so not only should we have a clean, minimal and well documented
227 interface to these classes in the header files, but the class internals
228 should be much clearer too.
231 grfx::GCache -> grfx::Cache,
232 grfx::GCacheItem -> grfx::CacheItem,
233 grfx::GConverter -> grfx::Converter,
234 grfx::GImage -> grfx::Image,
235 grfx::GImageXPM -> grfx::ImageXPM,
236 grfx::GParams -> grfx::Params.
238 2002-06-26 Angus Leeming <leeming@lyx.org>
240 * GraphicsLoader.[Ch]: use boost::scoped_ptr in preference to
241 std::auto_ptr. Define an empty Loader d-tor out-of-line to ensure it
244 2002-06-26 Angus Leeming <leeming@lyx.org>
246 * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
247 move the DisplayType enum out of grfx::GParams to here.
249 * GraphicsCacheItem.h: re-write preliminary description to reflect
252 * GraphicsParams.[Ch]:
253 * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
254 grfx::DisplayType out of grfx::GParams.
256 * GraphicsLoader.[Ch]: new files. Factor out the image loading stuff
257 that was in frontends/screen.C and insets/insetgraphics.C into a
258 single, easy-to-use class.
260 * Makefile.am: add these files.
262 2002-06-25 Angus Leeming <leeming@lyx.org>
264 * GraphicsCache.[Ch]:
265 * GraphicsCacheItem.[Ch]:
266 * GraphicsTypes.h: rewrite the graphics cache to just load a graphics
267 file into memory. The cache no longer controls the generation of the
268 pixmap. Instead, it just emits a signal when the loading status of an
270 The cache no longer stores InsetGraphics pointers and nor does it
271 assume responsibility for modifying an image (scaling, rotating etc).
272 Instead, that must now be performed elsewhere.
274 2002-06-19 Angus Leeming <leeming@lyx.org>
276 * GraphicsConverter.C: add using std::endl directive.
278 2002-06-17 Herbert Voss <voss@lyx.org>
280 * GraphicsCachItem.C: (findTargetFormat)return xpm-format as a
281 default when nothing different was found
282 (convertToDisplayFormat): handle zipped files in the right way and
283 choose always convert as a default converter when no other
284 userdefined was found
286 * GraphicsConverter.C: add more lyxerr comments and choose
287 convert when no other userdefined converter was found
289 2002-06-10 Herbert Voss <voss@lyx.org>
291 * GraphicsImageXPM.C (convertTo7chars): get another special color
292 format from convert work in the right way
294 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
296 * GraphicsCache.C: use right colormap incantation
298 2002-06-12 John Levon <moz@compsoc.man.ac.uk>
300 * GraphicsCache.C: use lyx_gui namespace
302 * GraphicsImageXPM.C: back down to using xforms
305 2002-06-07 Angus Leeming <leeming@lyx.org>
307 Fixes needed to compile with Compaq cxx 6.5.
308 * GraphicsConverter.h: forward declare class ConvProcess.
310 * GraphicsImageXPM.C:
311 all c-library variables have been moved into namespace std.
312 Wrap using std::xyz declarations inside a #ifndef CXX_GLOBAL_CSTD block.
314 2002-06-06 Angus Leeming <a.leeming@ic.ac.uk>
316 * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
318 2002-05-30 Lars Gullik Bjønnes <larsbj@birdstep.com>
320 * GraphicsImageXPM.C: SigC to boot::signals changes.
321 (newImage): fix () bug when using new.
323 2002-05-29 Lars Gullik Bjønnes <larsbj@birdstep.com>
325 * switch from SigC signals to boost::signals.
327 2002-05-29 André Pönitz <poenitz@gmx.net>
329 * GraphicsParam.C: remove unneeded #include, move vomment
331 2002-05-28 André Pönitz <poenitz@gmx.net>
333 * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
335 2002-05-24 John Levon <moz@compsoc.man.ac.uk>
337 * GraphicsImageXPM.C: ColorHandler moved
339 2002-05-24 Juergen Vigna <jug@sad.it>
342 * GraphicsImage.h: include LString.h first.
344 2002-05-22 Lars Gullik Bjønnes <larsbj@birdstep.com>
346 * GraphicsCacheItem.h: use more specific smart_ptr header.
347 * GraphicsTypes.h: ditto
348 * GraphicsImage.h: ditto
349 * GraphicsConverter.h: ditto
351 2002-04-28 John Levon <moz@compsoc.man.ac.uk>
353 * GraphicsImageXPM.C: understand convert's use of "opaque"
356 2002-04-19 Marco Morandini <morandini@aero.polimi.it>
358 * GraphicsCache.[Ch] (loadableFormats): new method. A wrapper for
359 GImage::loadableFormats() that ensures that the signal is connected
360 to the derived class' method.
362 2002-04-18 Lars Gullik Bjønnes <larsbj@birdstep.com>
364 * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
365 only work on the string.
367 2002-04-17 Angus Leeming <a.leeming@ic.ac.uk>
369 * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
370 the simple image loader when it encounters colour strings like
373 2002-04-16 Angus Leeming <a.leeming@ic.ac.uk>
375 * GraphicsCacheItem.C (convertToDisplayFormat):
376 * GraphicsConverter.C (build_script): remove the Alerts when things go
377 wrong as the inset displays the message anyway. Moreover, Alert seems
378 pretty temperamemtal at the moment.
380 2002-04-16 Rob Lahaye <lahaye@users.sourceforge.net>
382 * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
384 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
386 * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
387 a reference to a temp object that's going out of scope...
389 2002-04-09 Herbert Voss <voss@lyx.org>
391 * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
392 LyXLength::inBP instead of inPixels.
394 2002-04-10 Herbert Voss <voss@perce.de>
396 * GraphicsCache.[Ch]:
397 * GraphicsCacheItem.[Ch]: add width/height functions from Angus
398 to read the "Bounding Box" from non (e)ps files.
400 2002-04-08 Angus Leeming <a.leeming@ic.ac.uk>
402 * GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
403 the EPS file too, to ensure that the clipped Bounding Box is relative
404 to the original. (From Herbert.)
406 2002-04-04 Angus Leeming <a.leeming@ic.ac.uk>
408 * GraphicsParams.C (BoundingBox c-tor): ensure that the member
409 variables are initialised. Clean-up parsing of the string (with thanks
412 2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
414 * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
415 if the file can't be found.
417 * GraphicsParams.h (c-tor): remove string() as default argument.
419 * GraphicsCacheItem.C: a couple of changes as a result.
421 2002-03-22 Angus Leeming <a.leeming@ic.ac.uk>
423 * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
424 path to graphics file.
426 * GraphicsParams.[Ch] (c-tor): now passed filepath.
428 2002-03-21 Lars Gullik Bjønnes <larsbj@birdstep.com>
430 * most files: ws cleanup
432 * Makefile.am: remove ld -r stuff
434 2002-03-20 Lars Gullik Bjønnes <larsbj@birdstep.com>
436 * Makefile.am: special rules if partial linking
438 2002-03-14 Angus Leeming <a.leeming@ic.ac.uk>
440 * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
442 2002-03-11 Lars Gullik Bjønnes <larsbj@birdstep.com>
444 * GraphicsConverter.[Ch] (converted): make first arg const ref.
446 * GraphicsCacheItem.h: doxy change
448 * GraphicsCacheItem.C: ws change
450 2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
452 * Makefile.am: if there is no image loading class leveraging the power
453 of the appropriate gui library, then compile the basic alternative
454 found in GraphicsImageXPM.[Ch].
456 2002-03-04 Angus Leeming <a.leeming@ic.ac.uk>
458 * GraphicsCache.C: change associated with move of initialiseGraphics
461 2002-02-28 Angus Leeming <a.leeming@ic.ac.uk>
463 * GraphicsParams.[Ch]:
465 * GraphicsImageXPM.C: properly resolve more warnings about comparison
466 between signed and unsigned integer expressions.
468 * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
470 * GraphicsCache.C: move connections to the GImage-derived classes to
473 * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
475 * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
476 conversion, then do that.
478 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
480 * GraphicsCache.C: improve commentary to graphicsInit and where it
483 * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
484 that became a memory leak properly. (Let the shared_c_ptr free the
486 (reset, mapcolor): tidy up and introduce a work around for XPM files
487 with crappy color entries. Print out a nice friendly message on what's
488 gone wrong and how to resolve it properly.
490 2002-02-27 Angus Leeming <a.leeming@ic.ac.uk>
492 * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
493 (Data d-tor): introduce memory leak temporarily, to "fix" a crash
495 (unique_color_string): use the correct string c-tor.
497 2002-02-15 Angus Leeming <a.leeming@ic.ac.uk>
500 * ImageLoaderXPM.[Ch]: removed.
502 * GraphicsConverter.[Ch]:
503 * GraphicsImage.[Ch]:
504 * GraphicsImageXPM.[Ch]:
505 * GraphicsParams.[Ch]:
506 * GraphicsTypes.h: new files.
508 * All files. A total re-write of the graphics cache. The cache now
509 supports asynchronous file conversion and file loading. Images
510 can be cropped, rotated and scaled for display on the LyX screen.
511 The old LyXImage and ImageLoader have been combined in a new class
512 GImage. Ditto, ImageLoaderXPM's functionality has been moved into
515 2002-02-07 Herbert Voss <voss@lyx.org>
517 * GraphicsCacheItem.C: use unzipFile() from support/filetools
519 2002-01-31 Herbert Voss <voss@lyx.org>
521 * GraphicsCacheItem.h: handle filetype without the file extension;
522 getting type from contents; handle zipped files
524 2002-01-27 Herbert Voss <voss@lyx.org>
526 * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
528 2002-01-17 John Levon <moz@compsoc.man.ac.uk>
530 * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
532 2001-12-19 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
534 * GraphicsCacheItem.h: do not include <config.h> in header files
536 2001-09-21 Angus Leeming <a.leeming@ic.ac.uk>
538 * ImageLoaderXPM.C (runImageLoader): If the pixmap contains a
539 transparent colour, then set it to the colour of the background.
540 Also take account of the monochrome, grayscale of color
543 2001-09-20 Angus Leeming <a.leeming@ic.ac.uk>
545 * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
546 are different. Thus, don't delete the "to" if it's the original!
548 2001-09-01 John Levon <moz@compsoc.man.ac.uk>
550 * ImageLoadXPM.C: remove setting of alloc colour mask,
551 led to crash as we don't define a callback
553 2001-07-29 Baruch Even <baruch@lyx.org>
555 * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
556 colors with closeness of 10000.
558 * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
560 2001-07-29 Baruch Even <baruch@lyx.org>
562 * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
565 2001-07-23 Baruch Even <baruch@lyx.org>
567 * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
568 the image after conversion.
570 2001-07-17 Baruch Even <baruch@lyx.org>
572 * GraphicsCacheItem.h:
573 * GraphicsCacheItem.C: Shuffled things a bit to make it easier to switch
574 from synchronous to asynchronous and to ease the coming changes.
576 2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
578 * ImageLoaderXPM.C (runImageLoader): get display information from
581 2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
584 * GraphicsCacheItem.C:
586 * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
588 2001-04-17 Lars Gullik Bjønnes <larsbj@birdstep.com>
590 * GraphicsCache.h: inherit privately from noncopyable
591 * ImageLoader.h: ditto
592 * GraphicsCacheItem.h: ditto
594 2001-04-16 Allan Rae <rae@lyx.org>
596 * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
597 CC 6.0 as an unrecognised preprocessor directive. So ensure they're
600 2001-04-02 Baruch Even <baruch@lyx.org>
602 * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
603 of hard coding ImageMagick.
605 2001-03-10 Baruch Even <baruch@lyx.org>
607 * GraphicsCache.C: Style change from (*it).field to it->field
609 2001-03-15 Lars Gullik Bjønnes <larsbj@trylle.birdstep.com>
611 * GraphicsCache.h: noncopyable is in namespace boost
612 * ImageLoader.h: ditto
613 * GraphicsCacheItem.h: ditto
615 2001-03-07 Baruch Even <baruch@lyx.org>
617 * GraphicsCache.C (d-tor): Removed the assert, the assumption it carried
618 was false and it's not needed anyhow since the shared_ptr's in the cache
619 will destroy everything on exit.
621 2001-02-28 Baruch Even <baruch@ev-en.org>
624 * GraphicsCache.C: Changed the singleton pattern implementation, the
625 former version "leaked" in the sense that it was not deallocated at
628 2001-02-20 Baruch Even <baruch@ev-en.org>
630 * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
631 instead of a pure pointer.
633 * GraphicsCacheItem.[Ch]:
634 * GraphicsCacheItem_pimpl.[Ch]: Collapsed them into GraphicsCacheItem,
635 removed the reference counting that was inside. Also fixed a bug where
636 a temporary file wouldn't get erased.
638 * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
639 Ownership is now dropped when the caller requests the image_ pointer.
641 2001-02-20 Baruch Even <baruch@ev-en.org>
643 * GraphicsCache.C: Cleared up the confusion on when and how it is
646 * GraphicsCacheItem.C: Indentation change.
648 * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
649 figure correctly when the image has been loaded successfully.
651 2001-02-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
653 * ImageLoader.C: add a "using" directive.
655 * ImageLoader.h: remove extra comma at the end of enum; add an
656 std:: qualifier for vector.
658 2001-01-21 Baruch Even <baruch@ev-en.org>
660 * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
661 height in the image itself and minor cleanups.
663 * GraphicsCacheItem_impl.[Ch]: Changes due to the switch to use a
664 new ImageLoader class instead of the older Renderer class. This
665 means change of responsibilities.