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