"""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)
"""GetTopLevelParent(Window win) -> Window"""
return _misc_.GetTopLevelParent(*args, **kwargs)
+def LaunchDefaultBrowser(*args, **kwargs):
+ """
+ LaunchDefaultBrowser(String url) -> bool
+
+ Launches the user's default browser and tells it to open the location
+ at ``url``. Returns ``True`` if the application was successfully
+ launched.
+ """
+ return _misc_.LaunchDefaultBrowser(*args, **kwargs)
+
def GetKeyState(*args, **kwargs):
"""
GetKeyState(int key) -> bool
"""GetId(self) -> int"""
return _misc_.Timer_GetId(*args, **kwargs)
- def Destroy():
+ def Destroy(self):
"""NO-OP: Timers must be destroyed by normal refrence counting"""
pass
self.__class__ = LogChain
_misc_.LogChain_swigregister(LogChainPtr)
+class LogBuffer(Log):
+ """Proxy of C++ LogBuffer class"""
+ def __repr__(self):
+ return "<%s.%s; proxy of C++ wxLogBuffer instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+ def __init__(self, *args, **kwargs):
+ """__init__(self) -> LogBuffer"""
+ newobj = _misc_.new_LogBuffer(*args, **kwargs)
+ self.this = newobj.this
+ self.thisown = 1
+ del newobj.thisown
+ def GetBuffer(*args, **kwargs):
+ """GetBuffer(self) -> String"""
+ return _misc_.LogBuffer_GetBuffer(*args, **kwargs)
+
+ def Flush(*args, **kwargs):
+ """Flush(self)"""
+ return _misc_.LogBuffer_Flush(*args, **kwargs)
+
+
+class LogBufferPtr(LogBuffer):
+ def __init__(self, this):
+ self.this = this
+ if not hasattr(self,"thisown"): self.thisown = 0
+ self.__class__ = LogBuffer
+_misc_.LogBuffer_swigregister(LogBufferPtr)
+
def SysErrorCode(*args, **kwargs):
"""SysErrorCode() -> unsigned long"""
ART_CUT = cvar.ART_CUT
ART_PASTE = cvar.ART_PASTE
ART_DELETE = cvar.ART_DELETE
+ART_NEW = cvar.ART_NEW
ART_UNDO = cvar.ART_UNDO
ART_REDO = cvar.ART_REDO
ART_QUIT = cvar.ART_QUIT
def __repr__(self):
if self.IsValid():
- return '<wx.DateTime: \"%s\" at %s>' % ( self.Format(), self.this)
+ f = self.Format().encode(wx.GetDefaultPyEncoding())
+ return '<wx.DateTime: \"%s\" at %s>' % ( f, self.this)
else:
return '<wx.DateTime: \"INVALID\" at %s>' % self.this
def __str__(self):
if self.IsValid():
- return self.Format()
+ return self.Format().encode(wx.GetDefaultPyEncoding())
else:
return "INVALID DateTime"
return _misc_.TimeSpan_Format(*args, **kwargs)
def __repr__(self):
- return '<wx.TimeSpan: \"%s\" at %s>' % ( self.Format(), self.this)
+ f = self.Format().encode(wx.GetDefaultPyEncoding())
+ return '<wx.TimeSpan: \"%s\" at %s>' % ( f, self.this)
def __str__(self):
- return self.Format()
+ return self.Format().encode(wx.GetDefaultPyEncoding())
class TimeSpanPtr(TimeSpan):
self.__class__ = DropSource
_misc_.DropSource_swigregister(DropSourcePtr)
+def DROP_ICON(filename):
+ """
+ Returns either a `wx.Cursor` or `wx.Icon` created from the image file
+ ``filename``. This function is useful with the `wx.DropSource` class
+ which, depending on platform accepts either a icon or a cursor.
+ """
+ img = wx.Image(filename)
+ if wx.Platform == '__WXGTK__':
+ return wx.IconFromBitmap(wx.BitmapFromImage(img))
+ else:
+ return wx.CursorFromImage(img)
+
class DropTarget(object):
"""Proxy of C++ DropTarget class"""
def __repr__(self):