]> git.lyx.org Git - lyx.git/blob - src/graphics/GraphicsTypes.h
1b34eabd77d535603e4aaa1cc4de85f8fe6aea5b
[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
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
67 /// The translator between the Display enum and corresponding lyx string.
68 Translator<DisplayType, std::string> const & displayTranslator();
69
70 } // namespace graphics
71 } // namespace lyx
72
73 #endif // GRAPHICSTYPES_H