X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c9caa6bbe94bbbe9cf4a97d0804fcbe370a389f0..0e859e32234b3178254146f31653f478de0c5fba:/wxPython/src/gtk/_misc.py diff --git a/wxPython/src/gtk/_misc.py b/wxPython/src/gtk/_misc.py index c2bb116550..a5f0655187 100644 --- a/wxPython/src/gtk/_misc.py +++ b/wxPython/src/gtk/_misc.py @@ -1,4 +1,4 @@ -# 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_ @@ -134,6 +134,7 @@ SYS_SHOW_SOUNDS = _misc_.SYS_SHOW_SOUNDS SYS_SWAP_BUTTONS = _misc_.SYS_SWAP_BUTTONS SYS_CAN_DRAW_FRAME_DECORATIONS = _misc_.SYS_CAN_DRAW_FRAME_DECORATIONS SYS_CAN_ICONIZE_FRAME = _misc_.SYS_CAN_ICONIZE_FRAME +SYS_TABLET_PRESENT = _misc_.SYS_TABLET_PRESENT SYS_SCREEN_NONE = _misc_.SYS_SCREEN_NONE SYS_SCREEN_TINY = _misc_.SYS_SCREEN_TINY SYS_SCREEN_PDA = _misc_.SYS_SCREEN_PDA @@ -241,6 +242,11 @@ class SystemOptions(_core.Object): return _misc_.SystemOptions_HasOption(*args, **kwargs) HasOption = staticmethod(HasOption) + def IsFalse(*args, **kwargs): + """IsFalse(String name) -> bool""" + return _misc_.SystemOptions_IsFalse(*args, **kwargs) + + IsFalse = staticmethod(IsFalse) class SystemOptionsPtr(SystemOptions): def __init__(self, this): @@ -271,6 +277,10 @@ def SystemOptions_HasOption(*args, **kwargs): """SystemOptions_HasOption(String name) -> bool""" return _misc_.SystemOptions_HasOption(*args, **kwargs) +def SystemOptions_IsFalse(*args, **kwargs): + """SystemOptions_IsFalse(String name) -> bool""" + return _misc_.SystemOptions_IsFalse(*args, **kwargs) + #--------------------------------------------------------------------------- @@ -310,10 +320,6 @@ def GetElapsedTime(*args, **kwargs): """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) @@ -339,7 +345,7 @@ def GetOsDescription(*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 @@ -477,14 +483,6 @@ def MessageBox(*args, **kwargs): """ 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) @@ -525,12 +523,42 @@ 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) +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): @@ -545,16 +573,160 @@ def GetTopLevelParent(*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 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()""" @@ -590,9 +762,6 @@ class MutexGuiLockerPtr(MutexGuiLocker): 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): @@ -610,6 +779,12 @@ class ToolTip(_core.Object): self.this = newobj.this self.thisown = 1 del newobj.thisown + def __del__(self, destroy=_misc_.delete_ToolTip): + """__del__(self)""" + try: + if self.thisown: destroy(self) + except: pass + def SetTip(*args, **kwargs): """SetTip(self, String tip)""" return _misc_.ToolTip_SetTip(*args, **kwargs) @@ -658,13 +833,21 @@ class Caret(object): self.this = newobj.this self.thisown = 1 del newobj.thisown + def __del__(self, destroy=_misc_.delete_Caret): + """__del__(self)""" + try: + if self.thisown: destroy(self) + except: pass + def Destroy(*args, **kwargs): """ Destroy(self) Deletes the C++ object this Python object is a proxy for. """ - return _misc_.Caret_Destroy(*args, **kwargs) + val = _misc_.Caret_Destroy(*args, **kwargs) + args[0].thisown = 0 + return val def IsOk(*args, **kwargs): """IsOk(self) -> bool""" @@ -1070,6 +1253,10 @@ class Timer(_core.EvtHandler): """Stop(self)""" return _misc_.Timer_Stop(*args, **kwargs) + def Notify(*args, **kwargs): + """Notify(self)""" + return _misc_.Timer_Notify(*args, **kwargs) + def IsRunning(*args, **kwargs): """IsRunning(self) -> bool""" return _misc_.Timer_IsRunning(*args, **kwargs) @@ -1086,7 +1273,7 @@ class Timer(_core.EvtHandler): """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 @@ -1198,6 +1385,12 @@ class Log(object): self.this = newobj.this self.thisown = 1 del newobj.thisown + def __del__(self, destroy=_misc_.delete_Log): + """__del__(self)""" + try: + if self.thisown: destroy(self) + except: pass + def IsEnabled(*args, **kwargs): """IsEnabled() -> bool""" return _misc_.Log_IsEnabled(*args, **kwargs) @@ -1319,7 +1512,9 @@ class Log(object): TimeStamp = staticmethod(TimeStamp) def Destroy(*args, **kwargs): """Destroy(self)""" - return _misc_.Log_Destroy(*args, **kwargs) + val = _misc_.Log_Destroy(*args, **kwargs) + args[0].thisown = 0 + return val class LogPtr(Log): @@ -1547,6 +1742,32 @@ class LogChainPtr(LogChain): 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""" @@ -1717,9 +1938,14 @@ class Process(_core.EvtHandler): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.Process__setCallbackInfo(*args, **kwargs) - def base_OnTerminate(*args, **kwargs): - """base_OnTerminate(self, int pid, int status)""" - return _misc_.Process_base_OnTerminate(*args, **kwargs) + def OnTerminate(*args, **kwargs): + """OnTerminate(self, int pid, int status)""" + return _misc_.Process_OnTerminate(*args, **kwargs) + + def base_OnTerminate(*args, **kw): + return Process.OnTerminate(*args, **kw) + base_OnTerminate = wx._deprecated(base_OnTerminate, + "Please use Process.OnTerminate instead.") def Redirect(*args, **kwargs): """Redirect(self)""" @@ -2496,6 +2722,12 @@ class ArtProvider(object): del newobj.thisown self._setCallbackInfo(self, ArtProvider) + def __del__(self, destroy=_misc_.delete_ArtProvider): + """__del__(self)""" + try: + if self.thisown: destroy(self) + except: pass + def _setCallbackInfo(*args, **kwargs): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.ArtProvider__setCallbackInfo(*args, **kwargs) @@ -2525,7 +2757,9 @@ class ArtProvider(object): Remove provider. The provider must have been added previously! The provider is _not_ deleted. """ - return _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + val = _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + args[1].thisown = 1 + return val RemoveProvider = staticmethod(RemoveProvider) def GetBitmap(*args, **kwargs): @@ -2548,19 +2782,21 @@ class ArtProvider(object): return _misc_.ArtProvider_GetIcon(*args, **kwargs) GetIcon = staticmethod(GetIcon) - def GetSize(*args, **kwargs): + def GetSizeHint(*args, **kwargs): """ - GetSize(String client, bool platform_dependent=False) -> Size + GetSizeHint(String client, bool platform_dependent=False) -> Size - Get the size of an icon from a specific Art Client, queries the + Get the size hint of an icon from a specific Art Client, queries the topmost provider if platform_dependent = false """ - return _misc_.ArtProvider_GetSize(*args, **kwargs) + return _misc_.ArtProvider_GetSizeHint(*args, **kwargs) - GetSize = staticmethod(GetSize) + GetSizeHint = staticmethod(GetSizeHint) def Destroy(*args, **kwargs): """Destroy(self)""" - return _misc_.ArtProvider_Destroy(*args, **kwargs) + val = _misc_.ArtProvider_Destroy(*args, **kwargs) + args[0].thisown = 0 + return val class ArtProviderPtr(ArtProvider): @@ -2619,6 +2855,7 @@ ART_COPY = cvar.ART_COPY 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 @@ -2648,7 +2885,9 @@ def ArtProvider_RemoveProvider(*args, **kwargs): Remove provider. The provider must have been added previously! The provider is _not_ deleted. """ - return _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + val = _misc_.ArtProvider_RemoveProvider(*args, **kwargs) + args[1].thisown = 1 + return val def ArtProvider_GetBitmap(*args, **kwargs): """ @@ -2668,14 +2907,14 @@ def ArtProvider_GetIcon(*args, **kwargs): """ return _misc_.ArtProvider_GetIcon(*args, **kwargs) -def ArtProvider_GetSize(*args, **kwargs): +def ArtProvider_GetSizeHint(*args, **kwargs): """ - ArtProvider_GetSize(String client, bool platform_dependent=False) -> Size + ArtProvider_GetSizeHint(String client, bool platform_dependent=False) -> Size - Get the size of an icon from a specific Art Client, queries the + Get the size hint of an icon from a specific Art Client, queries the topmost provider if platform_dependent = false """ - return _misc_.ArtProvider_GetSize(*args, **kwargs) + return _misc_.ArtProvider_GetSizeHint(*args, **kwargs) #--------------------------------------------------------------------------- @@ -3626,6 +3865,22 @@ class DateTime(object): """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) @@ -3634,6 +3889,14 @@ class DateTime(object): """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) @@ -3843,12 +4106,13 @@ class DateTime(object): def __repr__(self): if self.IsValid(): - return '' % ( self.Format(), self.this) + f = self.Format().encode(wx.GetDefaultPyEncoding()) + return '' % ( f, self.this) else: return '' % self.this def __str__(self): if self.IsValid(): - return self.Format() + return self.Format().encode(wx.GetDefaultPyEncoding()) else: return "INVALID DateTime" @@ -4168,9 +4432,10 @@ class TimeSpan(object): return _misc_.TimeSpan_Format(*args, **kwargs) def __repr__(self): - return '' % ( self.Format(), self.this) + f = self.Format().encode(wx.GetDefaultPyEncoding()) + return '' % ( f, self.this) def __str__(self): - return self.Format() + return self.Format().encode(wx.GetDefaultPyEncoding()) class TimeSpanPtr(TimeSpan): @@ -4618,7 +4883,6 @@ class DataObject(object): GetDataHere(self, DataFormat format) -> String Get the data bytes in the specified format, returns None on failure. - """ return _misc_.DataObject_GetDataHere(*args, **kwargs) @@ -5104,7 +5368,7 @@ class CustomDataObjectPtr(CustomDataObject): 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. @@ -5220,9 +5484,14 @@ class DropSource(object): """DoDragDrop(self, int flags=Drag_CopyOnly) -> int""" return _misc_.DropSource_DoDragDrop(*args, **kwargs) - def base_GiveFeedback(*args, **kwargs): - """base_GiveFeedback(self, int effect) -> bool""" - return _misc_.DropSource_base_GiveFeedback(*args, **kwargs) + def GiveFeedback(*args, **kwargs): + """GiveFeedback(self, int effect) -> bool""" + return _misc_.DropSource_GiveFeedback(*args, **kwargs) + + def base_GiveFeedback(*args, **kw): + return DropSource.GiveFeedback(*args, **kw) + base_GiveFeedback = wx._deprecated(base_GiveFeedback, + "Please use DropSource.GiveFeedback instead.") class DropSourcePtr(DropSource): @@ -5232,6 +5501,18 @@ class DropSourcePtr(DropSource): 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): @@ -5262,21 +5543,41 @@ class DropTarget(object): """SetDataObject(self, DataObject dataObject)""" return _misc_.DropTarget_SetDataObject(*args, **kwargs) - def base_OnEnter(*args, **kwargs): - """base_OnEnter(self, int x, int y, int def) -> int""" - return _misc_.DropTarget_base_OnEnter(*args, **kwargs) + def OnEnter(*args, **kwargs): + """OnEnter(self, int x, int y, int def) -> int""" + return _misc_.DropTarget_OnEnter(*args, **kwargs) + + def OnDragOver(*args, **kwargs): + """OnDragOver(self, int x, int y, int def) -> int""" + return _misc_.DropTarget_OnDragOver(*args, **kwargs) - def base_OnDragOver(*args, **kwargs): - """base_OnDragOver(self, int x, int y, int def) -> int""" - return _misc_.DropTarget_base_OnDragOver(*args, **kwargs) + def OnLeave(*args, **kwargs): + """OnLeave(self)""" + return _misc_.DropTarget_OnLeave(*args, **kwargs) - def base_OnLeave(*args, **kwargs): - """base_OnLeave(self)""" - return _misc_.DropTarget_base_OnLeave(*args, **kwargs) + def OnDrop(*args, **kwargs): + """OnDrop(self, int x, int y) -> bool""" + return _misc_.DropTarget_OnDrop(*args, **kwargs) - def base_OnDrop(*args, **kwargs): - """base_OnDrop(self, int x, int y) -> bool""" - return _misc_.DropTarget_base_OnDrop(*args, **kwargs) + def base_OnEnter(*args, **kw): + return DropTarget.OnEnter(*args, **kw) + base_OnEnter = wx._deprecated(base_OnEnter, + "Please use DropTarget.OnEnter instead.") + + def base_OnDragOver(*args, **kw): + return DropTarget.OnDragOver(*args, **kw) + base_OnDragOver = wx._deprecated(base_OnDragOver, + "Please use DropTarget.OnDragOver instead.") + + def base_OnLeave(*args, **kw): + return DropTarget.OnLeave(*args, **kw) + base_OnLeave = wx._deprecated(base_OnLeave, + "Please use DropTarget.OnLeave instead.") + + def base_OnDrop(*args, **kw): + return DropTarget.OnDrop(*args, **kw) + base_OnDrop = wx._deprecated(base_OnDrop, + "Please use DropTarget.OnDrop instead.") def GetData(*args, **kwargs): """GetData(self) -> bool""" @@ -5315,25 +5616,59 @@ class TextDropTarget(DropTarget): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.TextDropTarget__setCallbackInfo(*args, **kwargs) - def base_OnEnter(*args, **kwargs): - """base_OnEnter(self, int x, int y, int def) -> int""" - return _misc_.TextDropTarget_base_OnEnter(*args, **kwargs) + def OnDropText(*args, **kwargs): + """OnDropText(self, int x, int y, String text) -> bool""" + return _misc_.TextDropTarget_OnDropText(*args, **kwargs) + + def OnEnter(*args, **kwargs): + """OnEnter(self, int x, int y, int def) -> int""" + return _misc_.TextDropTarget_OnEnter(*args, **kwargs) + + def OnDragOver(*args, **kwargs): + """OnDragOver(self, int x, int y, int def) -> int""" + return _misc_.TextDropTarget_OnDragOver(*args, **kwargs) + + def OnLeave(*args, **kwargs): + """OnLeave(self)""" + return _misc_.TextDropTarget_OnLeave(*args, **kwargs) + + def OnDrop(*args, **kwargs): + """OnDrop(self, int x, int y) -> bool""" + return _misc_.TextDropTarget_OnDrop(*args, **kwargs) + + def OnData(*args, **kwargs): + """OnData(self, int x, int y, int def) -> int""" + return _misc_.TextDropTarget_OnData(*args, **kwargs) + + def base_OnDropText(*args, **kw): + return TextDropTarget.OnDropText(*args, **kw) + base_OnDropText = wx._deprecated(base_OnDropText, + "Please use TextDropTarget.OnDropText instead.") - def base_OnDragOver(*args, **kwargs): - """base_OnDragOver(self, int x, int y, int def) -> int""" - return _misc_.TextDropTarget_base_OnDragOver(*args, **kwargs) + def base_OnEnter(*args, **kw): + return TextDropTarget.OnEnter(*args, **kw) + base_OnEnter = wx._deprecated(base_OnEnter, + "Please use TextDropTarget.OnEnter instead.") - def base_OnLeave(*args, **kwargs): - """base_OnLeave(self)""" - return _misc_.TextDropTarget_base_OnLeave(*args, **kwargs) + def base_OnDragOver(*args, **kw): + return TextDropTarget.OnDragOver(*args, **kw) + base_OnDragOver = wx._deprecated(base_OnDragOver, + "Please use TextDropTarget.OnDragOver instead.") - def base_OnDrop(*args, **kwargs): - """base_OnDrop(self, int x, int y) -> bool""" - return _misc_.TextDropTarget_base_OnDrop(*args, **kwargs) + def base_OnLeave(*args, **kw): + return TextDropTarget.OnLeave(*args, **kw) + base_OnLeave = wx._deprecated(base_OnLeave, + "Please use TextDropTarget.OnLeave instead.") - def base_OnData(*args, **kwargs): - """base_OnData(self, int x, int y, int def) -> int""" - return _misc_.TextDropTarget_base_OnData(*args, **kwargs) + def base_OnDrop(*args, **kw): + return TextDropTarget.OnDrop(*args, **kw) + base_OnDrop = wx._deprecated(base_OnDrop, + "Please use TextDropTarget.OnDrop instead.") + + def base_OnData(*args, **kw): + return TextDropTarget.OnData(*args, **kw) + base_OnData = wx._deprecated(base_OnData, + "Please use TextDropTarget.OnData instead.") class TextDropTargetPtr(TextDropTarget): @@ -5359,25 +5694,59 @@ class FileDropTarget(DropTarget): """_setCallbackInfo(self, PyObject self, PyObject _class)""" return _misc_.FileDropTarget__setCallbackInfo(*args, **kwargs) - def base_OnEnter(*args, **kwargs): - """base_OnEnter(self, int x, int y, int def) -> int""" - return _misc_.FileDropTarget_base_OnEnter(*args, **kwargs) + def OnDropFiles(*args, **kwargs): + """OnDropFiles(self, int x, int y, wxArrayString filenames) -> bool""" + return _misc_.FileDropTarget_OnDropFiles(*args, **kwargs) + + def OnEnter(*args, **kwargs): + """OnEnter(self, int x, int y, int def) -> int""" + return _misc_.FileDropTarget_OnEnter(*args, **kwargs) + + def OnDragOver(*args, **kwargs): + """OnDragOver(self, int x, int y, int def) -> int""" + return _misc_.FileDropTarget_OnDragOver(*args, **kwargs) + + def OnLeave(*args, **kwargs): + """OnLeave(self)""" + return _misc_.FileDropTarget_OnLeave(*args, **kwargs) + + def OnDrop(*args, **kwargs): + """OnDrop(self, int x, int y) -> bool""" + return _misc_.FileDropTarget_OnDrop(*args, **kwargs) - def base_OnDragOver(*args, **kwargs): - """base_OnDragOver(self, int x, int y, int def) -> int""" - return _misc_.FileDropTarget_base_OnDragOver(*args, **kwargs) + def OnData(*args, **kwargs): + """OnData(self, int x, int y, int def) -> int""" + return _misc_.FileDropTarget_OnData(*args, **kwargs) - def base_OnLeave(*args, **kwargs): - """base_OnLeave(self)""" - return _misc_.FileDropTarget_base_OnLeave(*args, **kwargs) + def base_OnDropFiles(*args, **kw): + return FileDropTarget.OnDropFiles(*args, **kw) + base_OnDropFiles = wx._deprecated(base_OnDropFiles, + "Please use FileDropTarget.OnDropFiles instead.") - def base_OnDrop(*args, **kwargs): - """base_OnDrop(self, int x, int y) -> bool""" - return _misc_.FileDropTarget_base_OnDrop(*args, **kwargs) + def base_OnEnter(*args, **kw): + return FileDropTarget.OnEnter(*args, **kw) + base_OnEnter = wx._deprecated(base_OnEnter, + "Please use FileDropTarget.OnEnter instead.") - def base_OnData(*args, **kwargs): - """base_OnData(self, int x, int y, int def) -> int""" - return _misc_.FileDropTarget_base_OnData(*args, **kwargs) + def base_OnDragOver(*args, **kw): + return FileDropTarget.OnDragOver(*args, **kw) + base_OnDragOver = wx._deprecated(base_OnDragOver, + "Please use FileDropTarget.OnDragOver instead.") + + def base_OnLeave(*args, **kw): + return FileDropTarget.OnLeave(*args, **kw) + base_OnLeave = wx._deprecated(base_OnLeave, + "Please use FileDropTarget.OnLeave instead.") + + def base_OnDrop(*args, **kw): + return FileDropTarget.OnDrop(*args, **kw) + base_OnDrop = wx._deprecated(base_OnDrop, + "Please use FileDropTarget.OnDrop instead.") + + def base_OnData(*args, **kw): + return FileDropTarget.OnData(*args, **kw) + base_OnData = wx._deprecated(base_OnData, + "Please use FileDropTarget.OnData instead.") class FileDropTargetPtr(FileDropTarget): @@ -5552,7 +5921,8 @@ class _wxPyDelayedInitWrapper(object): 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) @@ -6019,3 +6389,4 @@ def StandardPaths_Get(*args, **kwargs): return _misc_.StandardPaths_Get(*args, **kwargs) +