]> git.lyx.org Git - lyx.git/blob - src/graphics/GraphicsTypes.h
Rob's followup (nr. 1 ;)
[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 <leeming@lyx.org>
8  *
9  *  All that header files outside the graphics subdirectory should need to
10  *  access.
11  */
12
13 #ifndef GRAPHICSTYPES_H
14 #define GRAPHICSTYPES_H
15
16 #include "support/translator.h"
17
18 #ifdef __GNUG__
19 #pragma interface
20 #endif
21
22 namespace grfx {
23
24         /// The status of the loading process
25         enum ImageStatus {
26                 /** The data is in the cache, but no request to display it
27                  *  has been received.
28                  */
29                 WaitingToLoad,
30                 /// The image is in a loadable format and is being loaded.
31                 Loading,
32                 /// The image is being converted to a loadable format.
33                 Converting,
34                 /// The image has been loaded into memory.
35                 Loaded,
36                 /// The image is in memory and is being scaled, rotated, etc.
37                 ScalingEtc,
38                 /// All finished. Can display the image.
39                 Ready,
40                 ///
41                 ErrorNoFile,
42                 ///
43                 ErrorConverting,
44                 ///
45                 ErrorLoading,
46                 ///
47                 ErrorGeneratingPixmap,
48                 /// The data is not in the cache at all!
49                 ErrorUnknown
50         };
51
52         /// How is the image to be displayed on the LyX screen?
53         enum DisplayType {
54                 ///
55                 DefaultDisplay,
56                 ///
57                 MonochromeDisplay,
58                 ///
59                 GrayscaleDisplay,
60                 ///
61                 ColorDisplay,
62                 ///
63                 NoDisplay
64         };
65         
66         /// The translator between the Display enum and corresponding lyx string.
67         extern Translator< DisplayType, string > displayTranslator;
68
69         void setDisplayTranslator();
70         
71 } // namespace grfx
72
73 #endif // GRAPHICSTYPES_H