- wxFONTENCODING_ISO8859_1,
- wxFONTENCODING_ISO8859_2,
- wxFONTENCODING_ISO8859_5,
- wxFONTENCODING_ISO8859_7,
- wxFONTENCODING_ISO8859_15,
- wxFONTENCODING_KOI8,
- wxFONTENCODING_KOI8_U,
- wxFONTENCODING_CP1250,
- wxFONTENCODING_CP1251,
- wxFONTENCODING_CP1252,
- };
-
- static const wxString encodingNames[] =
- {
- wxT("Western European (ISO-8859-1)"),
- wxT("Central European (ISO-8859-2)"),
- wxT("Cyrillic (ISO-8859-5)"),
- wxT("Greek (ISO-8859-7)"),
- wxT("Western European with Euro (ISO-8859-15)"),
- wxT("KOI8-R"),
- wxT("KOI8-U"),
- wxT("Windows Central European (CP 1250)"),
- wxT("Windows Cyrillic (CP 1251)"),
- wxT("Windows Western European (CP 1252)"),
- };
-
- int n = wxGetSingleChoiceIndex(wxT("Choose an encoding"), wxT("Font demo"),
- WXSIZEOF(encodingNames),
- encodingNames,
- this);
-
- if ( n != -1 )
+ DoEnumerateFamilies(false, enc);
+ }
+}
+
+void MyFrame::OnSetNativeDesc(wxCommandEvent& WXUNUSED(event))
+{
+ wxString fontInfo = wxGetTextFromUser
+ (
+ wxT("Enter native font string"),
+ wxT("Input font description"),
+ m_canvas->GetTextFont().GetNativeFontInfoDesc(),
+ this
+ );
+ if ( fontInfo.empty() )
+ return; // user clicked "Cancel" - do nothing
+
+ wxFont font;
+ font.SetNativeFontInfo(fontInfo);
+ if ( !font.IsOk() )