]> git.lyx.org Git - lyx.git/blob - src/graphics/GraphicsTypes.cpp
remove one <boost/shared_ptr.hpp>
[lyx.git] / src / graphics / GraphicsTypes.cpp
1 /**
2  * \file GraphicsTypes.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  * \author Rob Lahaye
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "graphics/GraphicsTypes.h"
14
15 #include <string>
16
17 using std::string;
18
19
20 namespace lyx {
21 namespace graphics {
22
23 namespace {
24
25 /// The translator between the Display enum and corresponding lyx string.
26 Translator<DisplayType, string> const initTranslator()
27 {
28         Translator<DisplayType, string> translator(DefaultDisplay, "default");
29
30         // Fill the display translator
31         translator.addPair(MonochromeDisplay, "monochrome");
32         translator.addPair(GrayscaleDisplay, "grayscale");
33         translator.addPair(ColorDisplay, "color");
34         translator.addPair(NoDisplay, "none");
35
36         return translator;
37 }
38
39 } // namespace anon
40
41 Translator<DisplayType, string> const & displayTranslator()
42 {
43         static Translator<DisplayType, string> const translator =
44                 initTranslator();
45         return translator;
46 }
47
48 } // namespace graphics
49 } // namespace lyx