1//--------------------------------------------------------------------------- 2// This file is generated by wxPython's SIP generator. Do not edit by hand. 3// 4// Copyright: (c) 2018 by Total Control Software 5// License: wxWindows License 6// 7// This file will be included by _core.sip 8// 9//--------------------------------------------------------------------------- 10 11//--------------------------------------------------------------------------- 12 13class wxFontMapper 14{ 15 %Docstring 16 FontMapper() 17 18 wxFontMapper manages user-definable correspondence between logical 19 font names and the fonts present on the machine. 20 %End 21 %TypeHeaderCode 22 #include <wx/fontmap.h> 23 %End 24 25public: 26 wxFontMapper(); 27 28 virtual 29 ~wxFontMapper(); 30 31 bool GetAltForEncoding( 32 wxFontEncoding encoding, 33 wxFontEncoding * alt_encoding /Out/, 34 const wxString & facename = wxEmptyString, 35 bool interactive = true 36 ); 37 %Docstring 38 GetAltForEncoding(encoding, facename=EmptyString, interactive=True) -> (bool, alt_encoding) 39 40 Find an alternative for the given encoding (which is supposed to not 41 be available on this system). 42 %End 43 44 virtual 45 wxFontEncoding CharsetToEncoding( 46 const wxString & charset, 47 bool interactive = true 48 ); 49 %Docstring 50 CharsetToEncoding(charset, interactive=True) -> FontEncoding 51 52 Returns the encoding for the given charset (in the form of RFC 2046) 53 or wxFONTENCODING_SYSTEM if couldn't decode it. 54 %End 55 56 virtual 57 bool IsEncodingAvailable( 58 wxFontEncoding encoding, 59 const wxString & facename = wxEmptyString 60 ); 61 %Docstring 62 IsEncodingAvailable(encoding, facename=EmptyString) -> bool 63 64 Check whether given encoding is available in given face or not. 65 %End 66 67 void SetConfigPath( 68 const wxString & prefix 69 ); 70 %Docstring 71 SetConfigPath(prefix) 72 73 Set the root config path to use (should be an absolute path). 74 %End 75 76 void SetDialogParent( 77 wxWindow * parent 78 ); 79 %Docstring 80 SetDialogParent(parent) 81 82 The parent window for modal dialogs. 83 %End 84 85 void SetDialogTitle( 86 const wxString & title 87 ); 88 %Docstring 89 SetDialogTitle(title) 90 91 The title for the dialogs (note that default is quite reasonable). 92 %End 93 94 static 95 wxFontMapper * Get(); 96 %Docstring 97 Get() -> FontMapper 98 99 Get the current font mapper object. 100 %End 101 102 static wxArrayString* GetAllEncodingNames(wxFontEncoding encoding); 103 %Docstring 104 GetAllEncodingNames(encoding) -> ArrayString 105 106 Returns the array of all possible names for the given encoding. If it 107 isn't empty, the first name in it is the canonical encoding name, 108 i.e. the same string as returned by GetEncodingName() 109 %End 110 %MethodCode 111 PyErr_Clear(); 112 Py_BEGIN_ALLOW_THREADS 113 sipRes = _wxFontMapper_GetAllEncodingNames(encoding); 114 Py_END_ALLOW_THREADS 115 if (PyErr_Occurred()) sipIsErr = 1; 116 %End 117 %TypeCode 118 wxArrayString* _wxFontMapper_GetAllEncodingNames(wxFontEncoding encoding) 119 { 120 wxArrayString* sArr = new wxArrayString; 121 const wxChar** cArr = wxFontMapper::GetAllEncodingNames(encoding); 122 if (cArr) { 123 for (int idx=0; cArr[idx]; idx+=1) 124 sArr->Add(cArr[idx]); 125 } 126 return sArr; 127 } 128 %End 129 130 static 131 wxFontEncoding GetEncoding( 132 size_t n 133 ); 134 %Docstring 135 GetEncoding(n) -> FontEncoding 136 137 Returns the n-th supported encoding. 138 %End 139 140 static 141 wxString GetEncodingDescription( 142 wxFontEncoding encoding 143 ); 144 %Docstring 145 GetEncodingDescription(encoding) -> String 146 147 Return user-readable string describing the given encoding. 148 %End 149 150 static 151 wxFontEncoding GetEncodingFromName( 152 const wxString & encoding 153 ); 154 %Docstring 155 GetEncodingFromName(encoding) -> FontEncoding 156 157 Return the encoding corresponding to the given internal name. 158 %End 159 160 static 161 wxString GetEncodingName( 162 wxFontEncoding encoding 163 ); 164 %Docstring 165 GetEncodingName(encoding) -> String 166 167 Return internal string identifier for the encoding (see also 168 wxFontMapper::GetEncodingDescription). 169 %End 170 171 static 172 size_t GetSupportedEncodingsCount(); 173 %Docstring 174 GetSupportedEncodingsCount() -> size_t 175 176 Returns the number of the font encodings supported by this class. 177 %End 178 179 static 180 wxFontMapper * Set( 181 wxFontMapper * mapper 182 ); 183 %Docstring 184 Set(mapper) -> FontMapper 185 186 Set the current font mapper object and return previous one (may be 187 NULL). 188 %End 189 190 private: 191 wxFontMapper(const wxFontMapper&); 192 193 194 public: 195 196 197}; // end of class wxFontMapper 198 199 200 201//--------------------------------------------------------------------------- 202 203