]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_font.i
Allow for Cmd-click on wxMac
[wxWidgets.git] / wxPython / src / _font.i
index bd059a236e3e7cbd14e8bc7091c1bece9288f81d..c1d8805762a9e7504de0139664a0c4dfe464e881 100644 (file)
@@ -430,8 +430,14 @@ public:
 %newgroup
 
 
+MustHaveApp(wxFont);
+MustHaveApp(wxFont::GetDefaultEncoding);
+MustHaveApp(wxFont::SetDefaultEncoding);
+
 class wxFont : public wxGDIObject {
 public:
+    %pythonPrepend wxFont   "if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName']"
+
     wxFont( int pointSize, int family, int style, int weight,
             bool underline=False, const wxString& face = wxPyEmptyString,
             wxFontEncoding encoding=wxFONTENCODING_DEFAULT);
@@ -446,10 +452,10 @@ public:
         }
 
         %name(Font2) wxFont(int pointSize,
-                              wxFontFamily family,
-                              int flags = wxFONTFLAG_DEFAULT,
-                              const wxString& face = wxPyEmptyString,
-                              wxFontEncoding encoding = wxFONTENCODING_DEFAULT) {
+                            wxFontFamily family,
+                            int flags = wxFONTFLAG_DEFAULT,
+                            const wxString& face = wxPyEmptyString,
+                            wxFontEncoding encoding = wxFONTENCODING_DEFAULT) {
             return wxFont::New(pointSize, family, flags, face, encoding);
         }
     }
@@ -531,6 +537,8 @@ IMP_PYCALLBACK_BOOL_STRINGSTRING(wxPyFontEnumerator, wxFontEnumerator, OnFontEnc
 
 %}
 
+MustHaveApp(wxPyFontEnumerator);
+
 %name(FontEnumerator) class wxPyFontEnumerator {
 public:
     %pythonAppend wxPyFontEnumerator "self._setCallbackInfo(self, FontEnumerator, 0)"