1. added encoding param to wxFontEncoding::EnumFamilies() which allows to get
the list of families supporting the given encoding 2. added encoding decoding logic to src/gtk/font.cpp so that now choosing an encoding different from default in GTK+ font selector dialog actually works git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4258 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -25,9 +25,15 @@
|
||||
class WXDLLEXPORT wxFontEnumerator
|
||||
{
|
||||
public:
|
||||
// start enumerating font families - will result in OnFontFamily() being
|
||||
// called for each available font family (unless it returns FALSE)
|
||||
virtual bool EnumerateFamilies(bool fixedWidthOnly = FALSE);
|
||||
// start enumerating font families (either all of them or those which
|
||||
// support the given encoding) - will result in OnFontFamily() being
|
||||
// called for each available font family (until they are exhausted or
|
||||
// OnFontFamily returns FALSE)
|
||||
virtual bool EnumerateFamilies
|
||||
(
|
||||
wxFontEncoding encoding = wxFONTENCODING_SYSTEM, // all
|
||||
bool fixedWidthOnly = FALSE
|
||||
);
|
||||
|
||||
// enumerate the different encodings either for given font family or for
|
||||
// all font families - will result in OnFontEncoding() being called for
|
||||
@@ -46,6 +52,9 @@ public:
|
||||
virtual bool OnFontEncoding(const wxString& WXUNUSED(family),
|
||||
const wxString& WXUNUSED(encoding))
|
||||
{ return FALSE; }
|
||||
|
||||
// virtual dtor for the base class
|
||||
virtual ~wxFontEnumerator() { }
|
||||
};
|
||||
|
||||
#endif // _WX_FONTENUM_H_
|
||||
|
@@ -34,6 +34,7 @@ public:
|
||||
virtual int GetMax() const { return m_max; }
|
||||
|
||||
// operations
|
||||
virtual void SetValue(const wxString& value) = 0;
|
||||
virtual void SetValue(int val) = 0;
|
||||
virtual void SetRange(int minVal, int maxVal) = 0;
|
||||
|
||||
@@ -57,7 +58,7 @@ protected:
|
||||
#elif defined(__WXGTK__)
|
||||
#include "wx/gtk/spinctrl.h"
|
||||
#else // Win16 || !Win
|
||||
#include "wx/generic/spinctrl.h"
|
||||
#include "wx/generic/spinctlg.h"
|
||||
#endif // platform
|
||||
|
||||
#endif // _WX_SPINCTRL_H_
|
||||
|
@@ -400,6 +400,13 @@ extern wxNativeFont wxLoadQueryNearestFont(int pointSize,
|
||||
const wxString &facename,
|
||||
wxFontEncoding encoding);
|
||||
|
||||
// fills xencoding and xregistry with the X font spec parts for the given
|
||||
// encoding ('*' if encoding == wxFONTENCODING_SYSTEM) and returns TRUE if any
|
||||
// fonts with this encoding exist or FALSE if it's unknown (it does *not* mean
|
||||
// that they don't exist!)
|
||||
extern bool wxGetXFontEncoding(wxFontEncoding encoding,
|
||||
wxString *xencoding, wxString *xregistry);
|
||||
|
||||
#endif // X || GTK
|
||||
|
||||
#endif // wxUSE_GUI
|
||||
|
Reference in New Issue
Block a user