]> git.lyx.org Git - lyx.git/blob - src/graphics/GraphicsTypes.cpp
Add context menu for outline operations. Choice of words might not be best.
[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 namespace std;
18
19 namespace lyx {
20 namespace graphics {
21
22 namespace {
23
24 /// The translator between the Display enum and corresponding lyx string.
25 Translator<DisplayType, string> const initTranslator()
26 {
27         Translator<DisplayType, string> translator(DefaultDisplay, "default");
28
29         // Fill the display translator
30         translator.addPair(MonochromeDisplay, "monochrome");
31         translator.addPair(GrayscaleDisplay, "grayscale");
32         translator.addPair(ColorDisplay, "color");
33         translator.addPair(NoDisplay, "none");
34
35         return translator;
36 }
37
38 } // namespace anon
39
40 Translator<DisplayType, string> const & displayTranslator()
41 {
42         static Translator<DisplayType, string> const translator =
43                 initTranslator();
44         return translator;
45 }
46
47 } // namespace graphics
48 } // namespace lyx