]> git.saurik.com Git - wxWidgets.git/blame - include/wx/encinfo.h
Somehow, setting a tint color makes gauge work :/.
[wxWidgets.git] / include / wx / encinfo.h
CommitLineData
48f9e810
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: wx/encinfo.h
3// Purpose: declares wxNativeEncodingInfo struct
4// Author: Vadim Zeitlin
5// Modified by:
6// Created: 19.09.2003 (extracted from wx/fontenc.h)
77ffb593 7// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwidgets.org>
65571936 8// Licence: wxWindows licence
48f9e810
VZ
9///////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_ENCINFO_H_
12#define _WX_ENCINFO_H_
13
14#include "wx/string.h"
15
16// ----------------------------------------------------------------------------
17// wxNativeEncodingInfo contains all encoding parameters for this platform
18// ----------------------------------------------------------------------------
19
20// This private structure specifies all the parameters needed to create a font
21// with the given encoding on this platform.
22//
23// Under X, it contains the last 2 elements of the font specifications
24// (registry and encoding).
25//
26// Under Windows, it contains a number which is one of predefined CHARSET_XXX
27// values.
28//
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)
33
53a2db12 34struct WXDLLIMPEXP_CORE wxNativeEncodingInfo
48f9e810
VZ
35{
36 wxString facename; // may be empty meaning "any"
37 wxFontEncoding encoding; // so that we know what this struct represents
38
d22004c4
WS
39#if defined(__WXMSW__) || \
40 defined(__WXPM__) || \
41 defined(__WXMAC__) || \
42 defined(__WXCOCOA__) // FIXME: __WXCOCOA__
43
48f9e810
VZ
44 wxNativeEncodingInfo()
45 : facename()
46 , encoding(wxFONTENCODING_SYSTEM)
47 , charset(0) /* ANSI_CHARSET */
48 { }
49
50 int charset;
51#elif defined(_WX_X_FONTLIKE)
52 wxString xregistry,
53 xencoding;
c3a58b24
VS
54#elif defined(wxHAS_UTF8_FONTS)
55 // ports using UTF-8 for text don't need encoding information for fonts
48f9e810
VZ
56#else
57 #error "Unsupported toolkit"
58#endif
48f9e810
VZ
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;
63};
64
65#endif // _WX_ENCINFO_H_
66