]> git.lyx.org Git - lyx.git/blob - src/graphics/GraphicsTypes.h
c99187f8cbe306dd39a4e0d0e8f8f1a48279f4fd
[lyx.git] / src / graphics / GraphicsTypes.h
1 // -*- C++ -*-
2 /**
3  *  \file GraphicsTypes.h
4  *  Copyright 2002 the LyX Team
5  *  Read the file COPYING
6  *
7  *  \author Angus Leeming <a.leeming@ic.ac.uk>
8  *
9  *  All that header files outside the graphics subdirectory should need to
10  *  access. That just leaves insetgraphics.C to access GraphicsCache.h.
11  *  It also makes life easier for files inside the graphics subdirectory!
12  */
13
14 #ifndef GRAPHICSTYPES_H
15 #define GRAPHICSTYPES_H
16
17 #include <boost/shared_ptr.hpp>
18
19 #ifdef __GNUG__
20 #pragma interface
21 #endif
22
23 namespace grfx {
24
25         ///
26         class GImage;
27         ///
28         typedef boost::shared_ptr<GImage> ImagePtr;
29
30         /// The status of the loading process
31         enum ImageStatus {
32                 /** The data is in the cache, but no request to display it
33                  *  has been received.
34                  */
35                 WaitingToLoad,
36                 /// The image is in a loadable format and is being loaded.
37                 Loading,
38                 /// The image is being converted to a loadable format.
39                 Converting,
40                 /// The image is in memory and is being scaled, rotated, etc.
41                 ScalingEtc,
42                 /// All finished. Can display the image.
43                 Loaded,
44                 ///
45                 ErrorNoFile,
46                 ///
47                 ErrorConverting,
48                 ///
49                 ErrorLoading,
50                 /// Fall back on the unmodified image?
51                 ErrorScalingEtc,
52                 /// The data is not in the cache at all!
53                 ErrorUnknown
54         };
55 }
56
57 #endif // GRAPHICSTYPES_H