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