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