-# This file was created automatically by SWIG.
+# This file was created automatically by SWIG 1.3.27.
# Don't modify this file, modify the SWIG interface instead.
import _misc_
"""GetElapsedTime(bool resetTimer=True) -> long"""
return _misc_.GetElapsedTime(*args, **kwargs)
-def GetMousePosition(*args, **kwargs):
- """GetMousePosition() -> (x,y)"""
- return _misc_.GetMousePosition(*args, **kwargs)
-
def IsBusy(*args, **kwargs):
"""IsBusy() -> bool"""
return _misc_.IsBusy(*args, **kwargs)
return _misc_.GetOsDescription(*args, **kwargs)
def GetFreeMemory(*args, **kwargs):
- """GetFreeMemory() -> long"""
+ """GetFreeMemory() -> wxMemorySize"""
return _misc_.GetFreeMemory(*args, **kwargs)
SHUTDOWN_POWEROFF = _misc_.SHUTDOWN_POWEROFF
SHUTDOWN_REBOOT = _misc_.SHUTDOWN_REBOOT
"""
return _misc_.MessageBox(*args, **kwargs)
-def GetNumberFromUser(*args, **kwargs):
- """
- GetNumberFromUser(String message, String prompt, String caption, long value,
- long min=0, long max=100, Window parent=None,
- Point pos=DefaultPosition) -> long
- """
- return _misc_.GetNumberFromUser(*args, **kwargs)
-
def ColourDisplay(*args, **kwargs):
"""ColourDisplay() -> bool"""
return _misc_.ColourDisplay(*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)
+def GetMousePosition(*args, **kwargs):
+ """
+ GetMousePosition() -> Point
+
+ Get the current mouse position on the screen.
+ """
+ return _misc_.GetMousePosition(*args, **kwargs)
+
+def FindWindowAtPointer(*args, **kwargs):
+ """
+ FindWindowAtPointer() -> Window
+
+ Returns the window currently under the mouse pointer, if it belongs to
+ this application. Otherwise it returns None.
+ """
+ return _misc_.FindWindowAtPointer(*args, **kwargs)
+
def GetActiveWindow(*args, **kwargs):
- """GetActiveWindow() -> Window"""
+ """
+ GetActiveWindow() -> Window
+
+ Get the currently active window of this application, or None
+ """
return _misc_.GetActiveWindow(*args, **kwargs)
def GenericFindWindowAtPoint(*args, **kwargs):
Get the state of a key (true if pressed or toggled on, false if not.)
This is generally most useful getting the state of the modifier or
- toggle keys. On some platforms those may be the only keys that work.
+ toggle keys. On some platforms those may be the only keys that this
+ function is able to detect.
"""
return _misc_.GetKeyState(*args, **kwargs)
+class MouseState(object):
+ """
+ `wx.MouseState` is used to hold information about mouse button and
+ modifier key states and is what is returned from `wx.GetMouseState`.
+ """
+ def __repr__(self):
+ return "<%s.%s; proxy of C++ wxMouseState instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
+ def __init__(self, *args, **kwargs):
+ """
+ __init__(self) -> MouseState
+
+ `wx.MouseState` is used to hold information about mouse button and
+ modifier key states and is what is returned from `wx.GetMouseState`.
+ """
+ newobj = _misc_.new_MouseState(*args, **kwargs)
+ self.this = newobj.this
+ self.thisown = 1
+ del newobj.thisown
+ def __del__(self, destroy=_misc_.delete_MouseState):
+ """__del__(self)"""
+ try:
+ if self.thisown: destroy(self)
+ except: pass
+
+ def GetX(*args, **kwargs):
+ """GetX(self) -> int"""
+ return _misc_.MouseState_GetX(*args, **kwargs)
+
+ def GetY(*args, **kwargs):
+ """GetY(self) -> int"""
+ return _misc_.MouseState_GetY(*args, **kwargs)
+
+ def LeftDown(*args, **kwargs):
+ """LeftDown(self) -> bool"""
+ return _misc_.MouseState_LeftDown(*args, **kwargs)
+
+ def MiddleDown(*args, **kwargs):
+ """MiddleDown(self) -> bool"""
+ return _misc_.MouseState_MiddleDown(*args, **kwargs)
+
+ def RightDown(*args, **kwargs):
+ """RightDown(self) -> bool"""
+ return _misc_.MouseState_RightDown(*args, **kwargs)
+
+ def ControlDown(*args, **kwargs):
+ """ControlDown(self) -> bool"""
+ return _misc_.MouseState_ControlDown(*args, **kwargs)
+
+ def ShiftDown(*args, **kwargs):
+ """ShiftDown(self) -> bool"""
+ return _misc_.MouseState_ShiftDown(*args, **kwargs)
+
+ def AltDown(*args, **kwargs):
+ """AltDown(self) -> bool"""
+ return _misc_.MouseState_AltDown(*args, **kwargs)
+
+ def MetaDown(*args, **kwargs):
+ """MetaDown(self) -> bool"""
+ return _misc_.MouseState_MetaDown(*args, **kwargs)
+
+ def CmdDown(*args, **kwargs):
+ """CmdDown(self) -> bool"""
+ return _misc_.MouseState_CmdDown(*args, **kwargs)
+
+ def SetX(*args, **kwargs):
+ """SetX(self, int x)"""
+ return _misc_.MouseState_SetX(*args, **kwargs)
+
+ def SetY(*args, **kwargs):
+ """SetY(self, int y)"""
+ return _misc_.MouseState_SetY(*args, **kwargs)
+
+ def SetLeftDown(*args, **kwargs):
+ """SetLeftDown(self, bool down)"""
+ return _misc_.MouseState_SetLeftDown(*args, **kwargs)
+
+ def SetMiddleDown(*args, **kwargs):
+ """SetMiddleDown(self, bool down)"""
+ return _misc_.MouseState_SetMiddleDown(*args, **kwargs)
+
+ def SetRightDown(*args, **kwargs):
+ """SetRightDown(self, bool down)"""
+ return _misc_.MouseState_SetRightDown(*args, **kwargs)
+
+ def SetControlDown(*args, **kwargs):
+ """SetControlDown(self, bool down)"""
+ return _misc_.MouseState_SetControlDown(*args, **kwargs)
+
+ def SetShiftDown(*args, **kwargs):
+ """SetShiftDown(self, bool down)"""
+ return _misc_.MouseState_SetShiftDown(*args, **kwargs)
+
+ def SetAltDown(*args, **kwargs):
+ """SetAltDown(self, bool down)"""
+ return _misc_.MouseState_SetAltDown(*args, **kwargs)
+
+ def SetMetaDown(*args, **kwargs):
+ """SetMetaDown(self, bool down)"""
+ return _misc_.MouseState_SetMetaDown(*args, **kwargs)
+
+ x = property(GetX, SetX)
+ y = property(GetY, SetY)
+ leftDown = property(LeftDown, SetLeftDown)
+ middleDown = property(MiddleDown, SetMiddleDown)
+ rightDown = property(RightDown, SetRightDown)
+ controlDown = property(ControlDown, SetControlDown)
+ shiftDown = property(ShiftDown, SetShiftDown)
+ altDown = property(AltDown, SetAltDown)
+ metaDown = property(MetaDown, SetMetaDown)
+ cmdDown = property(CmdDown)
+
+
+class MouseStatePtr(MouseState):
+ def __init__(self, this):
+ self.this = this
+ if not hasattr(self,"thisown"): self.thisown = 0
+ self.__class__ = MouseState
+_misc_.MouseState_swigregister(MouseStatePtr)
+FileSelectorPromptStr = cvar.FileSelectorPromptStr
+FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr
+DirSelectorPromptStr = cvar.DirSelectorPromptStr
+
+
+def GetMouseState(*args, **kwargs):
+ """
+ GetMouseState() -> MouseState
+
+ Returns the current state of the mouse. Returns an instance of a
+ `wx.MouseState` object that contains the current position of the mouse
+ pointer in screen coordinants, as well as boolean values indicating
+ the up/down status of the mouse buttons and the modifier keys.
+ """
+ return _misc_.GetMouseState(*args, **kwargs)
def WakeUpMainThread(*args, **kwargs):
"""WakeUpMainThread()"""
if not hasattr(self,"thisown"): self.thisown = 0
self.__class__ = MutexGuiLocker
_misc_.MutexGuiLocker_swigregister(MutexGuiLockerPtr)
-FileSelectorPromptStr = cvar.FileSelectorPromptStr
-FileSelectorDefaultWildcardStr = cvar.FileSelectorDefaultWildcardStr
-DirSelectorPromptStr = cvar.DirSelectorPromptStr
def Thread_IsMain(*args, **kwargs):
"""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
"""
__init__(self, wxTimer timer) -> TimerRunner
__init__(self, wxTimer timer, int milli, bool oneShot=False) -> TimerRunner
+ __init__(self, wxTimer timer, int milli) -> TimerRunner
"""
newobj = _misc_.new_TimerRunner(*args)
self.this = newobj.this
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
"""MakeTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime"""
return _misc_.DateTime_MakeTimezone(*args, **kwargs)
+ def FromTimezone(*args, **kwargs):
+ """FromTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime"""
+ return _misc_.DateTime_FromTimezone(*args, **kwargs)
+
+ def MakeFromTimezone(*args, **kwargs):
+ """MakeFromTimezone(self, wxDateTime::TimeZone tz, bool noDST=False) -> DateTime"""
+ return _misc_.DateTime_MakeFromTimezone(*args, **kwargs)
+
+ def ToUTC(*args, **kwargs):
+ """ToUTC(self, bool noDST=False) -> DateTime"""
+ return _misc_.DateTime_ToUTC(*args, **kwargs)
+
+ def MakeUTC(*args, **kwargs):
+ """MakeUTC(self, bool noDST=False) -> DateTime"""
+ return _misc_.DateTime_MakeUTC(*args, **kwargs)
+
def ToGMT(*args, **kwargs):
"""ToGMT(self, bool noDST=False) -> DateTime"""
return _misc_.DateTime_ToGMT(*args, **kwargs)
"""MakeGMT(self, bool noDST=False) -> DateTime"""
return _misc_.DateTime_MakeGMT(*args, **kwargs)
+ def FromUTC(*args, **kwargs):
+ """FromUTC(self, bool noDST=False) -> DateTime"""
+ return _misc_.DateTime_FromUTC(*args, **kwargs)
+
+ def MakeFromUTC(*args, **kwargs):
+ """MakeFromUTC(self, bool noDST=False) -> DateTime"""
+ return _misc_.DateTime_MakeFromUTC(*args, **kwargs)
+
def IsDST(*args, **kwargs):
"""IsDST(self, int country=Country_Default) -> int"""
return _misc_.DateTime_IsDST(*args, **kwargs)
self.__class__ = CustomDataObject
_misc_.CustomDataObject_swigregister(CustomDataObjectPtr)
-class URLDataObject(DataObjectComposite):
+class URLDataObject(DataObject):
"""
This data object holds a URL in a format that is compatible with some
browsers such that it is able to be dragged to or from them.
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):
self._instance = None
def _checkInstance(self):
if self._instance is None:
- self._instance = self._initfunc(*self._args, **self._kwargs)
+ if wx.GetApp():
+ self._instance = self._initfunc(*self._args, **self._kwargs)
def __getattr__(self, name):
self._checkInstance()
return getattr(self._instance, name)
return _misc_.StandardPaths_Get(*args, **kwargs)
+