]> git.lyx.org Git - features.git/blob - src/graphics/GraphicsTypes.h
5893c529e0a443b5841d3846e2f12fb65b0edfa3
[features.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 "LString.h"
19 #include "support/translator.h"
20
21 namespace lyx {
22 namespace graphics {
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 DisplayType and the corresponding lyx string.
67 extern Translator<DisplayType, string> displayTranslator;
68
69 ///
70 void setDisplayTranslator();
71
72 } // namespace graphics
73 } // namespace lyx
74
75 #endif // GRAPHICSTYPES_H