]> git.lyx.org Git - lyx.git/blob - src/graphics/GraphicsTypes.h
use strfwd.h
[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 #include "support/strfwd.h"
20
21
22 namespace lyx {
23 namespace graphics {
24
25 /// The status of the loading process
26 enum ImageStatus {
27         /** The data is in the cache, but no request to display it
28          *  has been received.
29          */
30         WaitingToLoad,
31         /// The image is in a loadable format and is being loaded.
32         Loading,
33         /// The image is being converted to a loadable format.
34         Converting,
35         /// The image has been loaded into memory.
36         Loaded,
37         /// The image is in memory and is being scaled, rotated, etc.
38         ScalingEtc,
39         /// All finished. Can display the image.
40         Ready,
41         ///
42         ErrorNoFile,
43         ///
44         ErrorConverting,
45         ///
46         ErrorLoading,
47         ///
48         ErrorGeneratingPixmap,
49         /// The data is not in the cache at all!
50         ErrorUnknown
51 };
52
53 /// How is the image to be displayed on the LyX screen?
54 enum DisplayType {
55         ///
56         DefaultDisplay,
57         ///
58         MonochromeDisplay,
59         ///
60         GrayscaleDisplay,
61         ///
62         ColorDisplay,
63         ///
64         NoDisplay
65 };
66
67
68 /// The translator between the Display enum and corresponding lyx string.
69 Translator<DisplayType, std::string> const & displayTranslator();
70
71 } // namespace graphics
72 } // namespace lyx
73
74 #endif // GRAPHICSTYPES_H