virtual void RefreshAll();
virtual void SetItemCount(size_t count);
+ // provide a way to set the default encoding (non-Unicode only)
+ void SetEncoding(wxFontEncoding encoding) { m_fontEncoding = encoding; }
+ wxFontEncoding GetEncoding() { return m_fontEncoding; }
#if wxUSE_FILESYSTEM
// retrieve the file system used by the wxHtmlWinParser: if you use
// HTML parser we use
wxHtmlWinParser *m_htmlParser;
+ // font encoding (used in non-Unicode mode only)
+ wxFontEncoding m_fontEncoding;
+
#if wxUSE_FILESYSTEM
// file system used by m_htmlParser
wxFileSystem m_filesystem;
virtual wxString OnGetItem(size_t n) const
{ return m_items[n]; }
- wxArrayString m_items;
- wxArrayPtrVoid m_HTMLclientData;
+ wxArrayString m_items;
+ wxArrayPtrVoid m_HTMLclientData;
+
// Note: For the benefit of old compilers (like gcc-2.8) this should
// not be named m_clientdata as that clashes with the name of an
// anonymous struct member in wxEvtHandler, which we derive from.
m_htmlParser = NULL;
m_htmlRendStyle = new wxHtmlListBoxStyle(*this);
m_cache = new wxHtmlListBoxCache;
+ m_fontEncoding = wxFONTENCODING_ISO8859_1;
}
bool wxHtmlListBox::Create(wxWindow *parent,
self->m_htmlParser = new wxHtmlWinParser(self);
m_htmlParser->SetDC(new wxClientDC(self));
m_htmlParser->SetFS(&self->m_filesystem);
-
+#if !wxUSE_UNICODE
+ m_htmlParser->SetInputEncoding(m_fontEncoding);
+#endif
// use system's default GUI font by default:
m_htmlParser->SetStandardFonts();
}