]> git.lyx.org Git - features.git/blob - src/graphics/GraphicsTypes.h
18db9210b1f899e6041d6129f5ab47dc9ff7e1c0
[features.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         class GCacheItem;
31         /// The cache contains data of this type.
32         typedef boost::shared_ptr<GCacheItem> GraphicPtr;
33
34         /// The status of the loading process
35         enum ImageStatus {
36                 /** The data is in the cache, but no request to display it
37                  *  has been received.
38                  */
39                 WaitingToLoad,
40                 /// The image is in a loadable format and is being loaded.
41                 Loading,
42                 /// The image is being converted to a loadable format.
43                 Converting,
44                 /// The image has been loaded into memory.
45                 Loaded,
46                 /// The image is in memory and is being scaled, rotated, etc.
47                 ScalingEtc,
48                 /// All finished. Can display the image.
49                 Ready,
50                 ///
51                 ErrorNoFile,
52                 ///
53                 ErrorConverting,
54                 ///
55                 ErrorLoading,
56                 ///
57                 ErrorGeneratingPixmap,
58                 /// The data is not in the cache at all!
59                 ErrorUnknown
60         };
61
62         /// How is the image to be displayed on the LyX screen?
63         enum DisplayType {
64                 ///
65                 ColorDisplay,
66                 ///
67                 GrayscaleDisplay,
68                 ///
69                 MonochromeDisplay,
70                 ///
71                 NoDisplay
72         };
73 }
74
75 #endif // GRAPHICSTYPES_H