1 // -*- C++ -*-
2 /**
3  * \file BufferEncodings.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Lars Gullik Bjønnes
8  * \author Jean-Marc Lasgouttes
9  * \author Stephan Witt
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13 
14 #ifndef BUFFER_ENCODINGS_H
15 #define BUFFER_ENCODINGS_H
16 
17 #include "Encoding.h"
18 #include "support/docstring.h"
19 #include "support/types.h"
20 
21 namespace lyx {
22 
23 class Buffer;
24 class LaTeXFeatures;
25 
26 class BufferEncodings : public Encodings {
27 public:
28 	/**
29 	 * Initialize mathcmd, textcmd, and mathsym sets.
30 	 */
31 	static void initUnicodeMath(Buffer const & buffer, bool for_master = true);
32 	/**
33 	 * If \p c cannot be encoded in the given \p encoding, convert
34 	 * it to something that LaTeX can understand in mathmode.
35 	 * \p needsTermination indicates whether the command needs to be
36 	 * terminated by {} or a space.
37 	 * \return whether \p command is a mathmode command
38 	 */
39 	static void validate(char_type c, LaTeXFeatures & features, bool for_mathed = false);
40 };
41 
42 } // namespace lyx
43 
44 #endif // BUFFER_ENCODINGS_H
45