]> git.lyx.org Git - features.git/blob - src/graphics/GraphicsTypes.C
Really dull and boring header shit
[features.git] / src / graphics / GraphicsTypes.C
1 // -*- C++ -*-
2 /**
3  *  \file GraphicsTypes.C
4  *  Read the file COPYING
5  *
6  *  \author Rob Lahaye
7  *
8  * Full author contact details available in file CREDITS
9  */
10
11 #include "graphics/GraphicsTypes.h"
12
13 namespace grfx {
14
15 /// The translator between the Display enum and corresponding lyx string.
16 Translator<DisplayType, string> displayTranslator(DefaultDisplay, "default");
17
18 void setDisplayTranslator()
19 {
20         /// This variable keeps a tab on whether the translator is set.
21         static bool done = false;
22
23         if (!done) {
24                 done = true;
25
26                 // Fill the display translator
27                 displayTranslator.addPair(DefaultDisplay, "default");
28                 displayTranslator.addPair(MonochromeDisplay, "monochrome");
29                 displayTranslator.addPair(GrayscaleDisplay, "grayscale");
30                 displayTranslator.addPair(ColorDisplay, "color");
31                 displayTranslator.addPair(NoDisplay, "none");
32                 
33                 // backward compatibility for old lyxrc.display_graphics
34                 displayTranslator.addPair(MonochromeDisplay, "mono");
35                 displayTranslator.addPair(GrayscaleDisplay, "gray");
36                 displayTranslator.addPair(NoDisplay, "no");
37         }
38 }
39
40 } // namespace grfx