]> git.lyx.org Git - lyx.git/blob - src/graphics/ChangeLog
Smart loading of image files for previews and for the graphics inset.
[lyx.git] / src / graphics / ChangeLog
1 2002-07-12  Angus Leeming  <leeming@lyx.org>
2
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.
5
6         * GraphicsSupport.[Ch]: new files. isInsetVisible interrogates the
7         BufferView to ascertain whether the inset is visible or not.
8
9         * Makefile.am: added GraphicsSupport.[Ch].
10
11         * PreviewImage.[Ch]: use this smart loader.
12
13         * PreviewLoader.C: don't load generated image files indiscimminantly.
14         Instead emit the imageReady signal and allow the image owner to decide.
15
16 2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
17
18         * GraphicsCache.C: remove init_graphics()
19  
20 2002-07-09  Angus Leeming  <leeming@lyx.org>
21
22         * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
23         arithmetic when it should be floating.
24
25 2002-07-09  Angus Leeming  <leeming@lyx.org>
26
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.
31
32 2002-07-09  Angus Leeming  <leeming@lyx.org>
33
34         * PreviewLoader.C: Further refactoring of the code. Should now be
35         pretty clean.
36
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.
40
41         * GraphicsImageXPM.C (scale): use boost::tie.
42
43 2002-07-08  Herbert Voss  <voss@lyx.org>
44
45         * PreviewLoader.C: use of preview_size_factor to get the right
46         font-size! 0.9 is the default.
47
48 2002-07-08  Angus Leeming  <leeming@lyx.org>
49
50         * PreviewLoader.C: Add "delayed" and "showlabels" options to the
51         invocation of preview.sty.
52         Perform something of an internal clean-up.
53
54 2002-07-06  Angus Leeming  <leeming@lyx.org>
55
56         * PreviewLoader.C: ensure that the metrics data is used by the
57         correct image!
58
59         * PreviewLoader.C:
60         * PreviewImage.C: (Impl d-tor): remove all generated files that still
61         exist (perhaps because the process was curtailed before the images
62         were loaded.)
63
64         * PreviewLoader.C (unique_filename): store the files in Buffer::tmppath.
65
66 2002-07-05  Angus Leeming  <leeming@lyx.org>
67
68         * PreviewImage.h:
69         * PreviewImage.C:
70         * PreviewLoader.h:
71         * PreviewLoader.C:
72         * PreviewMetrics.h:
73         * PreviewMetrics.C:
74         * Previews.h:
75         * Previews.C: new files. The previewed LaTeX snippet stuff.
76
77         * Makefile.am: add these files.
78
79 2002-07-05  Angus Leeming  <leeming@lyx.org>
80
81         * GraphicsLoader.h: whitespace.
82
83 2002-07-04  Lars Gullik Bjønnes  <larsbj@birdstep.com>
84
85         * GraphicsImage.[Ch]: newImage and loadableFormats changed to
86         boost::function from boost::signal.
87
88 2002-07-01  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
89
90         * GraphicsConverter.C (convert): do not use ChangeExtension
91         because to_file_base may contain a dot.
92
93 2002-06-28  Angus Leeming  <leeming@lyx.org>
94
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.
99
100         * GraphicsTypes: remove the typedefs, leaving only the enums.
101
102         * GraphicsImage.h: now has a finishedLoading signal, as opposed to being
103         passed a reference to one in the load() method.
104
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.
109
110         * GraphicsCache.[Ch]:
111         * GraphicsCacheItem.[Ch]:
112         * GraphicsConverter.[Ch]:
113         * GraphicsLoader.[Ch]: use the Pimpl idiom to hide the class internals
114         from public view.
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.
119
120         * Renamed classes
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.
127
128 2002-06-26  Angus Leeming  <leeming@lyx.org>
129
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
132         compiles.
133
134 2002-06-26  Angus Leeming  <leeming@lyx.org>
135
136         * GraphicsTypes.h: add "Ready" to the ImageStatus enum.
137         move the DisplayType enum out of grfx::GParams to here.
138
139         * GraphicsCacheItem.h: re-write preliminary description to reflect
140         current reality.
141
142         * GraphicsParams.[Ch]:
143         * GraphicsImageXPM.C (load, setPixmap): changes aassociated with moving
144         grfx::DisplayType out of grfx::GParams.
145
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.
149
150         * Makefile.am: add these files.
151
152 2002-06-25  Angus Leeming  <leeming@lyx.org>
153
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
159         image changes.
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.
163
164 2002-06-19  Angus Leeming  <leeming@lyx.org>
165
166         * GraphicsConverter.C: add using std::endl directive.
167
168 2002-06-17  Herbert Voss  <voss@lyx.org>
169
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
175
176         * GraphicsConverter.C: add more lyxerr comments and choose
177         convert when no other userdefined converter was found
178
179 2002-06-10  Herbert Voss  <voss@lyx.org>
180
181         * GraphicsImageXPM.C (convertTo7chars): get another special color
182         format from convert work in the right way
183
184 2002-06-12  John Levon  <moz@compsoc.man.ac.uk>
185
186         * GraphicsCache.C: use right colormap incantation
187
188 2002-06-12  John Levon  <moz@compsoc.man.ac.uk>
189
190         * GraphicsCache.C: use lyx_gui namespace
191
192         * GraphicsImageXPM.C: back down to using xforms
193           directly again
194
195 2002-06-07  Angus Leeming  <leeming@lyx.org>
196
197         Fixes needed to compile with Compaq cxx 6.5.
198         * GraphicsConverter.h: forward declare class ConvProcess.
199
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.
203
204 2002-06-06  Angus Leeming  <a.leeming@ic.ac.uk>
205
206         * GraphicsImageXPM.C (rotate): rotate in the same sense as xdvi!
207
208 2002-05-30  Lars Gullik Bjønnes  <larsbj@birdstep.com>
209
210         * GraphicsImageXPM.C: SigC to boot::signals changes.
211         (newImage): fix () bug when using new.
212
213 2002-05-29  Lars Gullik Bjønnes  <larsbj@birdstep.com>
214
215         * switch from SigC signals to boost::signals.
216
217 2002-05-29  André Pönitz <poenitz@gmx.net>
218
219         * GraphicsParam.C: remove unneeded #include, move vomment
220
221 2002-05-28  André Pönitz <poenitz@gmx.net>
222
223         * GraphicsParam.[Ch]: move inset related stuff to inset/insetgraphics
224
225 2002-05-24  John Levon  <moz@compsoc.man.ac.uk>
226
227         * GraphicsImageXPM.C: ColorHandler moved
228
229 2002-05-24  Juergen Vigna  <jug@sad.it>
230
231         * GraphicsCache.h:
232         * GraphicsImage.h: include LString.h first.
233
234 2002-05-22  Lars Gullik Bjønnes  <larsbj@birdstep.com>
235
236         * GraphicsCacheItem.h: use more specific smart_ptr header.
237         * GraphicsTypes.h: ditto
238         * GraphicsImage.h: ditto
239         * GraphicsConverter.h: ditto
240
241 2002-04-28  John Levon  <moz@compsoc.man.ac.uk>
242
243         * GraphicsImageXPM.C: understand convert's use of "opaque"
244           as a colour name
245
246 2002-04-19  Marco Morandini <morandini@aero.polimi.it>
247
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.
251
252 2002-04-18  Lars Gullik Bjønnes  <larsbj@birdstep.com>
253
254         * GraphicsImageXPM.C (convertTo7chars): drop all conversions and
255         only work on the string.
256
257 2002-04-17  Angus Leeming  <a.leeming@ic.ac.uk>
258
259         * GraphicsImageXPM.C (Data::reset): Fix the loading of xpm files by
260         the simple image loader when it encounters colour strings like
261         #rrrrggggbbbb.
262
263 2002-04-16  Angus Leeming  <a.leeming@ic.ac.uk>
264
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.
269
270 2002-04-16  Rob Lahaye  <lahaye@users.sourceforge.net>
271         * GraphicsImageXPM.C: fix clipping for boundingbox y-coordinates
272
273 2002-04-08  Angus Leeming  <a.leeming@ic.ac.uk>
274
275         * GraphicsCacheItem.C (findTargetFormat): fix bug waiting to bite:
276         a reference to a temp object that's going out of scope...
277
278 2002-04-09  Herbert Voss  <voss@lyx.org>
279
280         * GraphicsParams.C (BoundingBox c-tor): fix rounding errors by using
281         LyXLength::inBP instead of inPixels.
282
283 2002-04-10  Herbert Voss  <voss@perce.de>
284
285         * GraphicsCache.[Ch]:
286         * GraphicsCacheItem.[Ch]: add width/height functions from Angus
287         to read the "Bounding Box" from non (e)ps files.
288
289 2002-04-08  Angus Leeming  <a.leeming@ic.ac.uk>
290
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.)
294
295 2002-04-04  Angus Leeming  <a.leeming@ic.ac.uk>
296
297         * GraphicsParams.C (BoundingBox c-tor): ensure that the member
298         variables are initialised. Clean-up parsing of the string (with thanks
299         to Herbert.)
300
301 2002-03-26  Angus Leeming  <a.leeming@ic.ac.uk>
302
303         * GraphicsCacheItem.C (convertToDisplayFormat): don't launch that Alert
304         if the file can't be found.
305
306         * GraphicsParams.h (c-tor): remove string() as default argument.
307
308         * GraphicsCacheItem.C: a couple of changes as a result.
309
310 2002-03-22  Angus Leeming  <a.leeming@ic.ac.uk>
311
312         * GraphicsCache.[Ch] (update): now passed filepath to determine absolute
313         path to graphics file.
314
315         * GraphicsParams.[Ch] (c-tor): now passed filepath.
316
317 2002-03-21  Lars Gullik Bjønnes  <larsbj@birdstep.com>
318
319         * most files: ws cleanup
320
321         * Makefile.am: remove ld -r stuff
322
323 2002-03-20  Lars Gullik Bjønnes  <larsbj@birdstep.com>
324
325         * Makefile.am: special rules if partial linking
326
327 2002-03-14  Angus Leeming  <a.leeming@ic.ac.uk>
328
329         * GraphicsCache.C: use Lars' preferred idiom for a for-loop.
330
331 2002-03-11  Lars Gullik Bjønnes  <larsbj@birdstep.com>
332
333         * GraphicsConverter.[Ch] (converted): make first arg const ref.
334
335         * GraphicsCacheItem.h: doxy change
336
337         * GraphicsCacheItem.C: ws change
338
339 2002-03-05  Angus Leeming  <a.leeming@ic.ac.uk>
340
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].
344
345 2002-03-04  Angus Leeming  <a.leeming@ic.ac.uk>
346
347         * GraphicsCache.C: change associated with move of initialiseGraphics
348         to GUIRuntime.
349
350 2002-02-28  Angus Leeming  <a.leeming@ic.ac.uk>
351
352         * GraphicsParams.[Ch]:
353         * GraphicsImage.C:
354         * GraphicsImageXPM.C: properly resolve more warnings about comparison
355         between signed and unsigned integer expressions.
356
357         * Makefile.am: add GraphicsTypes.h which I'd carelessly left out.
358
359         * GraphicsCache.C: move connections to the GImage-derived classes to
360         the frontends.
361
362         * GraphicsImageXPM.C (copy c-tor): don't copy pixmap.
363
364         * GraphicsCacheItem.C (findTargetFormat): if we can load direct without
365         conversion, then do that.
366
367 2002-02-27  Angus Leeming  <a.leeming@ic.ac.uk>
368
369         * GraphicsCache.C: improve commentary to graphicsInit and where it
370         should really go.
371
372         * GraphicsImageXPM.C (~Data, free_color_table): resolve the crash
373         that became a memory leak properly. (Let the shared_c_ptr free the
374         color table.)
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.
378
379 2002-02-27  Angus Leeming  <a.leeming@ic.ac.uk>
380
381         * GraphicsImageXPM.[Ch]: more rigorous use of types (signed/unsigned).
382         (Data d-tor): introduce memory leak temporarily, to "fix" a crash
383         in free_color_table.
384         (unique_color_string): use the correct string c-tor.
385
386 2002-02-15  Angus Leeming  <a.leeming@ic.ac.uk>
387
388         * ImageLoader.[Ch]:
389         * ImageLoaderXPM.[Ch]: removed.
390
391         * GraphicsConverter.[Ch]:
392         * GraphicsImage.[Ch]:
393         * GraphicsImageXPM.[Ch]:
394         * GraphicsParams.[Ch]:
395         * GraphicsTypes.h: new files.
396
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
402         GImageXPM.
403
404 2002-02-07  Herbert Voss  <voss@lyx.org>
405
406         * GraphicsCacheItem.C: use unzipFile() from support/filetools
407
408 2002-01-31  Herbert Voss  <voss@lyx.org>
409
410         * GraphicsCacheItem.h: handle filetype without the file extension;
411         getting type from contents; handle zipped files
412
413 2002-01-27  Herbert Voss  <voss@lyx.org>
414
415         * GraphicsCacheItem.h: added Converting to the ImageStatus enum.
416
417 2002-01-17  John Levon  <moz@compsoc.man.ac.uk>
418
419         * ImageLoaderXPM.C: don't set XpmColorKey flag if we don't use it
420
421 2001-12-19  Jean-Marc Lasgouttes  <lasgouttes@freesurf.fr>
422
423         * GraphicsCacheItem.h: do not include <config.h> in header files
424
425 2001-09-21  Angus Leeming  <a.leeming@ic.ac.uk>
426
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
430         preferences option.
431
432 2001-09-20  Angus Leeming  <a.leeming@ic.ac.uk>
433
434         * GraphicsCacheItem.C (convertImage): only convert if "from" and "to"
435         are different. Thus, don't delete the "to" if it's the original!
436
437 2001-09-01  John Levon  <moz@compsoc.man.ac.uk>
438
439         * ImageLoadXPM.C: remove setting of alloc colour mask,
440           led to crash as we don't define a callback
441
442 2001-07-29  Baruch Even  <baruch@lyx.org>
443
444         * ImageLoaderXPM.C (runImageLoader): When loading agree to use non-exact
445         colors with closeness of 10000.
446
447         * GraphicsCacheItem.C: Fixed a compilation bug introduced earlier.
448
449 2001-07-29  Baruch Even  <baruch@lyx.org>
450
451         * GraphicsCacheItem.C (findTargetFormat): Removed error dialog box,
452         too annoying.
453
454 2001-07-23  Baruch Even  <baruch@lyx.org>
455
456         * GraphicsCacheItem.C (convertImage): Fixed a bug with regard to loading
457         the image after conversion.
458
459 2001-07-17  Baruch Even  <baruch@lyx.org>
460
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.
464
465 2001-07-03  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
466
467         * ImageLoaderXPM.C (runImageLoader): get display information from
468         GUIRunTime.
469
470 2001-06-14  Angus Leeming  <a.leeming@ic.ac.uk>
471
472         * GraphicsCache.C:
473         * GraphicsCacheItem.C:
474         * ImageLoader.C:
475         * ImageLoaderXPM.C: removed // -*- C++ -*- as first line.
476
477 2001-04-17  Lars Gullik Bjønnes  <larsbj@birdstep.com>
478
479         * GraphicsCache.h: inherit privately from noncopyable
480         * ImageLoader.h: ditto
481         * GraphicsCacheItem.h: ditto
482
483 2001-04-16  Allan Rae  <rae@lyx.org>
484
485         * ImageLoaderXPM.C (runImageLoader): #warning triggers an error on Sun
486         CC 6.0 as an unrecognised preprocessor directive.  So ensure they're
487         wrapped.
488
489 2001-04-02  Baruch Even  <baruch@lyx.org>
490
491         * GraphicsCacheItem.[Ch]: Changed to used the Converter class instead
492         of hard coding ImageMagick.
493
494 2001-03-10  Baruch Even  <baruch@lyx.org>
495
496         * GraphicsCache.C: Style change from (*it).field to it->field
497
498 2001-03-15  Lars Gullik Bjønnes  <larsbj@trylle.birdstep.com>
499
500         * GraphicsCache.h: noncopyable is in namespace boost
501         * ImageLoader.h: ditto
502         * GraphicsCacheItem.h: ditto
503
504 2001-03-07  Baruch Even  <baruch@lyx.org>
505
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.
509
510 2001-02-28  Baruch Even  <baruch@ev-en.org>
511
512         * GraphicsCache.h:
513         * GraphicsCache.C: Changed the singleton pattern implementation, the
514         former version "leaked" in the sense that it was not deallocated at
515         program end.
516
517 2001-02-20  Baruch Even  <baruch@ev-en.org>
518
519         * GraphicsCache.C: Changed to use shared_ptr<GraphicsCacheItem>
520         instead of a pure pointer.
521
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.
526
527         * ImageLoader.[Ch]: Changed the semantics of the image_ pointers usage.
528         Ownership is now dropped when the caller requests the image_ pointer.
529
530 2001-02-20  Baruch Even  <baruch@ev-en.org>
531
532         * GraphicsCache.C: Cleared up the confusion on when and how it is
533         emptied.
534
535         * GraphicsCacheItem.C: Indentation change.
536
537         * GraphicsCacheItem_pimpl.C: Fixed the loading logic so that it will
538         figure correctly when the image has been loaded successfully.
539
540 2001-02-08  Jean-Marc Lasgouttes  <Jean-Marc.Lasgouttes@inria.fr>
541
542         * ImageLoader.C: add a "using" directive.
543
544         * ImageLoader.h: remove extra comma at the end of enum; add an
545         std:: qualifier for vector.
546
547 2001-01-21  Baruch Even  <baruch@ev-en.org>
548
549         * GraphicsCacheItem.[Ch]: Changes due to the storage of width and
550         height in the image itself and minor cleanups.
551
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.