1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: declares wxNativeEncodingInfo struct
4 // Author: Vadim Zeitlin
6 // Created: 19.09.2003 (extracted from wx/fontenc.h)
8 // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_ENCINFO_H_
13 #define _WX_ENCINFO_H_
15 #include "wx/string.h"
17 // ----------------------------------------------------------------------------
18 // wxNativeEncodingInfo contains all encoding parameters for this platform
19 // ----------------------------------------------------------------------------
21 // This private structure specifies all the parameters needed to create a font
22 // with the given encoding on this platform.
24 // Under X, it contains the last 2 elements of the font specifications
25 // (registry and encoding).
27 // Under Windows, it contains a number which is one of predefined CHARSET_XXX
30 // Under all platforms it also contains a facename string which should be
31 // used, if not empty, to create fonts in this encoding (this is the only way
32 // to create a font of non-standard encoding (like KOI8) under Windows - the
33 // facename specifies the encoding then)
35 struct WXDLLIMPEXP_CORE wxNativeEncodingInfo
37 wxString facename
; // may be empty meaning "any"
38 wxFontEncoding encoding
; // so that we know what this struct represents
40 #if defined(__WXMSW__) || \
41 defined(__WXPM__) || \
42 defined(__WXMAC__) || \
43 defined(__WXCOCOA__) // FIXME: __WXCOCOA__
45 wxNativeEncodingInfo()
47 , encoding(wxFONTENCODING_SYSTEM
)
48 , charset(0) /* ANSI_CHARSET */
52 #elif defined(_WX_X_FONTLIKE)
55 #elif defined(wxHAS_UTF8_FONTS)
56 // ports using UTF-8 for text don't need encoding information for fonts
57 #elif defined(__WXMGL__)
60 #error "Unsupported toolkit"
62 // this struct is saved in config by wxFontMapper, so it should know to
63 // serialise itself (implemented in platform-specific code)
64 bool FromString(const wxString
& s
);
65 wxString
ToString() const;
68 #endif // _WX_ENCINFO_H_