From a97cefbabff29c566c0859d3e735c79a6f3032b6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 12 May 2005 17:21:09 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34030 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/gtk/_gdi.py | 291 ++++++++++++++++++++++++++---- wxPython/src/gtk/_gdi_wrap.cpp | 24 +-- wxPython/src/gtk/media_wrap.cpp | 2 +- wxPython/src/mac/_gdi.py | 306 ++++++++++++++++++++++++++++---- wxPython/src/mac/_gdi_wrap.cpp | 101 +++++++++-- wxPython/src/mac/_misc.py | 9 + wxPython/src/mac/_misc_wrap.cpp | 197 +++++++++++--------- wxPython/src/mac/media_wrap.cpp | 2 +- wxPython/src/msw/_gdi.py | 306 ++++++++++++++++++++++++++++---- wxPython/src/msw/_gdi_wrap.cpp | 101 +++++++++-- wxPython/src/msw/_misc.py | 9 + wxPython/src/msw/_misc_wrap.cpp | 197 +++++++++++--------- wxPython/src/msw/media_wrap.cpp | 2 +- 13 files changed, 1234 insertions(+), 313 deletions(-) diff --git a/wxPython/src/gtk/_gdi.py b/wxPython/src/gtk/_gdi.py index 51f8c3785a..fb4aae59d2 100644 --- a/wxPython/src/gtk/_gdi.py +++ b/wxPython/src/gtk/_gdi.py @@ -1669,7 +1669,13 @@ def FontMapper_GetDefaultConfigPath(*args, **kwargs): #--------------------------------------------------------------------------- class Font(GDIObject): - """Proxy of C++ Font class""" + """ + A font is an object which determines the appearance of text. Fonts are + used for drawing text to a device context, and setting the appearance + of a window's text. + + You can retrieve the current system font settings with `wx.SystemSettings`. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1677,6 +1683,35 @@ class Font(GDIObject): __init__(self, int pointSize, int family, int style, int weight, bool underline=False, String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + Creates a font object with the specified attributes. + + :param pointSize: The size of the font in points. + + :param family: Font family. A generic way of referring to fonts + without specifying actual facename. It can be One of + the ``wx.FONTFAMILY_xxx`` constants. + + :param style: One of the ``wx.FONTSTYLE_xxx`` constants. + + :param weight: Font weight, sometimes also referred to as font + boldness. One of the ``wx.FONTWEIGHT_xxx`` constants. + + :param underline: The value can be ``True`` or ``False`` and + indicates whether the font will include an underline. This + may not be supported on all platforms. + + :param face: An optional string specifying the actual typeface to + be used. If it is an empty string, a default typeface will be + chosen based on the family. + + :param encoding: An encoding which may be one of the + ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't + available, no font is created. + + :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`, + `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo` + """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] newobj = _gdi_.new_Font(*args, **kwargs) @@ -1690,7 +1725,11 @@ class Font(GDIObject): except: pass def Ok(*args, **kwargs): - """Ok(self) -> bool""" + """ + Ok(self) -> bool + + Returns ``True`` if this font was successfully created. + """ return _gdi_.Font_Ok(*args, **kwargs) def __nonzero__(self): return self.Ok() @@ -1703,111 +1742,234 @@ class Font(GDIObject): return _gdi_.Font___ne__(*args, **kwargs) def GetPointSize(*args, **kwargs): - """GetPointSize(self) -> int""" + """ + GetPointSize(self) -> int + + Gets the point size. + """ return _gdi_.Font_GetPointSize(*args, **kwargs) def GetPixelSize(*args, **kwargs): - """GetPixelSize(self) -> Size""" + """ + GetPixelSize(self) -> Size + + Returns the size in pixels if the font was constructed with a pixel + size. + """ return _gdi_.Font_GetPixelSize(*args, **kwargs) def IsUsingSizeInPixels(*args, **kwargs): - """IsUsingSizeInPixels(self) -> bool""" + """ + IsUsingSizeInPixels(self) -> bool + + Returns ``True`` if the font is using a pixelSize. + """ return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs) def GetFamily(*args, **kwargs): - """GetFamily(self) -> int""" + """ + GetFamily(self) -> int + + Gets the font family. + """ return _gdi_.Font_GetFamily(*args, **kwargs) def GetStyle(*args, **kwargs): - """GetStyle(self) -> int""" + """ + GetStyle(self) -> int + + Gets the font style. + """ return _gdi_.Font_GetStyle(*args, **kwargs) def GetWeight(*args, **kwargs): - """GetWeight(self) -> int""" + """ + GetWeight(self) -> int + + Gets the font weight. + """ return _gdi_.Font_GetWeight(*args, **kwargs) def GetUnderlined(*args, **kwargs): - """GetUnderlined(self) -> bool""" + """ + GetUnderlined(self) -> bool + + Returns ``True`` if the font is underlined, ``False`` otherwise. + """ return _gdi_.Font_GetUnderlined(*args, **kwargs) def GetFaceName(*args, **kwargs): - """GetFaceName(self) -> String""" + """ + GetFaceName(self) -> String + + Returns the typeface name associated with the font, or the empty + string if there is no typeface information. + """ return _gdi_.Font_GetFaceName(*args, **kwargs) def GetEncoding(*args, **kwargs): - """GetEncoding(self) -> int""" + """ + GetEncoding(self) -> int + + Get the font's encoding. + """ return _gdi_.Font_GetEncoding(*args, **kwargs) def GetNativeFontInfo(*args, **kwargs): - """GetNativeFontInfo(self) -> NativeFontInfo""" + """ + GetNativeFontInfo(self) -> NativeFontInfo + + Constructs a `wx.NativeFontInfo` object from this font. + """ return _gdi_.Font_GetNativeFontInfo(*args, **kwargs) def IsFixedWidth(*args, **kwargs): - """IsFixedWidth(self) -> bool""" + """ + IsFixedWidth(self) -> bool + + Returns true if the font is a fixed width (or monospaced) font, false + if it is a proportional one or font is invalid. + """ return _gdi_.Font_IsFixedWidth(*args, **kwargs) def GetNativeFontInfoDesc(*args, **kwargs): - """GetNativeFontInfoDesc(self) -> String""" + """ + GetNativeFontInfoDesc(self) -> String + + Returns the platform-dependent string completely describing this font + or an empty string if the font isn't valid. + """ return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs) def GetNativeFontInfoUserDesc(*args, **kwargs): - """GetNativeFontInfoUserDesc(self) -> String""" + """ + GetNativeFontInfoUserDesc(self) -> String + + Returns a human readable version of `GetNativeFontInfoDesc`. + """ return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs) def SetPointSize(*args, **kwargs): - """SetPointSize(self, int pointSize)""" + """ + SetPointSize(self, int pointSize) + + Sets the point size. + """ return _gdi_.Font_SetPointSize(*args, **kwargs) def SetPixelSize(*args, **kwargs): - """SetPixelSize(self, Size pixelSize)""" + """ + SetPixelSize(self, Size pixelSize) + + Sets the size in pixels rather than points. If there is platform API + support for this then it is used, otherwise a font with the closest + size is found using a binary search. + """ return _gdi_.Font_SetPixelSize(*args, **kwargs) def SetFamily(*args, **kwargs): - """SetFamily(self, int family)""" + """ + SetFamily(self, int family) + + Sets the font family. + """ return _gdi_.Font_SetFamily(*args, **kwargs) def SetStyle(*args, **kwargs): - """SetStyle(self, int style)""" + """ + SetStyle(self, int style) + + Sets the font style. + """ return _gdi_.Font_SetStyle(*args, **kwargs) def SetWeight(*args, **kwargs): - """SetWeight(self, int weight)""" + """ + SetWeight(self, int weight) + + Sets the font weight. + """ return _gdi_.Font_SetWeight(*args, **kwargs) def SetFaceName(*args, **kwargs): - """SetFaceName(self, String faceName)""" + """ + SetFaceName(self, String faceName) + + Sets the facename for the font. The facename, which should be a valid + font installed on the end-user's system. + + To avoid portability problems, don't rely on a specific face, but + specify the font family instead or as well. A suitable font will be + found on the end-user's system. If both the family and the facename + are specified, wxWidgets will first search for the specific face, and + then for a font belonging to the same family. + """ return _gdi_.Font_SetFaceName(*args, **kwargs) def SetUnderlined(*args, **kwargs): - """SetUnderlined(self, bool underlined)""" + """ + SetUnderlined(self, bool underlined) + + Sets underlining. + """ return _gdi_.Font_SetUnderlined(*args, **kwargs) def SetEncoding(*args, **kwargs): - """SetEncoding(self, int encoding)""" + """ + SetEncoding(self, int encoding) + + Set the font encoding. + """ return _gdi_.Font_SetEncoding(*args, **kwargs) def SetNativeFontInfo(*args, **kwargs): - """SetNativeFontInfo(self, NativeFontInfo info)""" + """ + SetNativeFontInfo(self, NativeFontInfo info) + + Set the font's attributes from a `wx.NativeFontInfo` object. + """ return _gdi_.Font_SetNativeFontInfo(*args, **kwargs) def SetNativeFontInfoFromString(*args, **kwargs): - """SetNativeFontInfoFromString(self, String info)""" + """ + SetNativeFontInfoFromString(self, String info) + + Set the font's attributes from string representation of a + `wx.NativeFontInfo` object. + """ return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs) def SetNativeFontInfoUserDesc(*args, **kwargs): - """SetNativeFontInfoUserDesc(self, String info)""" + """ + SetNativeFontInfoUserDesc(self, String info) + + Set the font's attributes from a string formerly returned from + `GetNativeFontInfoDesc`. + """ return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs) def GetFamilyString(*args, **kwargs): - """GetFamilyString(self) -> String""" + """ + GetFamilyString(self) -> String + + Returns a string representation of the font family. + """ return _gdi_.Font_GetFamilyString(*args, **kwargs) def GetStyleString(*args, **kwargs): - """GetStyleString(self) -> String""" + """ + GetStyleString(self) -> String + + Returns a string representation of the font style. + """ return _gdi_.Font_GetStyleString(*args, **kwargs) def GetWeightString(*args, **kwargs): - """GetWeightString(self) -> String""" + """ + GetWeightString(self) -> String + + Return a string representation of the font weight. + """ return _gdi_.Font_GetWeightString(*args, **kwargs) def SetNoAntiAliasing(*args, **kwargs): @@ -1819,12 +1981,21 @@ class Font(GDIObject): return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs) def GetDefaultEncoding(*args, **kwargs): - """GetDefaultEncoding() -> int""" + """ + GetDefaultEncoding() -> int + + Returns the encoding used for all fonts created with an encoding of + ``wx.FONTENCODING_DEFAULT``. + """ return _gdi_.Font_GetDefaultEncoding(*args, **kwargs) GetDefaultEncoding = staticmethod(GetDefaultEncoding) def SetDefaultEncoding(*args, **kwargs): - """SetDefaultEncoding(int encoding)""" + """ + SetDefaultEncoding(int encoding) + + Sets the default font encoding. + """ return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) SetDefaultEncoding = staticmethod(SetDefaultEncoding) @@ -1837,14 +2008,23 @@ class FontPtr(Font): _gdi_.Font_swigregister(FontPtr) def FontFromNativeInfo(*args, **kwargs): - """FontFromNativeInfo(NativeFontInfo info) -> Font""" + """ + FontFromNativeInfo(NativeFontInfo info) -> Font + + Construct a `wx.Font` from a `wx.NativeFontInfo` object. + """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FontFromNativeInfo(*args, **kwargs) val.thisown = 1 return val def FontFromNativeInfoString(*args, **kwargs): - """FontFromNativeInfoString(String info) -> Font""" + """ + FontFromNativeInfoString(String info) -> Font + + Construct a `wx.Font` from the string representation of a + `wx.NativeFontInfo` object. + """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs) val.thisown = 1 @@ -1854,6 +2034,24 @@ def FFont(*args, **kwargs): """ FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT, String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + A bit of a simpler way to create a `wx.Font` using flags instead of + individual attribute settings. The value of flags can be a + combination of the following: + + ============================ == + wx.FONTFLAG_DEFAULT + wx.FONTFLAG_ITALIC + wx.FONTFLAG_SLANT + wx.FONTFLAG_LIGHT + wx.FONTFLAG_BOLD + wx.FONTFLAG_ANTIALIASED + wx.FONTFLAG_NOT_ANTIALIASED + wx.FONTFLAG_UNDERLINED + wx.FONTFLAG_STRIKETHROUGH + ============================ == + + :see: `wx.Font.__init__` """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FFont(*args, **kwargs) @@ -1865,6 +2063,12 @@ def FontFromPixelSize(*args, **kwargs): FontFromPixelSize(Size pixelSize, int family, int style, int weight, bool underlined=False, String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + Creates a font using a size in pixels rather than points. If there is + platform API support for this then it is used, otherwise a font with + the closest size is found using a binary search. + + :see: `wx.Font.__init__` """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FontFromPixelSize(*args, **kwargs) @@ -1875,6 +2079,12 @@ def FFontFromPixelSize(*args, **kwargs): """ FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT, String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + Creates a font using a size in pixels rather than points. If there is + platform API support for this then it is used, otherwise a font with + the closest size is found using a binary search. + + :see: `wx.Font.__init__`, `wx.FFont` """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FFontFromPixelSize(*args, **kwargs) @@ -1882,14 +2092,23 @@ def FFontFromPixelSize(*args, **kwargs): return val def Font_GetDefaultEncoding(*args, **kwargs): - """Font_GetDefaultEncoding() -> int""" + """ + Font_GetDefaultEncoding() -> int + + Returns the encoding used for all fonts created with an encoding of + ``wx.FONTENCODING_DEFAULT``. + """ return _gdi_.Font_GetDefaultEncoding(*args, **kwargs) def Font_SetDefaultEncoding(*args, **kwargs): - """Font_SetDefaultEncoding(int encoding)""" + """ + Font_SetDefaultEncoding(int encoding) + + Sets the default font encoding. + """ return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) -Font2 = wx._deprecated(FFont, "Use `FFont` instead.") +Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.") #--------------------------------------------------------------------------- class FontEnumerator(object): diff --git a/wxPython/src/gtk/_gdi_wrap.cpp b/wxPython/src/gtk/_gdi_wrap.cpp index cd4177fca6..5d16da0566 100644 --- a/wxPython/src/gtk/_gdi_wrap.cpp +++ b/wxPython/src/gtk/_gdi_wrap.cpp @@ -1918,21 +1918,21 @@ static PyObject *wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncodin } } static wxFont *new_wxFont(wxString const &info){ - wxNativeFontInfo nfi; - nfi.FromString(info); - return new wxFont(nfi); - } + wxNativeFontInfo nfi; + nfi.FromString(info); + return new wxFont(nfi); + } static wxFont *new_wxFont(int pointSize,wxFontFamily family,int flags=wxFONTFLAG_DEFAULT,wxString const &face=wxPyEmptyString,wxFontEncoding encoding=wxFONTENCODING_DEFAULT){ - return wxFont::New(pointSize, family, flags, face, encoding); - } + return wxFont::New(pointSize, family, flags, face, encoding); + } static wxFont *new_wxFont(wxSize const &pixelSize,int family,int style,int weight,bool underlined=false,wxString const &face=wxEmptyString,wxFontEncoding encoding=wxFONTENCODING_DEFAULT){ - return wxFontBase::New(pixelSize, family, - style, weight, underlined, - face, encoding); - } + return wxFontBase::New(pixelSize, family, + style, weight, underlined, + face, encoding); + } static wxFont *new_wxFont(wxSize const &pixelSize,wxFontFamily family,int flags=wxFONTFLAG_DEFAULT,wxString const &face=wxEmptyString,wxFontEncoding encoding=wxFONTENCODING_DEFAULT){ - return wxFontBase::New(pixelSize, family, flags, face, encoding); - } + return wxFontBase::New(pixelSize, family, flags, face, encoding); + } static bool wxFont___eq__(wxFont *self,wxFont const *other){ return other ? (*self == *other) : false; } static bool wxFont___ne__(wxFont *self,wxFont const *other){ return other ? (*self != *other) : true; } diff --git a/wxPython/src/gtk/media_wrap.cpp b/wxPython/src/gtk/media_wrap.cpp index ff571e4e12..9dd67b4079 100644 --- a/wxPython/src/gtk/media_wrap.cpp +++ b/wxPython/src/gtk/media_wrap.cpp @@ -1398,7 +1398,7 @@ public: class wxMediaCtrl : public wxControl { public: - wxMediaCtrl() { wxPyRaiseNotImplemented(); } + wxMediaCtrl() { wxPyRaiseNotImplemented(); } wxMediaCtrl(wxWindow* , wxWindowID , const wxString& , diff --git a/wxPython/src/mac/_gdi.py b/wxPython/src/mac/_gdi.py index 64aba87097..048e6b2c30 100644 --- a/wxPython/src/mac/_gdi.py +++ b/wxPython/src/mac/_gdi.py @@ -1669,7 +1669,13 @@ def FontMapper_GetDefaultConfigPath(*args, **kwargs): #--------------------------------------------------------------------------- class Font(GDIObject): - """Proxy of C++ Font class""" + """ + A font is an object which determines the appearance of text. Fonts are + used for drawing text to a device context, and setting the appearance + of a window's text. + + You can retrieve the current system font settings with `wx.SystemSettings`. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1677,6 +1683,35 @@ class Font(GDIObject): __init__(self, int pointSize, int family, int style, int weight, bool underline=False, String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + Creates a font object with the specified attributes. + + :param pointSize: The size of the font in points. + + :param family: Font family. A generic way of referring to fonts + without specifying actual facename. It can be One of + the ``wx.FONTFAMILY_xxx`` constants. + + :param style: One of the ``wx.FONTSTYLE_xxx`` constants. + + :param weight: Font weight, sometimes also referred to as font + boldness. One of the ``wx.FONTWEIGHT_xxx`` constants. + + :param underline: The value can be ``True`` or ``False`` and + indicates whether the font will include an underline. This + may not be supported on all platforms. + + :param face: An optional string specifying the actual typeface to + be used. If it is an empty string, a default typeface will be + chosen based on the family. + + :param encoding: An encoding which may be one of the + ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't + available, no font is created. + + :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`, + `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo` + """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] newobj = _gdi_.new_Font(*args, **kwargs) @@ -1690,7 +1725,11 @@ class Font(GDIObject): except: pass def Ok(*args, **kwargs): - """Ok(self) -> bool""" + """ + Ok(self) -> bool + + Returns ``True`` if this font was successfully created. + """ return _gdi_.Font_Ok(*args, **kwargs) def __nonzero__(self): return self.Ok() @@ -1703,111 +1742,234 @@ class Font(GDIObject): return _gdi_.Font___ne__(*args, **kwargs) def GetPointSize(*args, **kwargs): - """GetPointSize(self) -> int""" + """ + GetPointSize(self) -> int + + Gets the point size. + """ return _gdi_.Font_GetPointSize(*args, **kwargs) def GetPixelSize(*args, **kwargs): - """GetPixelSize(self) -> Size""" + """ + GetPixelSize(self) -> Size + + Returns the size in pixels if the font was constructed with a pixel + size. + """ return _gdi_.Font_GetPixelSize(*args, **kwargs) def IsUsingSizeInPixels(*args, **kwargs): - """IsUsingSizeInPixels(self) -> bool""" + """ + IsUsingSizeInPixels(self) -> bool + + Returns ``True`` if the font is using a pixelSize. + """ return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs) def GetFamily(*args, **kwargs): - """GetFamily(self) -> int""" + """ + GetFamily(self) -> int + + Gets the font family. + """ return _gdi_.Font_GetFamily(*args, **kwargs) def GetStyle(*args, **kwargs): - """GetStyle(self) -> int""" + """ + GetStyle(self) -> int + + Gets the font style. + """ return _gdi_.Font_GetStyle(*args, **kwargs) def GetWeight(*args, **kwargs): - """GetWeight(self) -> int""" + """ + GetWeight(self) -> int + + Gets the font weight. + """ return _gdi_.Font_GetWeight(*args, **kwargs) def GetUnderlined(*args, **kwargs): - """GetUnderlined(self) -> bool""" + """ + GetUnderlined(self) -> bool + + Returns ``True`` if the font is underlined, ``False`` otherwise. + """ return _gdi_.Font_GetUnderlined(*args, **kwargs) def GetFaceName(*args, **kwargs): - """GetFaceName(self) -> String""" + """ + GetFaceName(self) -> String + + Returns the typeface name associated with the font, or the empty + string if there is no typeface information. + """ return _gdi_.Font_GetFaceName(*args, **kwargs) def GetEncoding(*args, **kwargs): - """GetEncoding(self) -> int""" + """ + GetEncoding(self) -> int + + Get the font's encoding. + """ return _gdi_.Font_GetEncoding(*args, **kwargs) def GetNativeFontInfo(*args, **kwargs): - """GetNativeFontInfo(self) -> NativeFontInfo""" + """ + GetNativeFontInfo(self) -> NativeFontInfo + + Constructs a `wx.NativeFontInfo` object from this font. + """ return _gdi_.Font_GetNativeFontInfo(*args, **kwargs) def IsFixedWidth(*args, **kwargs): - """IsFixedWidth(self) -> bool""" + """ + IsFixedWidth(self) -> bool + + Returns true if the font is a fixed width (or monospaced) font, false + if it is a proportional one or font is invalid. + """ return _gdi_.Font_IsFixedWidth(*args, **kwargs) def GetNativeFontInfoDesc(*args, **kwargs): - """GetNativeFontInfoDesc(self) -> String""" + """ + GetNativeFontInfoDesc(self) -> String + + Returns the platform-dependent string completely describing this font + or an empty string if the font isn't valid. + """ return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs) def GetNativeFontInfoUserDesc(*args, **kwargs): - """GetNativeFontInfoUserDesc(self) -> String""" + """ + GetNativeFontInfoUserDesc(self) -> String + + Returns a human readable version of `GetNativeFontInfoDesc`. + """ return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs) def SetPointSize(*args, **kwargs): - """SetPointSize(self, int pointSize)""" + """ + SetPointSize(self, int pointSize) + + Sets the point size. + """ return _gdi_.Font_SetPointSize(*args, **kwargs) def SetPixelSize(*args, **kwargs): - """SetPixelSize(self, Size pixelSize)""" + """ + SetPixelSize(self, Size pixelSize) + + Sets the size in pixels rather than points. If there is platform API + support for this then it is used, otherwise a font with the closest + size is found using a binary search. + """ return _gdi_.Font_SetPixelSize(*args, **kwargs) def SetFamily(*args, **kwargs): - """SetFamily(self, int family)""" + """ + SetFamily(self, int family) + + Sets the font family. + """ return _gdi_.Font_SetFamily(*args, **kwargs) def SetStyle(*args, **kwargs): - """SetStyle(self, int style)""" + """ + SetStyle(self, int style) + + Sets the font style. + """ return _gdi_.Font_SetStyle(*args, **kwargs) def SetWeight(*args, **kwargs): - """SetWeight(self, int weight)""" + """ + SetWeight(self, int weight) + + Sets the font weight. + """ return _gdi_.Font_SetWeight(*args, **kwargs) def SetFaceName(*args, **kwargs): - """SetFaceName(self, String faceName)""" + """ + SetFaceName(self, String faceName) + + Sets the facename for the font. The facename, which should be a valid + font installed on the end-user's system. + + To avoid portability problems, don't rely on a specific face, but + specify the font family instead or as well. A suitable font will be + found on the end-user's system. If both the family and the facename + are specified, wxWidgets will first search for the specific face, and + then for a font belonging to the same family. + """ return _gdi_.Font_SetFaceName(*args, **kwargs) def SetUnderlined(*args, **kwargs): - """SetUnderlined(self, bool underlined)""" + """ + SetUnderlined(self, bool underlined) + + Sets underlining. + """ return _gdi_.Font_SetUnderlined(*args, **kwargs) def SetEncoding(*args, **kwargs): - """SetEncoding(self, int encoding)""" + """ + SetEncoding(self, int encoding) + + Set the font encoding. + """ return _gdi_.Font_SetEncoding(*args, **kwargs) def SetNativeFontInfo(*args, **kwargs): - """SetNativeFontInfo(self, NativeFontInfo info)""" + """ + SetNativeFontInfo(self, NativeFontInfo info) + + Set the font's attributes from a `wx.NativeFontInfo` object. + """ return _gdi_.Font_SetNativeFontInfo(*args, **kwargs) def SetNativeFontInfoFromString(*args, **kwargs): - """SetNativeFontInfoFromString(self, String info)""" + """ + SetNativeFontInfoFromString(self, String info) + + Set the font's attributes from string representation of a + `wx.NativeFontInfo` object. + """ return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs) def SetNativeFontInfoUserDesc(*args, **kwargs): - """SetNativeFontInfoUserDesc(self, String info)""" + """ + SetNativeFontInfoUserDesc(self, String info) + + Set the font's attributes from a string formerly returned from + `GetNativeFontInfoDesc`. + """ return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs) def GetFamilyString(*args, **kwargs): - """GetFamilyString(self) -> String""" + """ + GetFamilyString(self) -> String + + Returns a string representation of the font family. + """ return _gdi_.Font_GetFamilyString(*args, **kwargs) def GetStyleString(*args, **kwargs): - """GetStyleString(self) -> String""" + """ + GetStyleString(self) -> String + + Returns a string representation of the font style. + """ return _gdi_.Font_GetStyleString(*args, **kwargs) def GetWeightString(*args, **kwargs): - """GetWeightString(self) -> String""" + """ + GetWeightString(self) -> String + + Return a string representation of the font weight. + """ return _gdi_.Font_GetWeightString(*args, **kwargs) def SetNoAntiAliasing(*args, **kwargs): @@ -1819,12 +1981,21 @@ class Font(GDIObject): return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs) def GetDefaultEncoding(*args, **kwargs): - """GetDefaultEncoding() -> int""" + """ + GetDefaultEncoding() -> int + + Returns the encoding used for all fonts created with an encoding of + ``wx.FONTENCODING_DEFAULT``. + """ return _gdi_.Font_GetDefaultEncoding(*args, **kwargs) GetDefaultEncoding = staticmethod(GetDefaultEncoding) def SetDefaultEncoding(*args, **kwargs): - """SetDefaultEncoding(int encoding)""" + """ + SetDefaultEncoding(int encoding) + + Sets the default font encoding. + """ return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) SetDefaultEncoding = staticmethod(SetDefaultEncoding) @@ -1837,26 +2008,53 @@ class FontPtr(Font): _gdi_.Font_swigregister(FontPtr) def FontFromNativeInfo(*args, **kwargs): - """FontFromNativeInfo(NativeFontInfo info) -> Font""" + """ + FontFromNativeInfo(NativeFontInfo info) -> Font + + Construct a `wx.Font` from a `wx.NativeFontInfo` object. + """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FontFromNativeInfo(*args, **kwargs) val.thisown = 1 return val def FontFromNativeInfoString(*args, **kwargs): - """FontFromNativeInfoString(String info) -> Font""" + """ + FontFromNativeInfoString(String info) -> Font + + Construct a `wx.Font` from the string representation of a + `wx.NativeFontInfo` object. + """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs) val.thisown = 1 return val -def Font2(*args, **kwargs): +def FFont(*args, **kwargs): """ - Font2(int pointSize, int family, int flags=FONTFLAG_DEFAULT, + FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT, String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + A bit of a simpler way to create a `wx.Font` using flags instead of + individual attribute settings. The value of flags can be a + combination of the following: + + ============================ == + wx.FONTFLAG_DEFAULT + wx.FONTFLAG_ITALIC + wx.FONTFLAG_SLANT + wx.FONTFLAG_LIGHT + wx.FONTFLAG_BOLD + wx.FONTFLAG_ANTIALIASED + wx.FONTFLAG_NOT_ANTIALIASED + wx.FONTFLAG_UNDERLINED + wx.FONTFLAG_STRIKETHROUGH + ============================ == + + :see: `wx.Font.__init__` """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] - val = _gdi_.new_Font2(*args, **kwargs) + val = _gdi_.new_FFont(*args, **kwargs) val.thisown = 1 return val @@ -1865,20 +2063,52 @@ def FontFromPixelSize(*args, **kwargs): FontFromPixelSize(Size pixelSize, int family, int style, int weight, bool underlined=False, String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + Creates a font using a size in pixels rather than points. If there is + platform API support for this then it is used, otherwise a font with + the closest size is found using a binary search. + + :see: `wx.Font.__init__` """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FontFromPixelSize(*args, **kwargs) val.thisown = 1 return val +def FFontFromPixelSize(*args, **kwargs): + """ + FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT, + String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + Creates a font using a size in pixels rather than points. If there is + platform API support for this then it is used, otherwise a font with + the closest size is found using a binary search. + + :see: `wx.Font.__init__`, `wx.FFont` + """ + if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] + val = _gdi_.new_FFontFromPixelSize(*args, **kwargs) + val.thisown = 1 + return val + def Font_GetDefaultEncoding(*args, **kwargs): - """Font_GetDefaultEncoding() -> int""" + """ + Font_GetDefaultEncoding() -> int + + Returns the encoding used for all fonts created with an encoding of + ``wx.FONTENCODING_DEFAULT``. + """ return _gdi_.Font_GetDefaultEncoding(*args, **kwargs) def Font_SetDefaultEncoding(*args, **kwargs): - """Font_SetDefaultEncoding(int encoding)""" + """ + Font_SetDefaultEncoding(int encoding) + + Sets the default font encoding. + """ return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) +Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.") #--------------------------------------------------------------------------- class FontEnumerator(object): diff --git a/wxPython/src/mac/_gdi_wrap.cpp b/wxPython/src/mac/_gdi_wrap.cpp index 6865ca595f..418150932b 100644 --- a/wxPython/src/mac/_gdi_wrap.cpp +++ b/wxPython/src/mac/_gdi_wrap.cpp @@ -1966,18 +1966,21 @@ static PyObject *wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncodin } } static wxFont *new_wxFont(wxString const &info){ - wxNativeFontInfo nfi; - nfi.FromString(info); - return new wxFont(nfi); - } + wxNativeFontInfo nfi; + nfi.FromString(info); + return new wxFont(nfi); + } static wxFont *new_wxFont(int pointSize,wxFontFamily family,int flags=wxFONTFLAG_DEFAULT,wxString const &face=wxPyEmptyString,wxFontEncoding encoding=wxFONTENCODING_DEFAULT){ - return wxFont::New(pointSize, family, flags, face, encoding); - } + return wxFont::New(pointSize, family, flags, face, encoding); + } static wxFont *new_wxFont(wxSize const &pixelSize,int family,int style,int weight,bool underlined=false,wxString const &face=wxEmptyString,wxFontEncoding encoding=wxFONTENCODING_DEFAULT){ - return wxFontBase::New(pixelSize, family, - style, weight, underlined, - face, encoding); - } + return wxFontBase::New(pixelSize, family, + style, weight, underlined, + face, encoding); + } +static wxFont *new_wxFont(wxSize const &pixelSize,wxFontFamily family,int flags=wxFONTFLAG_DEFAULT,wxString const &face=wxEmptyString,wxFontEncoding encoding=wxFONTENCODING_DEFAULT){ + return wxFontBase::New(pixelSize, family, flags, face, encoding); + } static bool wxFont___eq__(wxFont *self,wxFont const *other){ return other ? (*self == *other) : false; } static bool wxFont___ne__(wxFont *self,wxFont const *other){ return other ? (*self != *other) : true; } @@ -9383,7 +9386,7 @@ static PyObject *_wrap_new_FontFromNativeInfoString(PyObject *, PyObject *args, } -static PyObject *_wrap_new_Font2(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_new_FFont(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; int arg1 ; wxFontFamily arg2 ; @@ -9402,7 +9405,7 @@ static PyObject *_wrap_new_Font2(PyObject *, PyObject *args, PyObject *kwargs) { (char *) "pointSize",(char *) "family",(char *) "flags",(char *) "face",(char *) "encoding", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_Font2",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_FFont",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; { arg1 = (int)(SWIG_As_int(obj0)); if (SWIG_arg_fail(1)) SWIG_fail; @@ -9536,6 +9539,77 @@ static PyObject *_wrap_new_FontFromPixelSize(PyObject *, PyObject *args, PyObjec } +static PyObject *_wrap_new_FFontFromPixelSize(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSize *arg1 = 0 ; + wxFontFamily arg2 ; + int arg3 = (int) wxFONTFLAG_DEFAULT ; + wxString const &arg4_defvalue = wxEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; + wxFontEncoding arg5 = (wxFontEncoding) wxFONTENCODING_DEFAULT ; + wxFont *result; + wxSize temp1 ; + bool temp4 = false ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "pixelSize",(char *) "family",(char *) "flags",(char *) "face",(char *) "encoding", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_FFontFromPixelSize",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + { + arg1 = &temp1; + if ( ! wxSize_helper(obj0, &arg1)) SWIG_fail; + } + { + arg2 = (wxFontFamily)(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + if (obj2) { + { + arg3 = (int)(SWIG_As_int(obj2)); + if (SWIG_arg_fail(3)) SWIG_fail; + } + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = true; + } + } + if (obj4) { + { + arg5 = (wxFontEncoding)(SWIG_As_int(obj4)); + if (SWIG_arg_fail(5)) SWIG_fail; + } + } + { + if (!wxPyCheckForApp()) SWIG_fail; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxFont *)new_wxFont((wxSize const &)*arg1,(wxFontFamily )arg2,arg3,(wxString const &)*arg4,(wxFontEncoding )arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxFont, 1); + { + if (temp4) + delete arg4; + } + return resultobj; + fail: + { + if (temp4) + delete arg4; + } + return NULL; +} + + static PyObject *_wrap_Font_Ok(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxFont *arg1 = (wxFont *) 0 ; @@ -20959,8 +21033,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_Font", (PyCFunction) _wrap_delete_Font, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_FontFromNativeInfo", (PyCFunction) _wrap_new_FontFromNativeInfo, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_FontFromNativeInfoString", (PyCFunction) _wrap_new_FontFromNativeInfoString, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"new_Font2", (PyCFunction) _wrap_new_Font2, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"new_FFont", (PyCFunction) _wrap_new_FFont, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_FontFromPixelSize", (PyCFunction) _wrap_new_FontFromPixelSize, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"new_FFontFromPixelSize", (PyCFunction) _wrap_new_FFontFromPixelSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Font_Ok", (PyCFunction) _wrap_Font_Ok, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Font___eq__", (PyCFunction) _wrap_Font___eq__, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Font___ne__", (PyCFunction) _wrap_Font___ne__, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index 5021d323f1..7a13e1e378 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -534,6 +534,15 @@ def SetCursor(*args, **kwargs): """SetCursor(Cursor cursor)""" return _misc_.SetCursor(*args, **kwargs) +def GetXDisplay(*args, **kwargs): + """ + GetXDisplay() -> void + + Returns a swigified pointer to the X11 display. Returns None on + other platforms. + """ + return _misc_.GetXDisplay(*args, **kwargs) + def BeginBusyCursor(*args, **kwargs): """BeginBusyCursor(Cursor cursor=wxHOURGLASS_CURSOR)""" return _misc_.BeginBusyCursor(*args, **kwargs) diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index d75b2a1a3f..6b049ecbc2 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -1357,86 +1357,87 @@ SWIG_Python_GetTypeList() { #define SWIGTYPE_p_wxCaret swig_types[15] #define SWIGTYPE_ptrdiff_t swig_types[16] #define SWIGTYPE_std__ptrdiff_t swig_types[17] -#define SWIGTYPE_p_int swig_types[18] -#define SWIGTYPE_p_wxSize swig_types[19] -#define SWIGTYPE_p_wxClipboard swig_types[20] -#define SWIGTYPE_p_wxStopWatch swig_types[21] -#define SWIGTYPE_p_wxDC swig_types[22] -#define SWIGTYPE_p_wxClipboardLocker swig_types[23] -#define SWIGTYPE_p_wxIcon swig_types[24] -#define SWIGTYPE_p_wxLogStderr swig_types[25] -#define SWIGTYPE_p_wxLogTextCtrl swig_types[26] -#define SWIGTYPE_p_wxTextCtrl swig_types[27] -#define SWIGTYPE_p_wxBusyCursor swig_types[28] -#define SWIGTYPE_p_wxBitmapDataObject swig_types[29] -#define SWIGTYPE_p_wxTextDataObject swig_types[30] -#define SWIGTYPE_p_wxDataObject swig_types[31] -#define SWIGTYPE_p_wxPyTextDataObject swig_types[32] -#define SWIGTYPE_p_wxPyBitmapDataObject swig_types[33] -#define SWIGTYPE_p_wxFileDataObject swig_types[34] -#define SWIGTYPE_p_wxCustomDataObject swig_types[35] -#define SWIGTYPE_p_wxURLDataObject swig_types[36] -#define SWIGTYPE_p_wxMetafileDataObject swig_types[37] -#define SWIGTYPE_p_wxSound swig_types[38] -#define SWIGTYPE_p_wxTimerRunner swig_types[39] -#define SWIGTYPE_p_wxLogWindow swig_types[40] -#define SWIGTYPE_p_wxTimeSpan swig_types[41] -#define SWIGTYPE_p_wxArrayString swig_types[42] -#define SWIGTYPE_p_wxWindowDisabler swig_types[43] -#define SWIGTYPE_p_form_ops_t swig_types[44] -#define SWIGTYPE_p_wxToolTip swig_types[45] -#define SWIGTYPE_p_wxDataObjectComposite swig_types[46] -#define SWIGTYPE_p_wxSystemSettings swig_types[47] -#define SWIGTYPE_p_wxFileConfig swig_types[48] -#define SWIGTYPE_p_wxVideoMode swig_types[49] -#define SWIGTYPE_p_wxDataObjectSimple swig_types[50] -#define SWIGTYPE_p_wxPyDataObjectSimple swig_types[51] -#define SWIGTYPE_p_wxDuplexMode swig_types[52] -#define SWIGTYPE_p_wxEvtHandler swig_types[53] -#define SWIGTYPE_p_wxRect swig_types[54] -#define SWIGTYPE_p_char swig_types[55] -#define SWIGTYPE_p_wxSingleInstanceChecker swig_types[56] -#define SWIGTYPE_p_wxStandardPaths swig_types[57] -#define SWIGTYPE_p_wxFileTypeInfo swig_types[58] -#define SWIGTYPE_p_wxFrame swig_types[59] -#define SWIGTYPE_p_wxTimer swig_types[60] -#define SWIGTYPE_p_wxPaperSize swig_types[61] -#define SWIGTYPE_p_wxMimeTypesManager swig_types[62] -#define SWIGTYPE_p_wxPyArtProvider swig_types[63] -#define SWIGTYPE_p_wxPyTipProvider swig_types[64] -#define SWIGTYPE_p_wxTipProvider swig_types[65] -#define SWIGTYPE_p_wxJoystick swig_types[66] -#define SWIGTYPE_p_wxSystemOptions swig_types[67] -#define SWIGTYPE_p_wxPoint swig_types[68] -#define SWIGTYPE_p_wxJoystickEvent swig_types[69] -#define SWIGTYPE_p_wxCursor swig_types[70] -#define SWIGTYPE_p_wxObject swig_types[71] -#define SWIGTYPE_p_wxOutputStream swig_types[72] -#define SWIGTYPE_p_wxDateTime swig_types[73] -#define SWIGTYPE_p_wxPyDropSource swig_types[74] -#define SWIGTYPE_p_unsigned_long swig_types[75] -#define SWIGTYPE_p_wxKillError swig_types[76] -#define SWIGTYPE_p_wxWindow swig_types[77] -#define SWIGTYPE_p_wxString swig_types[78] -#define SWIGTYPE_p_wxPyProcess swig_types[79] -#define SWIGTYPE_p_wxBitmap swig_types[80] -#define SWIGTYPE_p_wxConfig swig_types[81] +#define SWIGTYPE_p_void swig_types[18] +#define SWIGTYPE_p_int swig_types[19] +#define SWIGTYPE_p_wxSize swig_types[20] +#define SWIGTYPE_p_wxClipboard swig_types[21] +#define SWIGTYPE_p_wxStopWatch swig_types[22] +#define SWIGTYPE_p_wxDC swig_types[23] +#define SWIGTYPE_p_wxClipboardLocker swig_types[24] +#define SWIGTYPE_p_wxIcon swig_types[25] +#define SWIGTYPE_p_wxLogStderr swig_types[26] +#define SWIGTYPE_p_wxLogTextCtrl swig_types[27] +#define SWIGTYPE_p_wxTextCtrl swig_types[28] +#define SWIGTYPE_p_wxBusyCursor swig_types[29] +#define SWIGTYPE_p_wxBitmapDataObject swig_types[30] +#define SWIGTYPE_p_wxTextDataObject swig_types[31] +#define SWIGTYPE_p_wxDataObject swig_types[32] +#define SWIGTYPE_p_wxPyTextDataObject swig_types[33] +#define SWIGTYPE_p_wxPyBitmapDataObject swig_types[34] +#define SWIGTYPE_p_wxFileDataObject swig_types[35] +#define SWIGTYPE_p_wxCustomDataObject swig_types[36] +#define SWIGTYPE_p_wxURLDataObject swig_types[37] +#define SWIGTYPE_p_wxMetafileDataObject swig_types[38] +#define SWIGTYPE_p_wxSound swig_types[39] +#define SWIGTYPE_p_wxTimerRunner swig_types[40] +#define SWIGTYPE_p_wxLogWindow swig_types[41] +#define SWIGTYPE_p_wxTimeSpan swig_types[42] +#define SWIGTYPE_p_wxArrayString swig_types[43] +#define SWIGTYPE_p_wxWindowDisabler swig_types[44] +#define SWIGTYPE_p_form_ops_t swig_types[45] +#define SWIGTYPE_p_wxToolTip swig_types[46] +#define SWIGTYPE_p_wxDataObjectComposite swig_types[47] +#define SWIGTYPE_p_wxSystemSettings swig_types[48] +#define SWIGTYPE_p_wxFileConfig swig_types[49] +#define SWIGTYPE_p_wxVideoMode swig_types[50] +#define SWIGTYPE_p_wxDataObjectSimple swig_types[51] +#define SWIGTYPE_p_wxPyDataObjectSimple swig_types[52] +#define SWIGTYPE_p_wxDuplexMode swig_types[53] +#define SWIGTYPE_p_wxEvtHandler swig_types[54] +#define SWIGTYPE_p_wxRect swig_types[55] +#define SWIGTYPE_p_char swig_types[56] +#define SWIGTYPE_p_wxSingleInstanceChecker swig_types[57] +#define SWIGTYPE_p_wxStandardPaths swig_types[58] +#define SWIGTYPE_p_wxFileTypeInfo swig_types[59] +#define SWIGTYPE_p_wxFrame swig_types[60] +#define SWIGTYPE_p_wxTimer swig_types[61] +#define SWIGTYPE_p_wxPaperSize swig_types[62] +#define SWIGTYPE_p_wxMimeTypesManager swig_types[63] +#define SWIGTYPE_p_wxPyArtProvider swig_types[64] +#define SWIGTYPE_p_wxPyTipProvider swig_types[65] +#define SWIGTYPE_p_wxTipProvider swig_types[66] +#define SWIGTYPE_p_wxJoystick swig_types[67] +#define SWIGTYPE_p_wxSystemOptions swig_types[68] +#define SWIGTYPE_p_wxPoint swig_types[69] +#define SWIGTYPE_p_wxJoystickEvent swig_types[70] +#define SWIGTYPE_p_wxCursor swig_types[71] +#define SWIGTYPE_p_wxObject swig_types[72] +#define SWIGTYPE_p_wxOutputStream swig_types[73] +#define SWIGTYPE_p_wxDateTime swig_types[74] +#define SWIGTYPE_p_wxPyDropSource swig_types[75] +#define SWIGTYPE_p_unsigned_long swig_types[76] +#define SWIGTYPE_p_wxKillError swig_types[77] +#define SWIGTYPE_p_wxWindow swig_types[78] +#define SWIGTYPE_p_wxString swig_types[79] +#define SWIGTYPE_p_wxPyProcess swig_types[80] +#define SWIGTYPE_p_wxBitmap swig_types[81] #define SWIGTYPE_unsigned_int swig_types[82] #define SWIGTYPE_p_unsigned_int swig_types[83] -#define SWIGTYPE_p_unsigned_char swig_types[84] -#define SWIGTYPE_p_wxChar swig_types[85] -#define SWIGTYPE_p_wxBusyInfo swig_types[86] -#define SWIGTYPE_p_wxPyDropTarget swig_types[87] -#define SWIGTYPE_p_wxPyTextDropTarget swig_types[88] -#define SWIGTYPE_p_wxPyFileDropTarget swig_types[89] -#define SWIGTYPE_p_wxProcessEvent swig_types[90] -#define SWIGTYPE_p_wxPyLog swig_types[91] -#define SWIGTYPE_p_wxLogNull swig_types[92] -#define SWIGTYPE_p_wxColour swig_types[93] -#define SWIGTYPE_p_wxPyTimer swig_types[94] -#define SWIGTYPE_p_wxConfigPathChanger swig_types[95] -#define SWIGTYPE_p_wxDateSpan swig_types[96] -static swig_type_info *swig_types[98]; +#define SWIGTYPE_p_wxConfig swig_types[84] +#define SWIGTYPE_p_unsigned_char swig_types[85] +#define SWIGTYPE_p_wxChar swig_types[86] +#define SWIGTYPE_p_wxBusyInfo swig_types[87] +#define SWIGTYPE_p_wxPyDropTarget swig_types[88] +#define SWIGTYPE_p_wxPyTextDropTarget swig_types[89] +#define SWIGTYPE_p_wxPyFileDropTarget swig_types[90] +#define SWIGTYPE_p_wxProcessEvent swig_types[91] +#define SWIGTYPE_p_wxPyLog swig_types[92] +#define SWIGTYPE_p_wxLogNull swig_types[93] +#define SWIGTYPE_p_wxColour swig_types[94] +#define SWIGTYPE_p_wxPyTimer swig_types[95] +#define SWIGTYPE_p_wxConfigPathChanger swig_types[96] +#define SWIGTYPE_p_wxDateSpan swig_types[97] +static swig_type_info *swig_types[99]; /* -------- TYPES TABLE (END) -------- */ @@ -1702,6 +1703,16 @@ SWIGINTERNSHORT PyObject* } + void* wxGetXDisplay() + { +#ifdef __WXGTK__ + return wxGetDisplay(); +#else + return NULL; +#endif + } + + bool wxThread_IsMain() { #ifdef WXP_WITH_THREAD return wxThread::IsMain(); @@ -5862,6 +5873,29 @@ static PyObject *_wrap_SetCursor(PyObject *, PyObject *args, PyObject *kwargs) { } +static PyObject *_wrap_GetXDisplay(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + void *result; + char *kwnames[] = { + NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetXDisplay",kwnames)) goto fail; + { + if (!wxPyCheckForApp()) SWIG_fail; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (void *)wxGetXDisplay(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_void, 0); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_BeginBusyCursor(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxCursor *arg1 = (wxCursor *) wxHOURGLASS_CURSOR ; @@ -31586,6 +31620,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ClientDisplayRect", (PyCFunction) _wrap_ClientDisplayRect, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetClientDisplayRect", (PyCFunction) _wrap_GetClientDisplayRect, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SetCursor", (PyCFunction) _wrap_SetCursor, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"GetXDisplay", (PyCFunction) _wrap_GetXDisplay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BeginBusyCursor", (PyCFunction) _wrap_BeginBusyCursor, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetActiveWindow", (PyCFunction) _wrap_GetActiveWindow, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GenericFindWindowAtPoint", (PyCFunction) _wrap_GenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -32860,6 +32895,7 @@ static swig_type_info _swigt__p_wxTimerEvent[] = {{"_p_wxTimerEvent", 0, "wxTime static swig_type_info _swigt__p_wxCaret[] = {{"_p_wxCaret", 0, "wxCaret *", 0, 0, 0, 0},{"_p_wxCaret", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__ptrdiff_t[] = {{"_ptrdiff_t", 0, "ptrdiff_t", 0, 0, 0, 0},{"_ptrdiff_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__std__ptrdiff_t[] = {{"_std__ptrdiff_t", 0, "std::ptrdiff_t", 0, 0, 0, 0},{"_std__ptrdiff_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_void[] = {{"_p_void", 0, "void *", 0, 0, 0, 0},{"_p_void", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxSize[] = {{"_p_wxSize", 0, "wxSize *", 0, 0, 0, 0},{"_p_wxSize", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxClipboard[] = {{"_p_wxClipboard", 0, "wxClipboard *", 0, 0, 0, 0},{"_p_wxClipboard", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -32923,9 +32959,9 @@ static swig_type_info _swigt__p_wxWindow[] = {{"_p_wxWindow", 0, "wxWindow *", 0 static swig_type_info _swigt__p_wxString[] = {{"_p_wxString", 0, "wxString *", 0, 0, 0, 0},{"_p_wxString", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxPyProcess[] = {{"_p_wxPyProcess", 0, "wxPyProcess *", 0, 0, 0, 0},{"_p_wxPyProcess", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxBitmap[] = {{"_p_wxBitmap", 0, "wxBitmap *", 0, 0, 0, 0},{"_p_wxBitmap", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; -static swig_type_info _swigt__p_wxConfig[] = {{"_p_wxConfig", 0, "wxConfig *", 0, 0, 0, 0},{"_p_wxConfig", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__unsigned_int[] = {{"_unsigned_int", 0, "unsigned int|std::size_t", 0, 0, 0, 0},{"_unsigned_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_unsigned_int[] = {{"_p_unsigned_int", 0, "unsigned int *|time_t *", 0, 0, 0, 0},{"_p_unsigned_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_wxConfig[] = {{"_p_wxConfig", 0, "wxConfig *", 0, 0, 0, 0},{"_p_wxConfig", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_unsigned_char[] = {{"_p_unsigned_char", 0, "unsigned char *|byte *", 0, 0, 0, 0},{"_p_unsigned_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxChar[] = {{"_p_wxChar", 0, "wxChar *", 0, 0, 0, 0},{"_p_wxChar", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxBusyInfo[] = {{"_p_wxBusyInfo", 0, "wxBusyInfo *", 0, 0, 0, 0},{"_p_wxBusyInfo", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -32959,6 +32995,7 @@ _swigt__p_wxTimerEvent, _swigt__p_wxCaret, _swigt__ptrdiff_t, _swigt__std__ptrdiff_t, +_swigt__p_void, _swigt__p_int, _swigt__p_wxSize, _swigt__p_wxClipboard, @@ -33022,9 +33059,9 @@ _swigt__p_wxWindow, _swigt__p_wxString, _swigt__p_wxPyProcess, _swigt__p_wxBitmap, -_swigt__p_wxConfig, _swigt__unsigned_int, _swigt__p_unsigned_int, +_swigt__p_wxConfig, _swigt__p_unsigned_char, _swigt__p_wxChar, _swigt__p_wxBusyInfo, diff --git a/wxPython/src/mac/media_wrap.cpp b/wxPython/src/mac/media_wrap.cpp index ff571e4e12..9dd67b4079 100644 --- a/wxPython/src/mac/media_wrap.cpp +++ b/wxPython/src/mac/media_wrap.cpp @@ -1398,7 +1398,7 @@ public: class wxMediaCtrl : public wxControl { public: - wxMediaCtrl() { wxPyRaiseNotImplemented(); } + wxMediaCtrl() { wxPyRaiseNotImplemented(); } wxMediaCtrl(wxWindow* , wxWindowID , const wxString& , diff --git a/wxPython/src/msw/_gdi.py b/wxPython/src/msw/_gdi.py index 676bb5bea8..7ea5398228 100644 --- a/wxPython/src/msw/_gdi.py +++ b/wxPython/src/msw/_gdi.py @@ -1765,7 +1765,13 @@ def FontMapper_GetDefaultConfigPath(*args, **kwargs): #--------------------------------------------------------------------------- class Font(GDIObject): - """Proxy of C++ Font class""" + """ + A font is an object which determines the appearance of text. Fonts are + used for drawing text to a device context, and setting the appearance + of a window's text. + + You can retrieve the current system font settings with `wx.SystemSettings`. + """ def __repr__(self): return "<%s.%s; proxy of C++ wxFont instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,) def __init__(self, *args, **kwargs): @@ -1773,6 +1779,35 @@ class Font(GDIObject): __init__(self, int pointSize, int family, int style, int weight, bool underline=False, String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + Creates a font object with the specified attributes. + + :param pointSize: The size of the font in points. + + :param family: Font family. A generic way of referring to fonts + without specifying actual facename. It can be One of + the ``wx.FONTFAMILY_xxx`` constants. + + :param style: One of the ``wx.FONTSTYLE_xxx`` constants. + + :param weight: Font weight, sometimes also referred to as font + boldness. One of the ``wx.FONTWEIGHT_xxx`` constants. + + :param underline: The value can be ``True`` or ``False`` and + indicates whether the font will include an underline. This + may not be supported on all platforms. + + :param face: An optional string specifying the actual typeface to + be used. If it is an empty string, a default typeface will be + chosen based on the family. + + :param encoding: An encoding which may be one of the + ``wx.FONTENCODING_xxx`` constants. If the specified encoding isn't + available, no font is created. + + :see: `wx.FFont`, `wx.FontFromPixelSize`, `wx.FFontFromPixelSize`, + `wx.FontFromNativeInfoString`, `wx.FontFromNativeInfo` + """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] newobj = _gdi_.new_Font(*args, **kwargs) @@ -1786,7 +1821,11 @@ class Font(GDIObject): except: pass def Ok(*args, **kwargs): - """Ok(self) -> bool""" + """ + Ok(self) -> bool + + Returns ``True`` if this font was successfully created. + """ return _gdi_.Font_Ok(*args, **kwargs) def __nonzero__(self): return self.Ok() @@ -1799,111 +1838,234 @@ class Font(GDIObject): return _gdi_.Font___ne__(*args, **kwargs) def GetPointSize(*args, **kwargs): - """GetPointSize(self) -> int""" + """ + GetPointSize(self) -> int + + Gets the point size. + """ return _gdi_.Font_GetPointSize(*args, **kwargs) def GetPixelSize(*args, **kwargs): - """GetPixelSize(self) -> Size""" + """ + GetPixelSize(self) -> Size + + Returns the size in pixels if the font was constructed with a pixel + size. + """ return _gdi_.Font_GetPixelSize(*args, **kwargs) def IsUsingSizeInPixels(*args, **kwargs): - """IsUsingSizeInPixels(self) -> bool""" + """ + IsUsingSizeInPixels(self) -> bool + + Returns ``True`` if the font is using a pixelSize. + """ return _gdi_.Font_IsUsingSizeInPixels(*args, **kwargs) def GetFamily(*args, **kwargs): - """GetFamily(self) -> int""" + """ + GetFamily(self) -> int + + Gets the font family. + """ return _gdi_.Font_GetFamily(*args, **kwargs) def GetStyle(*args, **kwargs): - """GetStyle(self) -> int""" + """ + GetStyle(self) -> int + + Gets the font style. + """ return _gdi_.Font_GetStyle(*args, **kwargs) def GetWeight(*args, **kwargs): - """GetWeight(self) -> int""" + """ + GetWeight(self) -> int + + Gets the font weight. + """ return _gdi_.Font_GetWeight(*args, **kwargs) def GetUnderlined(*args, **kwargs): - """GetUnderlined(self) -> bool""" + """ + GetUnderlined(self) -> bool + + Returns ``True`` if the font is underlined, ``False`` otherwise. + """ return _gdi_.Font_GetUnderlined(*args, **kwargs) def GetFaceName(*args, **kwargs): - """GetFaceName(self) -> String""" + """ + GetFaceName(self) -> String + + Returns the typeface name associated with the font, or the empty + string if there is no typeface information. + """ return _gdi_.Font_GetFaceName(*args, **kwargs) def GetEncoding(*args, **kwargs): - """GetEncoding(self) -> int""" + """ + GetEncoding(self) -> int + + Get the font's encoding. + """ return _gdi_.Font_GetEncoding(*args, **kwargs) def GetNativeFontInfo(*args, **kwargs): - """GetNativeFontInfo(self) -> NativeFontInfo""" + """ + GetNativeFontInfo(self) -> NativeFontInfo + + Constructs a `wx.NativeFontInfo` object from this font. + """ return _gdi_.Font_GetNativeFontInfo(*args, **kwargs) def IsFixedWidth(*args, **kwargs): - """IsFixedWidth(self) -> bool""" + """ + IsFixedWidth(self) -> bool + + Returns true if the font is a fixed width (or monospaced) font, false + if it is a proportional one or font is invalid. + """ return _gdi_.Font_IsFixedWidth(*args, **kwargs) def GetNativeFontInfoDesc(*args, **kwargs): - """GetNativeFontInfoDesc(self) -> String""" + """ + GetNativeFontInfoDesc(self) -> String + + Returns the platform-dependent string completely describing this font + or an empty string if the font isn't valid. + """ return _gdi_.Font_GetNativeFontInfoDesc(*args, **kwargs) def GetNativeFontInfoUserDesc(*args, **kwargs): - """GetNativeFontInfoUserDesc(self) -> String""" + """ + GetNativeFontInfoUserDesc(self) -> String + + Returns a human readable version of `GetNativeFontInfoDesc`. + """ return _gdi_.Font_GetNativeFontInfoUserDesc(*args, **kwargs) def SetPointSize(*args, **kwargs): - """SetPointSize(self, int pointSize)""" + """ + SetPointSize(self, int pointSize) + + Sets the point size. + """ return _gdi_.Font_SetPointSize(*args, **kwargs) def SetPixelSize(*args, **kwargs): - """SetPixelSize(self, Size pixelSize)""" + """ + SetPixelSize(self, Size pixelSize) + + Sets the size in pixels rather than points. If there is platform API + support for this then it is used, otherwise a font with the closest + size is found using a binary search. + """ return _gdi_.Font_SetPixelSize(*args, **kwargs) def SetFamily(*args, **kwargs): - """SetFamily(self, int family)""" + """ + SetFamily(self, int family) + + Sets the font family. + """ return _gdi_.Font_SetFamily(*args, **kwargs) def SetStyle(*args, **kwargs): - """SetStyle(self, int style)""" + """ + SetStyle(self, int style) + + Sets the font style. + """ return _gdi_.Font_SetStyle(*args, **kwargs) def SetWeight(*args, **kwargs): - """SetWeight(self, int weight)""" + """ + SetWeight(self, int weight) + + Sets the font weight. + """ return _gdi_.Font_SetWeight(*args, **kwargs) def SetFaceName(*args, **kwargs): - """SetFaceName(self, String faceName)""" + """ + SetFaceName(self, String faceName) + + Sets the facename for the font. The facename, which should be a valid + font installed on the end-user's system. + + To avoid portability problems, don't rely on a specific face, but + specify the font family instead or as well. A suitable font will be + found on the end-user's system. If both the family and the facename + are specified, wxWidgets will first search for the specific face, and + then for a font belonging to the same family. + """ return _gdi_.Font_SetFaceName(*args, **kwargs) def SetUnderlined(*args, **kwargs): - """SetUnderlined(self, bool underlined)""" + """ + SetUnderlined(self, bool underlined) + + Sets underlining. + """ return _gdi_.Font_SetUnderlined(*args, **kwargs) def SetEncoding(*args, **kwargs): - """SetEncoding(self, int encoding)""" + """ + SetEncoding(self, int encoding) + + Set the font encoding. + """ return _gdi_.Font_SetEncoding(*args, **kwargs) def SetNativeFontInfo(*args, **kwargs): - """SetNativeFontInfo(self, NativeFontInfo info)""" + """ + SetNativeFontInfo(self, NativeFontInfo info) + + Set the font's attributes from a `wx.NativeFontInfo` object. + """ return _gdi_.Font_SetNativeFontInfo(*args, **kwargs) def SetNativeFontInfoFromString(*args, **kwargs): - """SetNativeFontInfoFromString(self, String info)""" + """ + SetNativeFontInfoFromString(self, String info) + + Set the font's attributes from string representation of a + `wx.NativeFontInfo` object. + """ return _gdi_.Font_SetNativeFontInfoFromString(*args, **kwargs) def SetNativeFontInfoUserDesc(*args, **kwargs): - """SetNativeFontInfoUserDesc(self, String info)""" + """ + SetNativeFontInfoUserDesc(self, String info) + + Set the font's attributes from a string formerly returned from + `GetNativeFontInfoDesc`. + """ return _gdi_.Font_SetNativeFontInfoUserDesc(*args, **kwargs) def GetFamilyString(*args, **kwargs): - """GetFamilyString(self) -> String""" + """ + GetFamilyString(self) -> String + + Returns a string representation of the font family. + """ return _gdi_.Font_GetFamilyString(*args, **kwargs) def GetStyleString(*args, **kwargs): - """GetStyleString(self) -> String""" + """ + GetStyleString(self) -> String + + Returns a string representation of the font style. + """ return _gdi_.Font_GetStyleString(*args, **kwargs) def GetWeightString(*args, **kwargs): - """GetWeightString(self) -> String""" + """ + GetWeightString(self) -> String + + Return a string representation of the font weight. + """ return _gdi_.Font_GetWeightString(*args, **kwargs) def SetNoAntiAliasing(*args, **kwargs): @@ -1915,12 +2077,21 @@ class Font(GDIObject): return _gdi_.Font_GetNoAntiAliasing(*args, **kwargs) def GetDefaultEncoding(*args, **kwargs): - """GetDefaultEncoding() -> int""" + """ + GetDefaultEncoding() -> int + + Returns the encoding used for all fonts created with an encoding of + ``wx.FONTENCODING_DEFAULT``. + """ return _gdi_.Font_GetDefaultEncoding(*args, **kwargs) GetDefaultEncoding = staticmethod(GetDefaultEncoding) def SetDefaultEncoding(*args, **kwargs): - """SetDefaultEncoding(int encoding)""" + """ + SetDefaultEncoding(int encoding) + + Sets the default font encoding. + """ return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) SetDefaultEncoding = staticmethod(SetDefaultEncoding) @@ -1933,26 +2104,53 @@ class FontPtr(Font): _gdi_.Font_swigregister(FontPtr) def FontFromNativeInfo(*args, **kwargs): - """FontFromNativeInfo(NativeFontInfo info) -> Font""" + """ + FontFromNativeInfo(NativeFontInfo info) -> Font + + Construct a `wx.Font` from a `wx.NativeFontInfo` object. + """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FontFromNativeInfo(*args, **kwargs) val.thisown = 1 return val def FontFromNativeInfoString(*args, **kwargs): - """FontFromNativeInfoString(String info) -> Font""" + """ + FontFromNativeInfoString(String info) -> Font + + Construct a `wx.Font` from the string representation of a + `wx.NativeFontInfo` object. + """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FontFromNativeInfoString(*args, **kwargs) val.thisown = 1 return val -def Font2(*args, **kwargs): +def FFont(*args, **kwargs): """ - Font2(int pointSize, int family, int flags=FONTFLAG_DEFAULT, + FFont(int pointSize, int family, int flags=FONTFLAG_DEFAULT, String face=EmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + A bit of a simpler way to create a `wx.Font` using flags instead of + individual attribute settings. The value of flags can be a + combination of the following: + + ============================ == + wx.FONTFLAG_DEFAULT + wx.FONTFLAG_ITALIC + wx.FONTFLAG_SLANT + wx.FONTFLAG_LIGHT + wx.FONTFLAG_BOLD + wx.FONTFLAG_ANTIALIASED + wx.FONTFLAG_NOT_ANTIALIASED + wx.FONTFLAG_UNDERLINED + wx.FONTFLAG_STRIKETHROUGH + ============================ == + + :see: `wx.Font.__init__` """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] - val = _gdi_.new_Font2(*args, **kwargs) + val = _gdi_.new_FFont(*args, **kwargs) val.thisown = 1 return val @@ -1961,20 +2159,52 @@ def FontFromPixelSize(*args, **kwargs): FontFromPixelSize(Size pixelSize, int family, int style, int weight, bool underlined=False, String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + Creates a font using a size in pixels rather than points. If there is + platform API support for this then it is used, otherwise a font with + the closest size is found using a binary search. + + :see: `wx.Font.__init__` """ if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] val = _gdi_.new_FontFromPixelSize(*args, **kwargs) val.thisown = 1 return val +def FFontFromPixelSize(*args, **kwargs): + """ + FFontFromPixelSize(Size pixelSize, int family, int flags=FONTFLAG_DEFAULT, + String face=wxEmptyString, int encoding=FONTENCODING_DEFAULT) -> Font + + Creates a font using a size in pixels rather than points. If there is + platform API support for this then it is used, otherwise a font with + the closest size is found using a binary search. + + :see: `wx.Font.__init__`, `wx.FFont` + """ + if kwargs.has_key('faceName'): kwargs['face'] = kwargs['faceName'];del kwargs['faceName'] + val = _gdi_.new_FFontFromPixelSize(*args, **kwargs) + val.thisown = 1 + return val + def Font_GetDefaultEncoding(*args, **kwargs): - """Font_GetDefaultEncoding() -> int""" + """ + Font_GetDefaultEncoding() -> int + + Returns the encoding used for all fonts created with an encoding of + ``wx.FONTENCODING_DEFAULT``. + """ return _gdi_.Font_GetDefaultEncoding(*args, **kwargs) def Font_SetDefaultEncoding(*args, **kwargs): - """Font_SetDefaultEncoding(int encoding)""" + """ + Font_SetDefaultEncoding(int encoding) + + Sets the default font encoding. + """ return _gdi_.Font_SetDefaultEncoding(*args, **kwargs) +Font2 = wx._deprecated(FFont, "Use `wx.FFont` instead.") #--------------------------------------------------------------------------- class FontEnumerator(object): diff --git a/wxPython/src/msw/_gdi_wrap.cpp b/wxPython/src/msw/_gdi_wrap.cpp index a962cac27e..df4c768f3b 100644 --- a/wxPython/src/msw/_gdi_wrap.cpp +++ b/wxPython/src/msw/_gdi_wrap.cpp @@ -1919,18 +1919,21 @@ static PyObject *wxFontMapper_GetAltForEncoding(wxFontMapper *self,wxFontEncodin } } static wxFont *new_wxFont(wxString const &info){ - wxNativeFontInfo nfi; - nfi.FromString(info); - return new wxFont(nfi); - } + wxNativeFontInfo nfi; + nfi.FromString(info); + return new wxFont(nfi); + } static wxFont *new_wxFont(int pointSize,wxFontFamily family,int flags=wxFONTFLAG_DEFAULT,wxString const &face=wxPyEmptyString,wxFontEncoding encoding=wxFONTENCODING_DEFAULT){ - return wxFont::New(pointSize, family, flags, face, encoding); - } + return wxFont::New(pointSize, family, flags, face, encoding); + } static wxFont *new_wxFont(wxSize const &pixelSize,int family,int style,int weight,bool underlined=false,wxString const &face=wxEmptyString,wxFontEncoding encoding=wxFONTENCODING_DEFAULT){ - return wxFontBase::New(pixelSize, family, - style, weight, underlined, - face, encoding); - } + return wxFontBase::New(pixelSize, family, + style, weight, underlined, + face, encoding); + } +static wxFont *new_wxFont(wxSize const &pixelSize,wxFontFamily family,int flags=wxFONTFLAG_DEFAULT,wxString const &face=wxEmptyString,wxFontEncoding encoding=wxFONTENCODING_DEFAULT){ + return wxFontBase::New(pixelSize, family, flags, face, encoding); + } static bool wxFont___eq__(wxFont *self,wxFont const *other){ return other ? (*self == *other) : false; } static bool wxFont___ne__(wxFont *self,wxFont const *other){ return other ? (*self != *other) : true; } @@ -10028,7 +10031,7 @@ static PyObject *_wrap_new_FontFromNativeInfoString(PyObject *, PyObject *args, } -static PyObject *_wrap_new_Font2(PyObject *, PyObject *args, PyObject *kwargs) { +static PyObject *_wrap_new_FFont(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; int arg1 ; wxFontFamily arg2 ; @@ -10047,7 +10050,7 @@ static PyObject *_wrap_new_Font2(PyObject *, PyObject *args, PyObject *kwargs) { (char *) "pointSize",(char *) "family",(char *) "flags",(char *) "face",(char *) "encoding", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_Font2",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_FFont",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; { arg1 = (int)(SWIG_As_int(obj0)); if (SWIG_arg_fail(1)) SWIG_fail; @@ -10181,6 +10184,77 @@ static PyObject *_wrap_new_FontFromPixelSize(PyObject *, PyObject *args, PyObjec } +static PyObject *_wrap_new_FFontFromPixelSize(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxSize *arg1 = 0 ; + wxFontFamily arg2 ; + int arg3 = (int) wxFONTFLAG_DEFAULT ; + wxString const &arg4_defvalue = wxEmptyString ; + wxString *arg4 = (wxString *) &arg4_defvalue ; + wxFontEncoding arg5 = (wxFontEncoding) wxFONTENCODING_DEFAULT ; + wxFont *result; + wxSize temp1 ; + bool temp4 = false ; + PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; + PyObject * obj2 = 0 ; + PyObject * obj3 = 0 ; + PyObject * obj4 = 0 ; + char *kwnames[] = { + (char *) "pixelSize",(char *) "family",(char *) "flags",(char *) "face",(char *) "encoding", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:new_FFontFromPixelSize",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail; + { + arg1 = &temp1; + if ( ! wxSize_helper(obj0, &arg1)) SWIG_fail; + } + { + arg2 = (wxFontFamily)(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + if (obj2) { + { + arg3 = (int)(SWIG_As_int(obj2)); + if (SWIG_arg_fail(3)) SWIG_fail; + } + } + if (obj3) { + { + arg4 = wxString_in_helper(obj3); + if (arg4 == NULL) SWIG_fail; + temp4 = true; + } + } + if (obj4) { + { + arg5 = (wxFontEncoding)(SWIG_As_int(obj4)); + if (SWIG_arg_fail(5)) SWIG_fail; + } + } + { + if (!wxPyCheckForApp()) SWIG_fail; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (wxFont *)new_wxFont((wxSize const &)*arg1,(wxFontFamily )arg2,arg3,(wxString const &)*arg4,(wxFontEncoding )arg5); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_wxFont, 1); + { + if (temp4) + delete arg4; + } + return resultobj; + fail: + { + if (temp4) + delete arg4; + } + return NULL; +} + + static PyObject *_wrap_Font_Ok(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxFont *arg1 = (wxFont *) 0 ; @@ -21702,8 +21776,9 @@ static PyMethodDef SwigMethods[] = { { (char *)"delete_Font", (PyCFunction) _wrap_delete_Font, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_FontFromNativeInfo", (PyCFunction) _wrap_new_FontFromNativeInfo, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_FontFromNativeInfoString", (PyCFunction) _wrap_new_FontFromNativeInfoString, METH_VARARGS | METH_KEYWORDS, NULL}, - { (char *)"new_Font2", (PyCFunction) _wrap_new_Font2, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"new_FFont", (PyCFunction) _wrap_new_FFont, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"new_FontFromPixelSize", (PyCFunction) _wrap_new_FontFromPixelSize, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"new_FFontFromPixelSize", (PyCFunction) _wrap_new_FFontFromPixelSize, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Font_Ok", (PyCFunction) _wrap_Font_Ok, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Font___eq__", (PyCFunction) _wrap_Font___eq__, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"Font___ne__", (PyCFunction) _wrap_Font___ne__, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/msw/_misc.py b/wxPython/src/msw/_misc.py index 5021d323f1..7a13e1e378 100644 --- a/wxPython/src/msw/_misc.py +++ b/wxPython/src/msw/_misc.py @@ -534,6 +534,15 @@ def SetCursor(*args, **kwargs): """SetCursor(Cursor cursor)""" return _misc_.SetCursor(*args, **kwargs) +def GetXDisplay(*args, **kwargs): + """ + GetXDisplay() -> void + + Returns a swigified pointer to the X11 display. Returns None on + other platforms. + """ + return _misc_.GetXDisplay(*args, **kwargs) + def BeginBusyCursor(*args, **kwargs): """BeginBusyCursor(Cursor cursor=wxHOURGLASS_CURSOR)""" return _misc_.BeginBusyCursor(*args, **kwargs) diff --git a/wxPython/src/msw/_misc_wrap.cpp b/wxPython/src/msw/_misc_wrap.cpp index 9304c94221..9e4cd86ee0 100644 --- a/wxPython/src/msw/_misc_wrap.cpp +++ b/wxPython/src/msw/_misc_wrap.cpp @@ -1357,86 +1357,87 @@ SWIG_Python_GetTypeList() { #define SWIGTYPE_p_wxCaret swig_types[15] #define SWIGTYPE_ptrdiff_t swig_types[16] #define SWIGTYPE_std__ptrdiff_t swig_types[17] -#define SWIGTYPE_p_int swig_types[18] -#define SWIGTYPE_p_wxSize swig_types[19] -#define SWIGTYPE_p_wxClipboard swig_types[20] -#define SWIGTYPE_p_wxStopWatch swig_types[21] -#define SWIGTYPE_p_wxDC swig_types[22] -#define SWIGTYPE_p_wxClipboardLocker swig_types[23] -#define SWIGTYPE_p_wxIcon swig_types[24] -#define SWIGTYPE_p_wxLogStderr swig_types[25] -#define SWIGTYPE_p_wxLogTextCtrl swig_types[26] -#define SWIGTYPE_p_wxTextCtrl swig_types[27] -#define SWIGTYPE_p_wxBusyCursor swig_types[28] -#define SWIGTYPE_p_wxBitmapDataObject swig_types[29] -#define SWIGTYPE_p_wxTextDataObject swig_types[30] -#define SWIGTYPE_p_wxDataObject swig_types[31] -#define SWIGTYPE_p_wxPyTextDataObject swig_types[32] -#define SWIGTYPE_p_wxPyBitmapDataObject swig_types[33] -#define SWIGTYPE_p_wxFileDataObject swig_types[34] -#define SWIGTYPE_p_wxCustomDataObject swig_types[35] -#define SWIGTYPE_p_wxURLDataObject swig_types[36] -#define SWIGTYPE_p_wxMetafileDataObject swig_types[37] -#define SWIGTYPE_p_wxSound swig_types[38] -#define SWIGTYPE_p_wxTimerRunner swig_types[39] -#define SWIGTYPE_p_wxLogWindow swig_types[40] -#define SWIGTYPE_p_wxTimeSpan swig_types[41] -#define SWIGTYPE_p_wxArrayString swig_types[42] -#define SWIGTYPE_p_wxWindowDisabler swig_types[43] -#define SWIGTYPE_p_form_ops_t swig_types[44] -#define SWIGTYPE_p_wxToolTip swig_types[45] -#define SWIGTYPE_p_wxDataObjectComposite swig_types[46] -#define SWIGTYPE_p_wxSystemSettings swig_types[47] -#define SWIGTYPE_p_wxFileConfig swig_types[48] -#define SWIGTYPE_p_wxVideoMode swig_types[49] -#define SWIGTYPE_p_wxDataObjectSimple swig_types[50] -#define SWIGTYPE_p_wxPyDataObjectSimple swig_types[51] -#define SWIGTYPE_p_wxDuplexMode swig_types[52] -#define SWIGTYPE_p_wxEvtHandler swig_types[53] -#define SWIGTYPE_p_wxRect swig_types[54] -#define SWIGTYPE_p_char swig_types[55] -#define SWIGTYPE_p_wxSingleInstanceChecker swig_types[56] -#define SWIGTYPE_p_wxStandardPaths swig_types[57] -#define SWIGTYPE_p_wxFileTypeInfo swig_types[58] -#define SWIGTYPE_p_wxFrame swig_types[59] -#define SWIGTYPE_p_wxTimer swig_types[60] -#define SWIGTYPE_p_wxPaperSize swig_types[61] -#define SWIGTYPE_p_wxMimeTypesManager swig_types[62] -#define SWIGTYPE_p_wxPyArtProvider swig_types[63] -#define SWIGTYPE_p_wxPyTipProvider swig_types[64] -#define SWIGTYPE_p_wxTipProvider swig_types[65] -#define SWIGTYPE_p_wxJoystick swig_types[66] -#define SWIGTYPE_p_wxSystemOptions swig_types[67] -#define SWIGTYPE_p_wxPoint swig_types[68] -#define SWIGTYPE_p_wxJoystickEvent swig_types[69] -#define SWIGTYPE_p_wxCursor swig_types[70] -#define SWIGTYPE_p_wxObject swig_types[71] -#define SWIGTYPE_p_wxOutputStream swig_types[72] -#define SWIGTYPE_p_wxDateTime swig_types[73] -#define SWIGTYPE_p_wxPyDropSource swig_types[74] -#define SWIGTYPE_p_unsigned_long swig_types[75] -#define SWIGTYPE_p_wxKillError swig_types[76] -#define SWIGTYPE_p_wxWindow swig_types[77] -#define SWIGTYPE_p_wxString swig_types[78] -#define SWIGTYPE_p_wxPyProcess swig_types[79] -#define SWIGTYPE_p_wxBitmap swig_types[80] -#define SWIGTYPE_p_wxConfig swig_types[81] +#define SWIGTYPE_p_void swig_types[18] +#define SWIGTYPE_p_int swig_types[19] +#define SWIGTYPE_p_wxSize swig_types[20] +#define SWIGTYPE_p_wxClipboard swig_types[21] +#define SWIGTYPE_p_wxStopWatch swig_types[22] +#define SWIGTYPE_p_wxDC swig_types[23] +#define SWIGTYPE_p_wxClipboardLocker swig_types[24] +#define SWIGTYPE_p_wxIcon swig_types[25] +#define SWIGTYPE_p_wxLogStderr swig_types[26] +#define SWIGTYPE_p_wxLogTextCtrl swig_types[27] +#define SWIGTYPE_p_wxTextCtrl swig_types[28] +#define SWIGTYPE_p_wxBusyCursor swig_types[29] +#define SWIGTYPE_p_wxBitmapDataObject swig_types[30] +#define SWIGTYPE_p_wxTextDataObject swig_types[31] +#define SWIGTYPE_p_wxDataObject swig_types[32] +#define SWIGTYPE_p_wxPyTextDataObject swig_types[33] +#define SWIGTYPE_p_wxPyBitmapDataObject swig_types[34] +#define SWIGTYPE_p_wxFileDataObject swig_types[35] +#define SWIGTYPE_p_wxCustomDataObject swig_types[36] +#define SWIGTYPE_p_wxURLDataObject swig_types[37] +#define SWIGTYPE_p_wxMetafileDataObject swig_types[38] +#define SWIGTYPE_p_wxSound swig_types[39] +#define SWIGTYPE_p_wxTimerRunner swig_types[40] +#define SWIGTYPE_p_wxLogWindow swig_types[41] +#define SWIGTYPE_p_wxTimeSpan swig_types[42] +#define SWIGTYPE_p_wxArrayString swig_types[43] +#define SWIGTYPE_p_wxWindowDisabler swig_types[44] +#define SWIGTYPE_p_form_ops_t swig_types[45] +#define SWIGTYPE_p_wxToolTip swig_types[46] +#define SWIGTYPE_p_wxDataObjectComposite swig_types[47] +#define SWIGTYPE_p_wxSystemSettings swig_types[48] +#define SWIGTYPE_p_wxFileConfig swig_types[49] +#define SWIGTYPE_p_wxVideoMode swig_types[50] +#define SWIGTYPE_p_wxDataObjectSimple swig_types[51] +#define SWIGTYPE_p_wxPyDataObjectSimple swig_types[52] +#define SWIGTYPE_p_wxDuplexMode swig_types[53] +#define SWIGTYPE_p_wxEvtHandler swig_types[54] +#define SWIGTYPE_p_wxRect swig_types[55] +#define SWIGTYPE_p_char swig_types[56] +#define SWIGTYPE_p_wxSingleInstanceChecker swig_types[57] +#define SWIGTYPE_p_wxStandardPaths swig_types[58] +#define SWIGTYPE_p_wxFileTypeInfo swig_types[59] +#define SWIGTYPE_p_wxFrame swig_types[60] +#define SWIGTYPE_p_wxTimer swig_types[61] +#define SWIGTYPE_p_wxPaperSize swig_types[62] +#define SWIGTYPE_p_wxMimeTypesManager swig_types[63] +#define SWIGTYPE_p_wxPyArtProvider swig_types[64] +#define SWIGTYPE_p_wxPyTipProvider swig_types[65] +#define SWIGTYPE_p_wxTipProvider swig_types[66] +#define SWIGTYPE_p_wxJoystick swig_types[67] +#define SWIGTYPE_p_wxSystemOptions swig_types[68] +#define SWIGTYPE_p_wxPoint swig_types[69] +#define SWIGTYPE_p_wxJoystickEvent swig_types[70] +#define SWIGTYPE_p_wxCursor swig_types[71] +#define SWIGTYPE_p_wxObject swig_types[72] +#define SWIGTYPE_p_wxOutputStream swig_types[73] +#define SWIGTYPE_p_wxDateTime swig_types[74] +#define SWIGTYPE_p_wxPyDropSource swig_types[75] +#define SWIGTYPE_p_unsigned_long swig_types[76] +#define SWIGTYPE_p_wxKillError swig_types[77] +#define SWIGTYPE_p_wxWindow swig_types[78] +#define SWIGTYPE_p_wxString swig_types[79] +#define SWIGTYPE_p_wxPyProcess swig_types[80] +#define SWIGTYPE_p_wxBitmap swig_types[81] #define SWIGTYPE_unsigned_int swig_types[82] #define SWIGTYPE_p_unsigned_int swig_types[83] -#define SWIGTYPE_p_unsigned_char swig_types[84] -#define SWIGTYPE_p_wxChar swig_types[85] -#define SWIGTYPE_p_wxBusyInfo swig_types[86] -#define SWIGTYPE_p_wxPyDropTarget swig_types[87] -#define SWIGTYPE_p_wxPyTextDropTarget swig_types[88] -#define SWIGTYPE_p_wxPyFileDropTarget swig_types[89] -#define SWIGTYPE_p_wxProcessEvent swig_types[90] -#define SWIGTYPE_p_wxPyLog swig_types[91] -#define SWIGTYPE_p_wxLogNull swig_types[92] -#define SWIGTYPE_p_wxColour swig_types[93] -#define SWIGTYPE_p_wxPyTimer swig_types[94] -#define SWIGTYPE_p_wxConfigPathChanger swig_types[95] -#define SWIGTYPE_p_wxDateSpan swig_types[96] -static swig_type_info *swig_types[98]; +#define SWIGTYPE_p_wxConfig swig_types[84] +#define SWIGTYPE_p_unsigned_char swig_types[85] +#define SWIGTYPE_p_wxChar swig_types[86] +#define SWIGTYPE_p_wxBusyInfo swig_types[87] +#define SWIGTYPE_p_wxPyDropTarget swig_types[88] +#define SWIGTYPE_p_wxPyTextDropTarget swig_types[89] +#define SWIGTYPE_p_wxPyFileDropTarget swig_types[90] +#define SWIGTYPE_p_wxProcessEvent swig_types[91] +#define SWIGTYPE_p_wxPyLog swig_types[92] +#define SWIGTYPE_p_wxLogNull swig_types[93] +#define SWIGTYPE_p_wxColour swig_types[94] +#define SWIGTYPE_p_wxPyTimer swig_types[95] +#define SWIGTYPE_p_wxConfigPathChanger swig_types[96] +#define SWIGTYPE_p_wxDateSpan swig_types[97] +static swig_type_info *swig_types[99]; /* -------- TYPES TABLE (END) -------- */ @@ -1702,6 +1703,16 @@ SWIGINTERNSHORT PyObject* } + void* wxGetXDisplay() + { +#ifdef __WXGTK__ + return wxGetDisplay(); +#else + return NULL; +#endif + } + + bool wxThread_IsMain() { #ifdef WXP_WITH_THREAD return wxThread::IsMain(); @@ -5861,6 +5872,29 @@ static PyObject *_wrap_SetCursor(PyObject *, PyObject *args, PyObject *kwargs) { } +static PyObject *_wrap_GetXDisplay(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + void *result; + char *kwnames[] = { + NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)":GetXDisplay",kwnames)) goto fail; + { + if (!wxPyCheckForApp()) SWIG_fail; + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (void *)wxGetXDisplay(); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + resultobj = SWIG_NewPointerObj((void*)(result), SWIGTYPE_p_void, 0); + return resultobj; + fail: + return NULL; +} + + static PyObject *_wrap_BeginBusyCursor(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxCursor *arg1 = (wxCursor *) wxHOURGLASS_CURSOR ; @@ -31585,6 +31619,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"ClientDisplayRect", (PyCFunction) _wrap_ClientDisplayRect, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetClientDisplayRect", (PyCFunction) _wrap_GetClientDisplayRect, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SetCursor", (PyCFunction) _wrap_SetCursor, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"GetXDisplay", (PyCFunction) _wrap_GetXDisplay, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"BeginBusyCursor", (PyCFunction) _wrap_BeginBusyCursor, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GetActiveWindow", (PyCFunction) _wrap_GetActiveWindow, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"GenericFindWindowAtPoint", (PyCFunction) _wrap_GenericFindWindowAtPoint, METH_VARARGS | METH_KEYWORDS, NULL}, @@ -32859,6 +32894,7 @@ static swig_type_info _swigt__p_wxTimerEvent[] = {{"_p_wxTimerEvent", 0, "wxTime static swig_type_info _swigt__p_wxCaret[] = {{"_p_wxCaret", 0, "wxCaret *", 0, 0, 0, 0},{"_p_wxCaret", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__ptrdiff_t[] = {{"_ptrdiff_t", 0, "ptrdiff_t", 0, 0, 0, 0},{"_ptrdiff_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__std__ptrdiff_t[] = {{"_std__ptrdiff_t", 0, "std::ptrdiff_t", 0, 0, 0, 0},{"_std__ptrdiff_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_void[] = {{"_p_void", 0, "void *", 0, 0, 0, 0},{"_p_void", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxSize[] = {{"_p_wxSize", 0, "wxSize *", 0, 0, 0, 0},{"_p_wxSize", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxClipboard[] = {{"_p_wxClipboard", 0, "wxClipboard *", 0, 0, 0, 0},{"_p_wxClipboard", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -32922,9 +32958,9 @@ static swig_type_info _swigt__p_wxWindow[] = {{"_p_wxWindow", 0, "wxWindow *", 0 static swig_type_info _swigt__p_wxString[] = {{"_p_wxString", 0, "wxString *", 0, 0, 0, 0},{"_p_wxString", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxPyProcess[] = {{"_p_wxPyProcess", 0, "wxPyProcess *", 0, 0, 0, 0},{"_p_wxPyProcess", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxBitmap[] = {{"_p_wxBitmap", 0, "wxBitmap *", 0, 0, 0, 0},{"_p_wxBitmap", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; -static swig_type_info _swigt__p_wxConfig[] = {{"_p_wxConfig", 0, "wxConfig *", 0, 0, 0, 0},{"_p_wxConfig", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__unsigned_int[] = {{"_unsigned_int", 0, "unsigned int|std::size_t", 0, 0, 0, 0},{"_unsigned_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_unsigned_int[] = {{"_p_unsigned_int", 0, "unsigned int *|time_t *", 0, 0, 0, 0},{"_p_unsigned_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; +static swig_type_info _swigt__p_wxConfig[] = {{"_p_wxConfig", 0, "wxConfig *", 0, 0, 0, 0},{"_p_wxConfig", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_unsigned_char[] = {{"_p_unsigned_char", 0, "unsigned char *|byte *", 0, 0, 0, 0},{"_p_unsigned_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxChar[] = {{"_p_wxChar", 0, "wxChar *", 0, 0, 0, 0},{"_p_wxChar", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; static swig_type_info _swigt__p_wxBusyInfo[] = {{"_p_wxBusyInfo", 0, "wxBusyInfo *", 0, 0, 0, 0},{"_p_wxBusyInfo", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}}; @@ -32958,6 +32994,7 @@ _swigt__p_wxTimerEvent, _swigt__p_wxCaret, _swigt__ptrdiff_t, _swigt__std__ptrdiff_t, +_swigt__p_void, _swigt__p_int, _swigt__p_wxSize, _swigt__p_wxClipboard, @@ -33021,9 +33058,9 @@ _swigt__p_wxWindow, _swigt__p_wxString, _swigt__p_wxPyProcess, _swigt__p_wxBitmap, -_swigt__p_wxConfig, _swigt__unsigned_int, _swigt__p_unsigned_int, +_swigt__p_wxConfig, _swigt__p_unsigned_char, _swigt__p_wxChar, _swigt__p_wxBusyInfo, diff --git a/wxPython/src/msw/media_wrap.cpp b/wxPython/src/msw/media_wrap.cpp index 9508a24630..79ec5b3612 100644 --- a/wxPython/src/msw/media_wrap.cpp +++ b/wxPython/src/msw/media_wrap.cpp @@ -1398,7 +1398,7 @@ public: class wxMediaCtrl : public wxControl { public: - wxMediaCtrl() { wxPyRaiseNotImplemented(); } + wxMediaCtrl() { wxPyRaiseNotImplemented(); } wxMediaCtrl(wxWindow* , wxWindowID , const wxString& , -- 2.45.2