X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c9c2cf703c1213a7413d41d7d69a5c21b7acb63b..11ec0dcea243f7ce1cbe7d33bfd9cd0e2f6d9083:/wxPython/src/msw/_core.py diff --git a/wxPython/src/msw/_core.py b/wxPython/src/msw/_core.py index 48f8e86e92..f3eef317dd 100644 --- a/wxPython/src/msw/_core.py +++ b/wxPython/src/msw/_core.py @@ -1160,7 +1160,7 @@ class Rect(object): Inflate(self, int dx, int dy) -> Rect Increase the rectangle size by dx in x direction and dy in y - direction. Both or one of) parameters may be negative to decrease the + direction. Both (or one of) parameters may be negative to decrease the rectangle size. """ return _core_.Rect_Inflate(*args, **kwargs) @@ -1170,7 +1170,7 @@ class Rect(object): Deflate(self, int dx, int dy) -> Rect Decrease the rectangle size by dx in x direction and dy in y - direction. Both or one of) parameters may be negative to increase the + direction. Both (or one of) parameters may be negative to increase the rectngle size. This method is the opposite of Inflate. """ return _core_.Rect_Deflate(*args, **kwargs) @@ -1197,10 +1197,18 @@ class Rect(object): """ Intersect(self, Rect rect) -> Rect - Return the intersectsion of this rectangle and rect. + Returns the intersectsion of this rectangle and rect. """ return _core_.Rect_Intersect(*args, **kwargs) + def Union(*args, **kwargs): + """ + Union(self, Rect rect) -> Rect + + Returns the union of this rectangle and rect. + """ + return _core_.Rect_Union(*args, **kwargs) + def __add__(*args, **kwargs): """ __add__(self, Rect rect) -> Rect @@ -5166,6 +5174,24 @@ def GetApp(*args, **kwargs): Return a reference to the current wx.App object. """ return _core_.GetApp(*args, **kwargs) + +def SetDefaultPyEncoding(*args, **kwargs): + """ + SetDefaultPyEncoding(string encoding) + + Sets the encoding that wxPython will use when it needs to convert a + Python string or unicode object to or from a wxString. + """ + return _core_.SetDefaultPyEncoding(*args, **kwargs) + +def GetDefaultPyEncoding(*args, **kwargs): + """ + GetDefaultPyEncoding() -> string + + Gets the current encoding that wxPython will use when it needs to + convert a Python string or unicode object to or from a wxString. + """ + return _core_.GetDefaultPyEncoding(*args, **kwargs) #---------------------------------------------------------------------- class PyOnDemandOutputWindow: @@ -10833,6 +10859,16 @@ if RELEASE_VERSION != _core_.RELEASE_VERSION: #---------------------------------------------------------------------------- +# Set the default string conversion encoding from the locale +import locale +default = locale.getdefaultlocale()[1] +if default: + wx.SetDefaultPyEncoding(default) +del default +del locale + +#---------------------------------------------------------------------------- + class PyDeadObjectError(AttributeError): pass